francoisfds / BikeSharingHub

Shared bikes for Android
GNU General Public License v3.0
18 stars 10 forks source link

Some unavailable stations aren't marked as such #66

Closed Altonss closed 1 month ago

Altonss commented 2 months ago

For example Saint-Jacques - Val de Grâce, Vélib (Paris).

francoisfds commented 2 months ago

Hello @Altonss,

Thank you for noticing this ! Currently the stations are marked as closed depending of some pybikes extra field if they exist (like status, open, installed...) otherwise if both bikes and slots are 0 (like for velib).

After looking at some cases like "Saint-Jacques - Val de Grâce", I noticed that there are two other extra fields (inherited from GBFS) that are not yet used in BikeSharingHub : is_renting and is_returning. If one of them is 0 then the stations must be marked as closed (I assume there's no need to distinguish them).

This improvement will be out soon !

Thanks again, François

Altonss commented 2 months ago

After looking at some cases like "Saint-Jacques - Val de Grâce", I noticed that there are two other extra fields (inherited from GBFS) that are not yet used in BikeSharingHub : is_renting and is_returning. If one of them is 0 then the stations must be marked as closed (I assume there's no need to distinguish them).

I saw those fields too! Both fields are at 0 in this case, and maybe just to be sure we can only mark as closed if both renting and returning are not available?

francoisfds commented 2 months ago

It would be wrong because as far as I know the content of extra is not deterministic in pybikes. It gathers some extra info that not all networks has (is_renting is mandatory in GBFS but not all networks uses GBFS). See for example system "BUGA" (city of Aveiro) : is_renting is not available in extra (instead there is online), so we could not rely on the non availability of this field.

Altonss commented 2 months ago

I see, you're right :)

francoisfds commented 1 month ago

Changes are out in version 2.1.2.

Altonss commented 1 month ago

Changes are out in version 2.1.2.

Thanks a lot!