Skip to content

Commit

Permalink
fix: pr feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
SeanBarry committed Apr 26, 2024
1 parent d96ef62 commit 45459ae
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 7 deletions.
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Expand Up @@ -26,7 +26,7 @@ git clone git@github.com:vortechsa/python-sdk.git
cd python-sdk
```

create a new virtual environment
create a new virtual environment using Python v3.11

```bash
python -m venv venv
Expand Down Expand Up @@ -83,7 +83,7 @@ Now you're ready to create a new branch, add a feature or fix a bug, then send u

### Note about Apple ARM-based chips

To run the SDK on an Apple ARM chip, upgrade your Python version to 3.8 or higher and use the latest version of pip. This works for the SDK version 0.41.0 or higher.
To run the SDK on an Apple ARM chip, upgrade your Python version to 3.11 or higher and use the latest version of pip. This works for the SDK version 0.41.0 or higher.

The set up is almost identical as above except one command; to create a virtual environment for Python 3.8 you should run:

Expand Down
2 changes: 1 addition & 1 deletion vortexasdk/__init__.py
Expand Up @@ -47,7 +47,7 @@
# noinspection PyUnresolvedReferences
from vortexasdk.check_setup import run_all_checks

# Explicitly define the exported symbols
# Explicitly list all exported classes, to help MyPy know what is available
__all__ = [
"AssetTanks",
"Attributes",
Expand Down
4 changes: 2 additions & 2 deletions vortexasdk/api/voyages.py
Expand Up @@ -121,7 +121,7 @@ class VoyageCargoEvent(BaseModel):
odometer_start: Optional[int] = None
odometer_end: Optional[int] = None
cargo_destination_id: Optional[str] = None
tonne_miles: Optional[int | float] = None
tonne_miles: Optional[float] = None
product_details: Optional[List[EntityWithSingleLayer]] = None
cargo_origin_details: Optional[List[EntityWithSingleLayer]] = None
cargo_destination_details: Optional[List[EntityWithSingleLayer]] = None
Expand Down Expand Up @@ -171,7 +171,7 @@ class VoyageEnrichedItem(BaseModel):
next_voyage_id: Optional[ID] = None
latest_product_ids: Optional[List[ID]] = None
tags: Optional[List[Tag]] = None
tonne_miles: Optional[int | float] = None
tonne_miles: Optional[float] = None
corporate_entities: Optional[List[EntityWithSingleLayerAndTimespan]] = None
odometer_start: Optional[int] = None
odometer_end: Optional[int] = None
Expand Down
2 changes: 1 addition & 1 deletion vortexasdk/client.py
Expand Up @@ -36,7 +36,7 @@ class VortexaClient:
_N_THREADS = 6
_MAX_ALLOWED_TOTAL = int(1e6)

def __init__(self: "VortexaClient", **kwargs: Dict) -> None:
def __init__(self: "VortexaClient", **kwargs: Any) -> None:
self.api_key = kwargs["api_key"]

def get_reference(self, resource: str, id: ID) -> List[Dict]:
Expand Down
1 change: 1 addition & 0 deletions vortexasdk/endpoints/__init__.py
Expand Up @@ -67,6 +67,7 @@
from vortexasdk.endpoints.vessel_summary import VesselSummary
from vortexasdk.endpoints.vessel_positions import VesselPositions

# Explicitly list all exported classes, to help MyPy know what is available
__all__ = [
"AssetTanks",
"Attributes",
Expand Down
2 changes: 1 addition & 1 deletion vortexasdk/result_conversions.py
Expand Up @@ -45,7 +45,7 @@ def create_dataframe(
"""
logger.debug(f"Creating DataFrame of {logger_description}")

if columns == "all":
if columns == "all" or columns is None:
df = pd.DataFrame(data=data).fillna("")
else:
df = pd.DataFrame(data=data, columns=columns).fillna("")
Expand Down

0 comments on commit 45459ae

Please sign in to comment.