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

bahn_v2 converter: new type BIKE_PARKING_LOCKED #156

Closed
the-infinity opened this issue Oct 29, 2024 · 4 comments
Closed

bahn_v2 converter: new type BIKE_PARKING_LOCKED #156

the-infinity opened this issue Oct 29, 2024 · 4 comments

Comments

@the-infinity
Copy link
Contributor

It seems that Bahn API was updates and now has a new capacity called BIKE_PARKING_LOCKED.

We should have a look if ...

a) add this to our enumeration
b) maybe add this as a new bike source?

Data dump should be generated if decision was done

@AbdullahiFatola
Copy link
Collaborator

AbdullahiFatola commented Nov 18, 2024

Now it seems the API has 2 bike capacity types BIKE_PARKING_LOCKED and BIKE_PARKING_OPEN.

@the-infinity My understanding of your first point;
If we add the 2 new capacity-types to our enumeration, that would mean we need another field/attribute to identify the Parking Site as not only for Cars but also for Bikes. In my opinion, that would have made alot of sense if purpose were to be an array [CAR, BIKE] and type also an array [OFF_STREET_PARKING_GROUND, UNDERGROUND, CARPARK, LOCKBOX].
...or do you have other ways of implementing the enumeration?

Otherwise, I would prefer your second point to add this as a new bike source. According to the API Documentation, they now make available the information on Bike Parking, as in the screenshot below. Perhaps in the future they might add more information/attributes on Bike parking.

I also have the question on when and how we should generate data dump?

image

@the-infinity
Copy link
Contributor Author

The first point is mostly about adding it there: https://github.com/ParkenDD/parkapi-sources-v3/blob/main/src/parkapi_sources/converters/bahn_v2/validators.py#L35 , because otherwise the whole datasets gets rejected. This has to be done anyway. The interesting point comes afterwards: what should we do with these values?

As ParkingSites just have one capacity, you cannot just make type to an enumeration, because it will break any idea of "this parking site has a capacity of 10 places for cars". This is why ParkingSiteGroup exists: there you can say: "ok, we have this ParkingSiteGroup, and it has one ParkingSite with purpose CAR and a capacity of 10, and another ParkingSite with purpose BIKE and a capacity of 50. Same with type: you always have a capacity per type.

@AbdullahiFatola
Copy link
Collaborator

The PR is now opened, kindly review, thanks!

@the-infinity
Copy link
Contributor Author

Implemented with version 0.16.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants