Skip to content

Commit 7c0ef70

Browse files
Merge pull request #11 from OneBusAway/release-please--branches--main--changes--next
release: 0.1.0-alpha.3
2 parents bb4d4a6 + f54ca0a commit 7c0ef70

File tree

15 files changed

+357
-19
lines changed

15 files changed

+357
-19
lines changed

.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.2"
2+
".": "0.1.0-alpha.3"
33
}

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
configured_endpoints: 13
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/open-transit%2Fopen-transit-6c051801071707e025c582891048beeb3c06d10d13c852f8401a71604b81ac5d.yml
1+
configured_endpoints: 14
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/open-transit%2Fopen-transit-44ff52d3676ae12480b775507fe3af8a229d94d6490297ad319f4e37ffef437d.yml

CHANGELOG.md

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

3+
## 0.1.0-alpha.3 (2024-07-27)
4+
5+
Full Changelog: [v0.1.0-alpha.2...v0.1.0-alpha.3](https://github.com/OneBusAway/python-sdk/compare/v0.1.0-alpha.2...v0.1.0-alpha.3)
6+
7+
### Features
8+
9+
* **api:** OpenAPI spec update via Stainless API ([#10](https://github.com/OneBusAway/python-sdk/issues/10)) ([72b1a9c](https://github.com/OneBusAway/python-sdk/commit/72b1a9cead47f18491e1119a836088e20bb0d5f4))
10+
11+
12+
### Chores
13+
14+
* **internal:** refactor release doctor script ([#12](https://github.com/OneBusAway/python-sdk/issues/12)) ([ee1f10f](https://github.com/OneBusAway/python-sdk/commit/ee1f10fc42fbda4a4df01d58636d5b6c8209fc70))
15+
* **tests:** update prism version ([#13](https://github.com/OneBusAway/python-sdk/issues/13)) ([4298ff4](https://github.com/OneBusAway/python-sdk/commit/4298ff401d952e2ed17674b59001bb5d1146ae6d))
16+
317
## 0.1.0-alpha.2 (2024-07-22)
418

519
Full Changelog: [v0.1.0-alpha.1...v0.1.0-alpha.2](https://github.com/OneBusAway/python-sdk/compare/v0.1.0-alpha.1...v0.1.0-alpha.2)

api.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,18 @@ Methods:
7676

7777
- <code title="get /api/where/stops-for-route/{routeID}.json">client.stops_for_route.<a href="./src/onebusaway/resources/stops_for_route.py">list</a>(route_id, \*\*<a href="src/onebusaway/types/stops_for_route_list_params.py">params</a>) -> <a href="./src/onebusaway/types/stops_for_route_list_response.py">StopsForRouteListResponse</a></code>
7878

79+
# Stop
80+
81+
Types:
82+
83+
```python
84+
from onebusaway.types import StopRetrieveResponse
85+
```
86+
87+
Methods:
88+
89+
- <code title="get /api/where/stop/{stopID}.json">client.stop.<a href="./src/onebusaway/resources/stop.py">retrieve</a>(stop_id) -> <a href="./src/onebusaway/types/stop_retrieve_response.py">StopRetrieveResponse</a></code>
90+
7991
# Route
8092

8193
Types:

bin/check-release-environment

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,9 @@
11
#!/usr/bin/env bash
22

3-
warnings=()
43
errors=()
54

65
if [ -z "${PYPI_TOKEN}" ]; then
7-
warnings+=("The ONEBUSAWAY_SDK_PYPI_TOKEN secret has not been set. Please set it in either this repository's secrets or your organization secrets.")
8-
fi
9-
10-
lenWarnings=${#warnings[@]}
11-
12-
if [[ lenWarnings -gt 0 ]]; then
13-
echo -e "Found the following warnings in the release environment:\n"
14-
15-
for warning in "${warnings[@]}"; do
16-
echo -e "- $warning\n"
17-
done
6+
errors+=("The ONEBUSAWAY_SDK_PYPI_TOKEN secret has not been set. Please set it in either this repository's secrets or your organization secrets.")
187
fi
198

209
lenErrors=${#errors[@]}

examples/stop.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
2+
3+
import onebusaway
4+
5+
6+
def main_sync() -> None:
7+
client = onebusaway.OnebusawaySDK(api_key="TEST")
8+
stop = client.stop.retrieve("1_75403")
9+
10+
if stop.data and stop.data.entry:
11+
print(stop.data.entry)
12+
else:
13+
print("stop not found")
14+
15+
if __name__ == "__main__":
16+
main_sync()

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "onebusaway"
3-
version = "0.1.0-alpha.2"
3+
version = "0.1.0-alpha.3"
44
description = "The official Python library for the onebusaway-sdk API"
55
dynamic = ["readme"]
66
license = "Apache-2.0"

scripts/mock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ echo "==> Starting mock server with URL ${URL}"
2121

2222
# Run prism mock on the given spec
2323
if [ "$1" == "--daemon" ]; then
24-
npm exec --package=@stoplight/prism-cli@~5.8 -- prism mock "$URL" &> .prism.log &
24+
npm exec --package=@stainless-api/[email protected].4 -- prism mock "$URL" &> .prism.log &
2525

2626
# Wait for server to come online
2727
echo -n "Waiting for server"
@@ -37,5 +37,5 @@ if [ "$1" == "--daemon" ]; then
3737

3838
echo
3939
else
40-
npm exec --package=@stoplight/prism-cli@~5.8 -- prism mock "$URL"
40+
npm exec --package=@stainless-api/[email protected].4 -- prism mock "$URL"
4141
fi

src/onebusaway/_client.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ class OnebusawaySDK(SyncAPIClient):
5252
current_time: resources.CurrentTimeResource
5353
stops_for_location: resources.StopsForLocationResource
5454
stops_for_route: resources.StopsForRouteResource
55+
stop: resources.StopResource
5556
route: resources.RouteResource
5657
arrival_and_departure: resources.ArrivalAndDepartureResource
5758
trip: resources.TripResource
@@ -121,6 +122,7 @@ def __init__(
121122
self.current_time = resources.CurrentTimeResource(self)
122123
self.stops_for_location = resources.StopsForLocationResource(self)
123124
self.stops_for_route = resources.StopsForRouteResource(self)
125+
self.stop = resources.StopResource(self)
124126
self.route = resources.RouteResource(self)
125127
self.arrival_and_departure = resources.ArrivalAndDepartureResource(self)
126128
self.trip = resources.TripResource(self)
@@ -250,6 +252,7 @@ class AsyncOnebusawaySDK(AsyncAPIClient):
250252
current_time: resources.AsyncCurrentTimeResource
251253
stops_for_location: resources.AsyncStopsForLocationResource
252254
stops_for_route: resources.AsyncStopsForRouteResource
255+
stop: resources.AsyncStopResource
253256
route: resources.AsyncRouteResource
254257
arrival_and_departure: resources.AsyncArrivalAndDepartureResource
255258
trip: resources.AsyncTripResource
@@ -319,6 +322,7 @@ def __init__(
319322
self.current_time = resources.AsyncCurrentTimeResource(self)
320323
self.stops_for_location = resources.AsyncStopsForLocationResource(self)
321324
self.stops_for_route = resources.AsyncStopsForRouteResource(self)
325+
self.stop = resources.AsyncStopResource(self)
322326
self.route = resources.AsyncRouteResource(self)
323327
self.arrival_and_departure = resources.AsyncArrivalAndDepartureResource(self)
324328
self.trip = resources.AsyncTripResource(self)
@@ -451,6 +455,7 @@ def __init__(self, client: OnebusawaySDK) -> None:
451455
self.current_time = resources.CurrentTimeResourceWithRawResponse(client.current_time)
452456
self.stops_for_location = resources.StopsForLocationResourceWithRawResponse(client.stops_for_location)
453457
self.stops_for_route = resources.StopsForRouteResourceWithRawResponse(client.stops_for_route)
458+
self.stop = resources.StopResourceWithRawResponse(client.stop)
454459
self.route = resources.RouteResourceWithRawResponse(client.route)
455460
self.arrival_and_departure = resources.ArrivalAndDepartureResourceWithRawResponse(client.arrival_and_departure)
456461
self.trip = resources.TripResourceWithRawResponse(client.trip)
@@ -469,6 +474,7 @@ def __init__(self, client: AsyncOnebusawaySDK) -> None:
469474
self.current_time = resources.AsyncCurrentTimeResourceWithRawResponse(client.current_time)
470475
self.stops_for_location = resources.AsyncStopsForLocationResourceWithRawResponse(client.stops_for_location)
471476
self.stops_for_route = resources.AsyncStopsForRouteResourceWithRawResponse(client.stops_for_route)
477+
self.stop = resources.AsyncStopResourceWithRawResponse(client.stop)
472478
self.route = resources.AsyncRouteResourceWithRawResponse(client.route)
473479
self.arrival_and_departure = resources.AsyncArrivalAndDepartureResourceWithRawResponse(
474480
client.arrival_and_departure
@@ -489,6 +495,7 @@ def __init__(self, client: OnebusawaySDK) -> None:
489495
self.current_time = resources.CurrentTimeResourceWithStreamingResponse(client.current_time)
490496
self.stops_for_location = resources.StopsForLocationResourceWithStreamingResponse(client.stops_for_location)
491497
self.stops_for_route = resources.StopsForRouteResourceWithStreamingResponse(client.stops_for_route)
498+
self.stop = resources.StopResourceWithStreamingResponse(client.stop)
492499
self.route = resources.RouteResourceWithStreamingResponse(client.route)
493500
self.arrival_and_departure = resources.ArrivalAndDepartureResourceWithStreamingResponse(
494501
client.arrival_and_departure
@@ -511,6 +518,7 @@ def __init__(self, client: AsyncOnebusawaySDK) -> None:
511518
client.stops_for_location
512519
)
513520
self.stops_for_route = resources.AsyncStopsForRouteResourceWithStreamingResponse(client.stops_for_route)
521+
self.stop = resources.AsyncStopResourceWithStreamingResponse(client.stop)
514522
self.route = resources.AsyncRouteResourceWithStreamingResponse(client.route)
515523
self.arrival_and_departure = resources.AsyncArrivalAndDepartureResourceWithStreamingResponse(
516524
client.arrival_and_departure

src/onebusaway/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

33
__title__ = "onebusaway"
4-
__version__ = "0.1.0-alpha.2" # x-release-please-version
4+
__version__ = "0.1.0-alpha.3" # x-release-please-version

0 commit comments

Comments
 (0)