grote / osm2gtfs

Turn OpenStreetMap data and schedule information into GTFS
GNU General Public License v3.0
99 stars 31 forks source link

Python3 migration #160

Open nlehuby opened 4 years ago

nlehuby commented 4 years ago

Here is a new version of osm2gtfs for python3 :tada:

The most significant changes are:

I've also fixed some python warnings on memory issues about unclosed files and split the tests into several travis jobs so it can be easy to see which one is failing. And they are all green :heavy_check_mark: :heavy_check_mark:

As the transitfeed lib has not been released yet in python3, I'm using a fork (that needs to be cloned and installed before installing osm2gtfs).

I did not cherry-picked the changes of @xamanu from #153 about the formatting to keep this PR as reviewable as possible (but I do think we should add them as soon as we have a working version of osm2gtfs for python3 on master)

pantierra commented 4 years ago

Wow, @nlehuby, this is awesome :tada: Many thanks! Please excuse the slow reply, will have a look on this soon.

jamescr commented 4 years ago

@nlehuby :clap: :clap:

I tried the PR and it works great, just requires a little change in two line to add binary mode on read/write operations. Also I made some improvements related with installing the forked transitfeed module from git. I'll made PR with this changes to @Jungle-bus repo for her consideration.

nlehuby commented 4 years ago

Thanks for these improvements @jamescr , I've updated the PR :+1:

Does anyone want to have a look ?

prhod commented 4 years ago

I've made a quick review, and I don't have any comment :+1: ( but I don't feel relevant enough to approve ) Great work !

amenk commented 1 year ago

I guess it would be nice if this can be reviewed / merged :-)

@xamanu ?

pantierra commented 1 year ago

Thanks for the input, @amenk. Unfortunately, I am totally out of the context. Feel free to proceed without me.

amenk commented 1 year ago

Looks good basically :-)

But: No clue if that is related to the Python3 port, but we are using this in a GitHub action which autocommits the GTFS and the fields in the .txt files change their order seemingly randomly on each run. I did not notice this when we were still on Python 2

Example: https://github.com/AddisMap/AddisMapTransit-gtfs/commit/f8666c5fbff865158dcf5ad9c66eaaecbe64e6d3

Can have a totally unrelated reason or maybe it is even like this before the upgrade, but we did not notice it before. Just wanted to mention it. Also it's a very niche issue so it still could be merged :-)

bayar0206 commented 4 months ago

Can this be Merged?