Skip to content
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

ENH: remove caching in DataFrame accessors #505

Merged
merged 3 commits into from
Aug 10, 2023

Conversation

bifbof
Copy link
Collaborator

@bifbof bifbof commented Aug 10, 2023

We agreed to remove caching for DataFrame accessors to allow subtyping, as suggested in #490.
This creates overhead every time we call .as_xyz, but also provides more security since the model is now truly assured every time we use it this way.
It was necessary to adjust some tests so that they do not violate the trackintel models.

@codecov
Copy link

codecov bot commented Aug 10, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.06% 🎉

Comparison is base (2371b04) 92.47% compared to head (443644a) 92.53%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #505      +/-   ##
==========================================
+ Coverage   92.47%   92.53%   +0.06%     
==========================================
  Files          39       39              
  Lines        2019     2036      +17     
  Branches      344      346       +2     
==========================================
+ Hits         1867     1884      +17     
  Misses        133      133              
  Partials       19       19              
Files Changed Coverage Δ
trackintel/model/locations.py 100.00% <100.00%> (ø)
trackintel/model/positionfixes.py 100.00% <100.00%> (ø)
trackintel/model/staypoints.py 100.00% <100.00%> (ø)
trackintel/model/tours.py 90.00% <100.00%> (+0.52%) ⬆️
trackintel/model/triplegs.py 100.00% <100.00%> (ø)
trackintel/model/trips.py 100.00% <100.00%> (ø)
trackintel/model/util.py 100.00% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@hongyeehh hongyeehh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice and neat, thanks!

@hongyeehh hongyeehh merged commit a0e9891 into mie-lab:master Aug 10, 2023
7 checks passed
@bifbof bifbof deleted the rem_caching branch August 10, 2023 12:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants