Skip to content

Commit

Permalink
Merge pull request #441 from karrioapi/patch-2023.5.3
Browse files Browse the repository at this point in the history
[patch] 2023.5.3
  • Loading branch information
danh91 authored Nov 24, 2023
2 parents 24b8083 + 940d030 commit 0664c25
Show file tree
Hide file tree
Showing 13 changed files with 1,721 additions and 1,721 deletions.
12 changes: 4 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ docker compose up
- Karrio server accessible at <http://localhost:5002>
- Karrio dashboard accessible at <http://localhost:3000>

Default Login: [email protected] | demo
Default Login: <[email protected]> | demo

## Features

Expand Down Expand Up @@ -65,10 +65,6 @@ Default Login: [email protected] | demo

Request access to [Karrio Cloud](https://www.karrio.io/get-started).

### Enterprise self-hosted

See our [enterprise self-hosted docs](https://docs.karrio.io/self-hosting/enterprise) to deploy a scalable, production-ready instance with support from our team.

## The problem: Shipping integration is still painful

- Lack of documentation.
Expand Down Expand Up @@ -109,7 +105,7 @@ We strive to provide good support through our issue trackers on Github. However,
- Prioritized carriers integrations
- Prioritized feature requests

We do offer paid support options. Please reach out to us at [email protected] to sign up.
We do offer paid support options. Please reach out to us at <[email protected]> to sign up.

## Contributing

Expand All @@ -119,10 +115,10 @@ We <3 contributions big or small, check out our [guide on how to get started](ht

Not sure where to start? [Send us an email](mailto:[email protected]?subject=Pairing%20session&body=I'd%20like%20to%20do%20a%20pairing%20session!) to chat with a member of our team.

## Open-source vs. paid
## License

This project uses the [Apache v2 license](LICENSE). The core Karrio platform will always remain open and free.

We are developing some commercial enterprise add-ons (contained in the `/ee` directory) only offered on our Cloud and Enterprise editions.

Any other questions, mail us at [email protected] We’d love to meet you!
Any other questions, mail us at <[email protected]> We’d love to meet you!
2 changes: 1 addition & 1 deletion bin/server
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ source "bin/activate-env" > /dev/null 2>&1
# Run server commands
if [[ "$*" == *gen:graph* ]]; then
cd "${ROOT:?}"
apollo service:download --endpoint=http://localhost:5002/graphql/ "${ROOT:?}/server/schemas/graphql.json"
apollo service:download --endpoint=http://0.0.0.0:5002/graphql/ "${ROOT:?}/server/schemas/graphql.json"
cd -
elif [[ "$*" == *gen:openapi* ]]; then
cd "${ROOT:?}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,14 +102,7 @@ def rate_request(
raise errors.DestinationNotServicedError(payload.shipper.country_code)

is_document = all([parcel.is_document for parcel in payload.parcels])
is_dutiable = (
is_international and
not is_document and
(
units.EUCountry.map(payload.shipper.country_code).value is None and
units.EUCountry.map(payload.recipient.country_code).value is None
)
)
is_dutiable = is_international and not is_document

services = lib.to_services(
payload.services,
Expand Down
2 changes: 1 addition & 1 deletion sdk/extensions/dhl_express/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setup(
name="karrio.dhl_express",
version="2023.5.2",
version="2023.5.3",
description="Karrio - DHL Express Shipping Extension",
long_description=long_description,
long_description_content_type="text/markdown",
Expand Down
11 changes: 10 additions & 1 deletion sdk/extensions/dhl_express/tests/dhl_express/test_rate.py
Original file line number Diff line number Diff line change
Expand Up @@ -391,13 +391,22 @@ def test_parse_rate_vol_weight_higher_response(self):
</Piece>
</Pieces>
<PaymentAccountNumber>123456789</PaymentAccountNumber>
<IsDutiable>N</IsDutiable>
<IsDutiable>Y</IsDutiable>
<NetworkTypeCode>AL</NetworkTypeCode>
<QtdShp>
<QtdShpExChrg>
<SpecialServiceType>WY</SpecialServiceType>
</QtdShpExChrg>
</QtdShp>
</BkgDetails>
<To>
<CountryCode>NL</CountryCode>
<Postalcode>76131</Postalcode>
</To>
<Dutiable>
<DeclaredCurrency>EUR</DeclaredCurrency>
<DeclaredValue>1.</DeclaredValue>
</Dutiable>
</GetQuote>
</p:DCTRequest>
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
"%Y-%m-%dT%H:%M:%S",
"%Y-%m-%dT%H:%M:%SZ",
"%Y-%m-%dT%H:%M:%S%z",
"%Y-%m-%dT%H:%M:%S.%f%z",
]


Expand Down Expand Up @@ -49,6 +48,7 @@ def _extract_detail(
),
provider_units.TrackingStatus.in_transit.name,
)
shorten_date = lambda _date: _date.split(".")[0] if _date else None

return models.TrackingDetails(
carrier_name=settings.carrier_name,
Expand All @@ -57,20 +57,20 @@ def _extract_detail(
status=status,
events=[
models.TrackingEvent(
date=lib.fdate(event.timestamp, try_formats=date_formats),
date=lib.fdate(shorten_date(event.timestamp), try_formats=date_formats),
description=event.description or event.status or " ",
location=(
event.location.address.addressLocality
if event.location is not None and event.location.address is not None
else None
),
code=event.statusCode or "",
time=lib.ftime(event.timestamp, try_formats=date_formats),
time=lib.ftime(shorten_date(event.timestamp), try_formats=date_formats),
)
for event in shipment.events or []
],
estimated_delivery=lib.fdate(
shipment.estimatedTimeOfDelivery, try_formats=date_formats
shorten_date(shipment.estimatedTimeOfDelivery), try_formats=date_formats
),
delivered=status == "delivered",
info=models.TrackingInfo(
Expand Down
2 changes: 1 addition & 1 deletion sdk/extensions/dhl_universal/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setup(
name="karrio.dhl_universal",
version="2023.4",
version="2023.5.3",
description="DHL Universal Tracking karrio extension",
long_description=long_description,
long_description_content_type="text/markdown",
Expand Down
2 changes: 1 addition & 1 deletion server/main/karrio/server/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2023.5.2
2023.5.3
4 changes: 3 additions & 1 deletion server/modules/core/karrio/server/core/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -1545,7 +1545,9 @@ class DocumentFileData(serializers.Serializer):
help_text="The file name",
)
doc_format = serializers.CharField(
required=True,
required=False,
allow_blank=False,
allow_null=True,
help_text="The file format",
)
doc_type = serializers.CharField(
Expand Down
2 changes: 1 addition & 1 deletion server/modules/data/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setup(
name="karrio.server.data",
version="2023.1.10",
version="2023.5.3",
description="Multi-carrier shipping API data import/export module",
long_description=long_description,
long_description_content_type="text/markdown",
Expand Down
Loading

0 comments on commit 0664c25

Please sign in to comment.