Skip to content

Commit c3cfe74

Browse files
Merge pull request #49 from OneBusAway/release-please--branches--main--changes--next
release: 0.1.0-alpha.12
2 parents c58e171 + 0340bdb commit c3cfe74

40 files changed

Lines changed: 1724 additions & 133 deletions

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "0.1.0-alpha.11"
2+
".": "0.1.0-alpha.12"
33
}

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
configured_endpoints: 17
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/open-transit%2Fopen-transit-e1da29690ebfb4c6c07ede3d292a4f6babcd2202d6f3bb38bfa287ae04dfeb50.yml
1+
configured_endpoints: 21
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/open-transit%2Fopen-transit-681949f64ed7ba8d43a08daba3e5dfcee447cecc48a0a03fcf2aedef3b656641.yml

CHANGELOG.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,27 @@
11
# Changelog
22

3+
## 0.1.0-alpha.12 (2024-08-08)
4+
5+
Full Changelog: [v0.1.0-alpha.11...v0.1.0-alpha.12](https://github.com/OneBusAway/python-sdk/compare/v0.1.0-alpha.11...v0.1.0-alpha.12)
6+
7+
### Features
8+
9+
* **api:** OpenAPI spec update via Stainless API ([#48](https://github.com/OneBusAway/python-sdk/issues/48)) ([a5c305c](https://github.com/OneBusAway/python-sdk/commit/a5c305c7a5614588dd3fb14607dd2489aab8b3c6))
10+
* **api:** OpenAPI spec update via Stainless API ([#55](https://github.com/OneBusAway/python-sdk/issues/55)) ([9adae4d](https://github.com/OneBusAway/python-sdk/commit/9adae4de96b8ea11ff8e2d7c251183580f86cf8a))
11+
* **api:** OpenAPI spec update via Stainless API ([#56](https://github.com/OneBusAway/python-sdk/issues/56)) ([1882cdc](https://github.com/OneBusAway/python-sdk/commit/1882cdc8a4da9705c853ed6f5d5e8d73a4b9276c))
12+
* **api:** OpenAPI spec update via Stainless API ([#57](https://github.com/OneBusAway/python-sdk/issues/57)) ([5c8a7ee](https://github.com/OneBusAway/python-sdk/commit/5c8a7ee00dcd4ab6a3a9b6800fe10f7447d79c61))
13+
* **api:** OpenAPI spec update via Stainless API ([#58](https://github.com/OneBusAway/python-sdk/issues/58)) ([29edb45](https://github.com/OneBusAway/python-sdk/commit/29edb45798ad111a1a4f6ce5bbbbadfe3e9099d8))
14+
* **client:** add `retry_count` to raw response class ([#51](https://github.com/OneBusAway/python-sdk/issues/51)) ([97156e5](https://github.com/OneBusAway/python-sdk/commit/97156e5dff5d743d04ecc0dbe73ec7c690dfb4fe))
15+
16+
17+
### Chores
18+
19+
* **internal:** bump pyright ([#50](https://github.com/OneBusAway/python-sdk/issues/50)) ([6d1fdf7](https://github.com/OneBusAway/python-sdk/commit/6d1fdf78cf6d63079bf037b88ac0540e619f9ae7))
20+
* **internal:** bump ruff version ([#53](https://github.com/OneBusAway/python-sdk/issues/53)) ([c8cbc6a](https://github.com/OneBusAway/python-sdk/commit/c8cbc6a1e48e42b15e42ebf40cdfd2f8fc0bc7ab))
21+
* **internal:** remove deprecated ruff config ([#59](https://github.com/OneBusAway/python-sdk/issues/59)) ([a6413af](https://github.com/OneBusAway/python-sdk/commit/a6413af808c1ea04d05a46fa0a5d54ec888999bf))
22+
* **internal:** test updates ([#52](https://github.com/OneBusAway/python-sdk/issues/52)) ([f3b7cb0](https://github.com/OneBusAway/python-sdk/commit/f3b7cb00c4302b0ac1b8497835f2db0d3f9e7949))
23+
* **internal:** update pydantic compat helper function ([#54](https://github.com/OneBusAway/python-sdk/issues/54)) ([1f501f0](https://github.com/OneBusAway/python-sdk/commit/1f501f0592c92e86c4c027f652a49ff11a068715))
24+
325
## 0.1.0-alpha.11 (2024-08-01)
426

527
Full Changelog: [v0.1.0-alpha.10...v0.1.0-alpha.11](https://github.com/OneBusAway/python-sdk/compare/v0.1.0-alpha.10...v0.1.0-alpha.11)

api.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,54 @@ Methods:
136136

137137
- <code title="get /api/where/route/{routeID}.json">client.route.<a href="./src/onebusaway/resources/route.py">retrieve</a>(route_id) -> <a href="./src/onebusaway/types/route_retrieve_response.py">RouteRetrieveResponse</a></code>
138138

139+
# RouteIDsForAgency
140+
141+
Types:
142+
143+
```python
144+
from onebusaway.types import RouteIDsForAgencyListResponse
145+
```
146+
147+
Methods:
148+
149+
- <code title="get /api/where/route-ids-for-agency/{agencyID}.json">client.route_ids_for_agency.<a href="./src/onebusaway/resources/route_ids_for_agency.py">list</a>(agency_id) -> <a href="./src/onebusaway/types/route_ids_for_agency_list_response.py">RouteIDsForAgencyListResponse</a></code>
150+
151+
# RoutesForLocation
152+
153+
Types:
154+
155+
```python
156+
from onebusaway.types import RoutesForLocationRetrieveResponse
157+
```
158+
159+
Methods:
160+
161+
- <code title="get /api/where/routes-for-location.json">client.routes_for_location.<a href="./src/onebusaway/resources/routes_for_location.py">retrieve</a>(\*\*<a href="src/onebusaway/types/routes_for_location_retrieve_params.py">params</a>) -> <a href="./src/onebusaway/types/routes_for_location_retrieve_response.py">RoutesForLocationRetrieveResponse</a></code>
162+
163+
# RoutesForAgency
164+
165+
Types:
166+
167+
```python
168+
from onebusaway.types import RoutesForAgencyListResponse
169+
```
170+
171+
Methods:
172+
173+
- <code title="get /api/where/routes-for-agency/{agencyID}.json">client.routes_for_agency.<a href="./src/onebusaway/resources/routes_for_agency.py">list</a>(agency_id) -> <a href="./src/onebusaway/types/routes_for_agency_list_response.py">RoutesForAgencyListResponse</a></code>
174+
175+
# ScheduleForRoute
176+
177+
Types:
178+
179+
```python
180+
from onebusaway.types import ScheduleForRouteRetrieveResponse
181+
```
182+
183+
Methods:
184+
185+
- <code title="get /api/where/schedule-for-route/{routeID}.json">client.schedule_for_route.<a href="./src/onebusaway/resources/schedule_for_route.py">retrieve</a>(route_id, \*\*<a href="src/onebusaway/types/schedule_for_route_retrieve_params.py">params</a>) -> <a href="./src/onebusaway/types/schedule_for_route_retrieve_response.py">ScheduleForRouteRetrieveResponse</a></code>
186+
139187
# ArrivalAndDeparture
140188

141189
Types:

examples/routes_for_agency.py

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
from pprint import pprint
2+
3+
from helpers.load_env import load_settings
4+
5+
from onebusaway import OnebusawaySDK
6+
7+
# Load settings from .env file, if it exists. If not, we'll use the
8+
# Puget Sound server URL (which is also the default in the SDK) and
9+
# the 'TEST' API key.
10+
settings = load_settings(
11+
{
12+
"api_key": "TEST",
13+
"base_url": "https://api.pugetsound.onebusaway.org/",
14+
}
15+
)
16+
17+
# Create a new instance of the OneBusAway SDK with the settings we loaded.
18+
oba = OnebusawaySDK(**settings)
19+
20+
agency_id = "40"
21+
response = oba.routes_for_agency.list(agency_id)
22+
23+
if response and response.data:
24+
pprint(response.data)

examples/routes_ids_for_agency.py

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
from helpers.load_env import load_settings
2+
3+
from onebusaway import OnebusawaySDK
4+
5+
# Load settings from .env file, if it exists. If not, we'll use the
6+
# Puget Sound server URL (which is also the default in the SDK) and
7+
# the 'TEST' API key.
8+
settings = load_settings(
9+
{
10+
"api_key": "TEST",
11+
"base_url": "https://api.pugetsound.onebusaway.org/",
12+
}
13+
)
14+
15+
# Create a new instance of the OneBusAway SDK with the settings we loaded.
16+
oba = OnebusawaySDK(**settings)
17+
18+
agency_id = "40" # Link Light Rail in the Seattle area.
19+
20+
route_ids = oba.route_ids_for_agency.list(agency_id)
21+
if route_ids.data and route_ids.data.list:
22+
for route_id in route_ids.data.list:
23+
print(route_id)

examples/schedule_for_route.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
from helpers.load_env import load_settings
2+
3+
from onebusaway import OnebusawaySDK
4+
5+
# Load settings from .env file, if it exists. If not, we'll use the
6+
# Puget Sound server URL (which is also the default in the SDK) and
7+
# the 'TEST' API key.
8+
settings = load_settings(
9+
{
10+
"api_key": "TEST",
11+
"base_url": "https://api.pugetsound.onebusaway.org/",
12+
}
13+
)
14+
15+
# Create a new instance of the OneBusAway SDK with the settings we loaded.
16+
oba = OnebusawaySDK(**settings)
17+
18+
route_id = "1_100224"
19+
response = oba.schedule_for_route.retrieve(route_id)
20+
if response and response.data:
21+
print(response.data.entry.stop_trip_groupings[0])

pyproject.toml

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "onebusaway"
3-
version = "0.1.0-alpha.11"
3+
version = "0.1.0-alpha.12"
44
description = "The official Python library for the onebusaway-sdk API"
55
dynamic = ["readme"]
66
license = "Apache-2.0"
@@ -77,8 +77,8 @@ format = { chain = [
7777
"check:ruff",
7878
"typecheck",
7979
]}
80-
"check:ruff" = "ruff ."
81-
"fix:ruff" = "ruff --fix ."
80+
"check:ruff" = "ruff check ."
81+
"fix:ruff" = "ruff check --fix ."
8282

8383
typecheck = { chain = [
8484
"typecheck:pyright",
@@ -162,6 +162,11 @@ reportPrivateUsage = false
162162
line-length = 120
163163
output-format = "grouped"
164164
target-version = "py37"
165+
166+
[tool.ruff.format]
167+
docstring-code-format = true
168+
169+
[tool.ruff.lint]
165170
select = [
166171
# isort
167172
"I",
@@ -190,10 +195,6 @@ unfixable = [
190195
"T201",
191196
"T203",
192197
]
193-
ignore-init-module-imports = true
194-
195-
[tool.ruff.format]
196-
docstring-code-format = true
197198

198199
[tool.ruff.lint.flake8-tidy-imports.banned-api]
199200
"functools.lru_cache".msg = "This function does not retain type information for the wrapped function's arguments; The `lru_cache` function from `_utils` should be used instead"
@@ -205,7 +206,7 @@ combine-as-imports = true
205206
extra-standard-library = ["typing_extensions"]
206207
known-first-party = ["onebusaway", "tests"]
207208

208-
[tool.ruff.per-file-ignores]
209+
[tool.ruff.lint.per-file-ignores]
209210
"bin/**.py" = ["T201", "T203"]
210211
"scripts/**.py" = ["T201", "T203"]
211212
"tests/**.py" = ["T201", "T203"]

requirements-dev.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ pydantic-core==2.18.2
7171
# via pydantic
7272
pygments==2.18.0
7373
# via rich
74-
pyright==1.1.364
74+
pyright==1.1.374
7575
pytest==7.1.1
7676
# via pytest-asyncio
7777
pytest-asyncio==0.21.1
@@ -81,7 +81,7 @@ pytz==2023.3.post1
8181
# via dirty-equals
8282
respx==0.20.2
8383
rich==13.7.1
84-
ruff==0.1.9
84+
ruff==0.5.6
8585
setuptools==68.2.2
8686
# via nodeenv
8787
six==1.16.0

0 commit comments

Comments
 (0)