feat: added afp latest update and timeseries#564
Open
Jack-Burge55 wants to merge 1 commit into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds initial support for the Anywhere Freight Pricing (AFP) module to the SDK, wiring new API paths, endpoint classes, documentation pages, and live tests.
Changes:
- Added AFP endpoint constants and exported two new SDK endpoints: latest update timestamp + price timeseries (with a dedicated result container).
- Extended docs generation/navigation for AFP and introduced a small CSS tweak to prevent long headings overflowing.
- Added live API tests for the new AFP endpoints (plus scaffold modules for additional AFP endpoints).
Reviewed changes
Copilot reviewed 19 out of 19 changed files in this pull request and generated 11 comments.
Show a summary per file
| File | Description |
|---|---|
vortexasdk/endpoints/endpoints.py |
Adds AFP endpoint path constants. |
vortexasdk/endpoints/anywhere_freight_pricing_latest_update_timestamp.py |
New AFP “latest update timestamp” endpoint implementation (GET). |
vortexasdk/endpoints/anywhere_freight_pricing_price_timeseries.py |
New AFP “price timeseries” endpoint implementation (POST search). |
vortexasdk/endpoints/anywhere_freight_pricing_price_timeseries_result.py |
Result wrapper + to_df() flattening for AFP timeseries response. |
vortexasdk/endpoints/anywhere_freight_pricing_get_price_details.py |
Scaffold (currently empty) AFP endpoint module. |
vortexasdk/endpoints/anywhere_freight_pricing_post_price_details.py |
Scaffold (currently empty) AFP endpoint module. |
vortexasdk/endpoints/anywhere_freight_pricing_top_ports_origin.py |
Scaffold (currently empty) AFP endpoint module. |
vortexasdk/endpoints/anywhere_freight_pricing_top_ports_destination.py |
Scaffold (currently empty) AFP endpoint module. |
vortexasdk/endpoints/anywhere_freight_pricing_vessel_classes_details.py |
Scaffold (currently empty) AFP endpoint module. |
vortexasdk/endpoints/__init__.py |
Exports the two implemented AFP endpoints. |
vortexasdk/__init__.py |
Re-exports the two implemented AFP endpoints at package root. |
tests/endpoints/test_anywhere_freight_pricing_price_timeseries.py |
Live API test coverage for AFP price timeseries + to_df(). |
tests/endpoints/test_anywhere_freight_pricing_latest_update_timestamp.py |
Live API test for AFP latest update timestamp. |
pydocmd.yml |
Adds AFP docs generation entries. |
mkdocs.yml |
Adds AFP docs navigation and references new extra_css. |
docs/scripts/serve_docs.sh |
Copies docs CSS into build dir for local serving. |
docs/css/custom.css |
New CSS to wrap long headings. |
README.md |
Small text change (currently introduces a typo). |
CONTRIBUTING.md |
Updates “run tests” instructions to use pytest. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| setup cost. | ||
|
|
||
| The SDK sits as a thin python wrapper around | ||
| The SDK!! sits as a thin python wrapper around |
Comment on lines
+88
to
+89
| extra_css: | ||
| - css/custom.css |
Comment on lines
6
to
9
| mkdir -p ./_build/pydocmd/examples | ||
| mkdir -p ./_build/pydocmd/css | ||
| cp -r docs/css/* ./_build/pydocmd/css/ | ||
| python docs/autogen.py |
| @@ -0,0 +1,7 @@ | |||
| from tests.testcases import TestCaseUsingRealAPI | |||
| from vortexasdk import AnywhereFreightPricingLatestUpdateTimestamp | |||
|
|
|||
Comment on lines
+56
to
+61
| if not response.ok: | ||
| logger.error(response.reason) | ||
| raise ValueError( | ||
| f"[{response.status_code} {response.reason}] " | ||
| f"Failed to fetch latest update timestamp" | ||
| ) |
| class AnywhereFreightPricingGetPriceDetails: | ||
| """Anywhere Freight Pricing Get Price Details endpoint.""" | ||
|
|
||
| pass |
| class AnywhereFreightPricingPostPriceDetails: | ||
| """Anywhere Freight Pricing Post Price Details endpoint.""" | ||
|
|
||
| pass |
| class AnywhereFreightPricingTopPortsOrigin: | ||
| """Anywhere Freight Pricing Top Ports Origin endpoint.""" | ||
|
|
||
| pass |
| class AnywhereFreightPricingTopPortsDestination: | ||
| """Anywhere Freight Pricing Top Ports Destination endpoint.""" | ||
|
|
||
| pass |
| class AnywhereFreightPricingVesselClassesDetails: | ||
| """Anywhere Freight Pricing Vessel Classes Details endpoint.""" | ||
|
|
||
| pass |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
RELATED TICKETS
! Do not post related PRs here, unless they are open source !
CHANGELOG
TESTS
COMMENTS