-
Notifications
You must be signed in to change notification settings - Fork 54
ENH: Add subclassing for trips #518
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
Conversation
for more information, see https://pre-commit.ci
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #518 +/- ##
==========================================
+ Coverage 93.05% 93.31% +0.25%
==========================================
Files 34 34
Lines 2074 2153 +79
Branches 388 409 +21
==========================================
+ Hits 1930 2009 +79
Misses 130 130
Partials 14 14
☔ View full report in Codecov by Sentry. |
NinaWie
left a comment
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.
I had a look, thanks for the great work on this complicated issue due to the DataFrame / GeoDataFrame fallbacks. In response to your comment, I would still prefer to have a dedicated class Trips, so that the user does not need to care about the dataframe / geodataframe stuff. Some of my comments are related to this. Before changing everything to having a Trips class, I would however wait whether @hongyeehh or @henrymartin1 agree to that.
NinaWie
left a comment
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.
Thanks for the explanations and changes, from my side, it is fine now :)
hongyeehh
left a comment
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.
Thanks for the additional explanation. This is also ready from my side. Great effort!
Adding the Trips classes to trackintel.
I changed the accessor to the
tripsfunction to create either theTripsDataFrameorTripsGeoDataFrameclass, depending on whether ageocolumnis present or not.When I implemented these changes, I sometimes thought it would be easier to implement a single class, aka a
Tripsclass with no fallback mechanism, as Nina suggested in a meeting. So that it remains aTripsclass even if it loses the geometry column. I would be open to discuss if this alternative implementation would be more appropriate.In another PR, I should add documentation explaining this split into two classes and the complicated fallback pattern.