Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Caching #27

Open
wants to merge 32 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
eccdcfc
Get Route By ID
athuler Aug 19, 2024
e74182b
get Stop by ID implementation
athuler Aug 19, 2024
0c5e2cc
Fixed some missing route and vehicle values.
dmv1167 Sep 28, 2024
9f3d361
Simple caching system with refresh() method for systems and routes.
dmv1167 Sep 29, 2024
40ec984
Update CHANGELOG.md
athuler Sep 29, 2024
08db43d
Run Tests on Pull Requests
athuler Sep 29, 2024
57e31d0
Merge pull request #26 from athuler/athuler-pr-testing
athuler Sep 29, 2024
3bcd830
Removed use of 3rd party API
dmv1167 Sep 29, 2024
9204f02
Rudimentary caching system, needs time based implementation if user d…
dmv1167 Sep 29, 2024
19a7a06
Moved caching to separate branch
dmv1167 Sep 29, 2024
7f6b35d
Fixed get functions not caching their results
dmv1167 Sep 29, 2024
9fcd2f1
Merge branch '0.3.0' into dmv1167-dev
athuler Sep 29, 2024
3c92ece
Documentation, use of secondsSpent, remove Vehicle.getEtas()
dmv1167 Sep 29, 2024
ab48931
Fixed Stop.getNextVehicle() attempting to sort None
dmv1167 Sep 29, 2024
67efde0
Implemented casting so objects are created with correct types.
dmv1167 Sep 29, 2024
ca66a2d
Implemented casting so objects are created with correct types.
dmv1167 Sep 29, 2024
62b488c
Merge branch 'typing' of https://github.com/dmv1167/PassioGo into typing
dmv1167 Sep 29, 2024
db648c7
SystemAlert.id should be int
dmv1167 Sep 29, 2024
1902c17
Route.id actually should be int
dmv1167 Sep 29, 2024
214e1e3
Route.id cast to int
dmv1167 Sep 29, 2024
06a9b4f
returnInUTC argument added to eta methods
dmv1167 Sep 30, 2024
bf4aafd
Updated docs
dmv1167 Oct 1, 2024
e1dd21f
Merge branch '0.3.0' into typing
athuler Oct 1, 2024
31bfc6d
Stop.getNextVehicle() does not need to sort etas
dmv1167 Oct 1, 2024
38b6c59
Removed Route.getStop/VehicleById()
dmv1167 Oct 1, 2024
2831537
Merge pull request #28 from dmv1167/typing
athuler Oct 1, 2024
b1d5e3c
Moved Route.getStop/VehicleById()
dmv1167 Oct 1, 2024
e0004ae
Merge branch '0.3.0' into dmv1167-dev
athuler Oct 1, 2024
1758ed3
Fix indentation inconsistency
athuler Oct 1, 2024
aafeb65
Merge pull request #25 from dmv1167/dmv1167-dev
athuler Oct 1, 2024
3b4ca2e
Implemented dict caching for improved id lookup
dmv1167 Oct 3, 2024
e3e746f
Merged 0.3.0, gave getById() methods access to dict
dmv1167 Oct 3, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Route.id actually should be int
dmv1167 committed Sep 29, 2024
commit 1902c17486b908845f79f6e6335eb9fef4dac4a1
6 changes: 3 additions & 3 deletions passiogo/__init__.py
Original file line number Diff line number Diff line change
@@ -504,14 +504,14 @@ class Route:

def __init__(
self,
id: str,
id: int,
groupId: int = None,
groupColor: str = None,
name: str = None,
shortName: str = None,
nameOrig: str = None,
fullname: str = None,
myid: int = None,
myid: str = None,
mapApp: bool = None,
archive: bool = None,
goPrefixRouteName: bool = None,
@@ -533,7 +533,7 @@ def __init__(
self.shortName = shortName
self.nameOrig = nameOrig
self.fullname = fullname
self.myid = toIntInclNone(myid)
self.myid = myid
self.mapApp = bool(toIntInclNone(mapApp))
self.archive = bool(toIntInclNone(archive))
self.goPrefixRouteName = bool(toIntInclNone(goPrefixRouteName))