From e209b47d717f9ad08a688587b1bae46cb71fab54 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sun, 28 Jul 2024 16:10:12 +0000 Subject: [PATCH 1/3] feat(api): OpenAPI spec update via Stainless API (#18) --- .stats.yml | 2 +- src/onebusaway/types/stop_ids_for_agency_list_response.py | 6 +++--- src/onebusaway/types/stop_retrieve_response.py | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.stats.yml b/.stats.yml index 441e696..6b64c2b 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 15 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/open-transit%2Fopen-transit-735f145c4ce18bd5a2c869289186f175513bfa496507de7ff0734f9242adf427.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/open-transit%2Fopen-transit-ac10a054ead5e711bd033b417891c1769d631135029ca5bd91e6584420403ee2.yml diff --git a/src/onebusaway/types/stop_ids_for_agency_list_response.py b/src/onebusaway/types/stop_ids_for_agency_list_response.py index bf3927c..6120be8 100644 --- a/src/onebusaway/types/stop_ids_for_agency_list_response.py +++ b/src/onebusaway/types/stop_ids_for_agency_list_response.py @@ -12,11 +12,11 @@ class StopIDsForAgencyListResponseData(BaseModel): - list: List[str] + limit_exceeded: Optional[bool] = FieldInfo(alias="limitExceeded", default=None) - references: References + list: Optional[List[str]] = None - limit_exceeded: Optional[bool] = FieldInfo(alias="limitExceeded", default=None) + references: Optional[References] = None class StopIDsForAgencyListResponse(ResponseWrapper): diff --git a/src/onebusaway/types/stop_retrieve_response.py b/src/onebusaway/types/stop_retrieve_response.py index 8d71183..abb6779 100644 --- a/src/onebusaway/types/stop_retrieve_response.py +++ b/src/onebusaway/types/stop_retrieve_response.py @@ -36,9 +36,9 @@ class StopRetrieveResponseDataEntry(BaseModel): class StopRetrieveResponseData(BaseModel): - entry: StopRetrieveResponseDataEntry + entry: Optional[StopRetrieveResponseDataEntry] = None - references: References + references: Optional[References] = None class StopRetrieveResponse(ResponseWrapper): From 5a9a1ca5923574f8e2c82a98d6c4198c102ea4b0 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sun, 28 Jul 2024 16:10:26 +0000 Subject: [PATCH 2/3] release: 0.1.0-alpha.5 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 8 ++++++++ pyproject.toml | 2 +- src/onebusaway/_version.py | 2 +- 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index b56c3d0..e8285b7 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.1.0-alpha.4" + ".": "0.1.0-alpha.5" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 589f9a5..60f8b63 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 0.1.0-alpha.5 (2024-07-28) + +Full Changelog: [v0.1.0-alpha.4...v0.1.0-alpha.5](https://github.com/OneBusAway/python-sdk/compare/v0.1.0-alpha.4...v0.1.0-alpha.5) + +### Features + +* **api:** OpenAPI spec update via Stainless API ([#18](https://github.com/OneBusAway/python-sdk/issues/18)) ([e209b47](https://github.com/OneBusAway/python-sdk/commit/e209b47d717f9ad08a688587b1bae46cb71fab54)) + ## 0.1.0-alpha.4 (2024-07-27) Full Changelog: [v0.1.0-alpha.3...v0.1.0-alpha.4](https://github.com/OneBusAway/python-sdk/compare/v0.1.0-alpha.3...v0.1.0-alpha.4) diff --git a/pyproject.toml b/pyproject.toml index e73225d..53c9986 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "onebusaway" -version = "0.1.0-alpha.4" +version = "0.1.0-alpha.5" description = "The official Python library for the onebusaway-sdk API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/onebusaway/_version.py b/src/onebusaway/_version.py index c6c89c3..60af28d 100644 --- a/src/onebusaway/_version.py +++ b/src/onebusaway/_version.py @@ -1,4 +1,4 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. __title__ = "onebusaway" -__version__ = "0.1.0-alpha.4" # x-release-please-version +__version__ = "0.1.0-alpha.5" # x-release-please-version From e1a19e72c91cb22d379c77dbd432af80878905f5 Mon Sep 17 00:00:00 2001 From: Ahmedhossamdev Date: Sun, 28 Jul 2024 19:22:44 +0300 Subject: [PATCH 3/3] chore: Remove unnecessary blank lines in example files --- examples/agency.py | 3 +-- examples/stop.py | 3 +-- examples/stop_ids_for_agency.py | 6 ++---- examples/trip.py | 5 ++--- 4 files changed, 6 insertions(+), 11 deletions(-) diff --git a/examples/agency.py b/examples/agency.py index f1b7976..8183d72 100644 --- a/examples/agency.py +++ b/examples/agency.py @@ -1,5 +1,3 @@ - - import onebusaway @@ -12,5 +10,6 @@ def main_sync() -> None: else: print("Agency data or entry is None.") + if __name__ == "__main__": main_sync() diff --git a/examples/stop.py b/examples/stop.py index 99ccc5d..74ffdce 100644 --- a/examples/stop.py +++ b/examples/stop.py @@ -1,5 +1,3 @@ - - import onebusaway @@ -12,5 +10,6 @@ def main_sync() -> None: else: print("stop not found") + if __name__ == "__main__": main_sync() diff --git a/examples/stop_ids_for_agency.py b/examples/stop_ids_for_agency.py index dec4faa..e3071a7 100644 --- a/examples/stop_ids_for_agency.py +++ b/examples/stop_ids_for_agency.py @@ -1,13 +1,11 @@ - - import onebusaway def main_sync() -> None: client = onebusaway.OnebusawaySDK(api_key="TEST") - agency_id = "40"; + agency_id = "40" stop_ids = client.stop_ids_for_agency.list(agency_id) - if stop_ids.data: + if stop_ids.data and stop_ids.data.list is not None: for stop_id in stop_ids.data.list: print(stop_id) diff --git a/examples/trip.py b/examples/trip.py index 44c62a2..fe1cfe2 100644 --- a/examples/trip.py +++ b/examples/trip.py @@ -1,12 +1,10 @@ - - import onebusaway def main_sync() -> None: client = onebusaway.OnebusawaySDK(api_key="TEST") - trip_id = '40_608344966' + trip_id = "40_608344966" trip = client.trip.retrieve(trip_id) if trip.data and trip.data.entry: @@ -14,5 +12,6 @@ def main_sync() -> None: else: print("trip data or entry is None.") + if __name__ == "__main__": main_sync()