thomersch / openstreetmap-calendar

osmcal, a Collaborative Calendar for OpenStreetMap-related Events
https://osmcal.org
Apache License 2.0
33 stars 9 forks source link

Replace `timezonefinder` with `tzfpy` #176

Open mvexel opened 2 months ago

mvexel commented 2 months ago

There's some advantages of tzfpy to timezonefinder. tzfpy uses tzf under the hood, so it introduces no python dependencies such as numpy. It's faster, in particular close to TZ boundaries. It has a very similar API for the simple purposes this project requires. Also timezonefinder is looking for a new maintainer, so this is hedging against that project becoming unmaintained.

I applied black formatting to the files I touched, but happy to comply with whatever code hygiene standards you have.

Thanks for considering.

thomersch commented 2 months ago

I applied black formatting to the files I touched, but happy to comply with whatever code hygiene standards you have.

Perfect! CI actually tests for black formatting and it complains about two files: https://github.com/thomersch/openstreetmap-calendar/actions/runs/9899099646/job/27347358399

Not sure why that's the case, maybe a different config?

timezonefinder is looking for a new maintainer, so this is hedging against that project becoming unmaintained.

Phew, yeah… the dependencies are slowly getting stale.

I am a little bit conflicted about tzfpy: It would be nice to move to a package that gets more attention, but on the other hand it introduces a dependency on Rust and it's a fairly niche repo – or is it just my own paranoia?

Have you by any chance verified that it works with the manual time zone selection in the event creation/edit form? (It probably does, but I remember having inconsistencies with time zone names coming from the operating system db)

ringsaturn commented 2 months ago

Thanks for interested in tzfpy. It's true that it's not a polular project compared with timezonefinder since it was created to solve timezonefinder's performance issues instead of basic feature issues. And I believe only a few projects will face the performance issues.

By the way, Rust is not required unless wheel files are missing for the python verison and platform.

mvexel commented 1 month ago

Thanks @ringsaturn for participating here.

Have you by any chance verified that it works with the manual time zone selection in the event creation/edit form? (It probably does, but I remember having inconsistencies with time zone names coming from the operating system db)

I have not. Whenever I get a chance..

Strange, those black errors. Isn't black supposed to be "no-config"? :)