-
Notifications
You must be signed in to change notification settings - Fork 31
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
WIP: Data structure 2.0 #96
Conversation
The CI pipeline will fail, because of an error risen by pylint is related to attr.s and can not be fixed: python-attrs/attrs#215 |
@nlehuby and @prhod, may I request your help on this one? This is a wonderful but deep change and I think it will be difficult to finalize it without your support. Status on Accra:
Status on Fenix:
Status on Nicaragua:
|
I changed the cache file names a bit, so this PR can coexists with caching with the old version (before this PR). No need to delete cached files. |
Working on Fenix with the new data structure and to improve the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The shape_id is different with this new version, this may explain partly the size difference.
osm2gtfs/core/routes.py
Outdated
self.name = self.tags['name'] | ||
|
||
if "colour" in self.tags: | ||
self.route_color = OsmConnector.get_hex_code_for_color( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you need to import OsmConnector from osm2gtfs.core.osm_connector
trip_gtfs.shape_id = TripsCreator.add_shape( | ||
schedule, a_route_ref, a_route) | ||
feed, a_route.route_id, a_route) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you need to replace a_route.route.id
by a_route.osm_id
to keep the shape_id identical.
@@ -100,8 +100,8 @@ def test_refresh_routes_cache(self): | |||
self.assertEqual(len(routes), 277, 'Wrong count of routes in the cache file') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you need to change the name of the cache file here too (routes-accra
to accra-routes
)
@@ -117,32 +117,32 @@ def test_refresh_stops_cache(self): | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here
Thanks for the review, @nlehuby. I adjusted the things you mentioned. The whole state is currently still moveing in things from the other branch and make it fit together. Probably you want to wait, until we got it to a stage where we are more confident asking you for help again. |
Author: Felix Delattre <[email protected]>
I will close this PR, as it is still not ready, yet, and I don't want to spam you (more) with push notifications. We will re-open, once we are in a shape that we would kindly ask for a review. Thanks. In case you want to support the ongoing development please have a look on this branch: https://github.com/mapanica/osm2gtfs/tree/data-structure-rebased |
This is a new pull request for the overhauled data structure #30 with a lot of wonderful work by @AltNico
It is similar to #89 (closing now), but rebased on #91, which seems to be the next to get in.