mie-lab / trackintel

trackintel is a framework for spatio-temporal analysis of movement trajectory and mobility data.
MIT License
199 stars 50 forks source link

ENH: change copy direction for Positionfixes docstrings #538

Closed bifbof closed 12 months ago

bifbof commented 12 months ago

(This PR should not be reviewed before #537, as the changes are also included here)

Still trying to fix the circular imports for #535. The problem here is with @_copy_docstrings. For this function we import code from all I/O modules. This creates the following circular import:io/file.py imports Positionfixes to return them as value, but Positionfixes already imports code from io/file.py to copy the docstring in @_copy_docstring. To fix this, this PR includes the following changes:

I have only included the changes for Positionfixes so as not to make this PR too large. The other classes will follow in another PR.

codecov[bot] commented 12 months ago

Codecov Report

Patch coverage: 97.67% and project coverage change: -0.07% :warning:

Comparison is base (93ad546) 93.35% compared to head (1c2697d) 93.29%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #538 +/- ## ========================================== - Coverage 93.35% 93.29% -0.07% ========================================== Files 33 32 -1 Lines 2136 2161 +25 Branches 410 422 +12 ========================================== + Hits 1994 2016 +22 - Misses 129 130 +1 - Partials 13 15 +2 ``` | [Files Changed](https://app.codecov.io/gh/mie-lab/trackintel/pull/538?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mie-lab) | Coverage Δ | | |---|---|---| | [trackintel/preprocessing/staypoints.py](https://app.codecov.io/gh/mie-lab/trackintel/pull/538?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mie-lab#diff-dHJhY2tpbnRlbC9wcmVwcm9jZXNzaW5nL3N0YXlwb2ludHMucHk=) | `99.08% <ø> (ø)` | | | [trackintel/model/util.py](https://app.codecov.io/gh/mie-lab/trackintel/pull/538?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mie-lab#diff-dHJhY2tpbnRlbC9tb2RlbC91dGlsLnB5) | `96.84% <87.50%> (-3.16%)` | :arrow_down: | | [trackintel/analysis/labelling.py](https://app.codecov.io/gh/mie-lab/trackintel/pull/538?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mie-lab#diff-dHJhY2tpbnRlbC9hbmFseXNpcy9sYWJlbGxpbmcucHk=) | `96.77% <100.00%> (ø)` | | | [trackintel/geogr/\_\_init\_\_.py](https://app.codecov.io/gh/mie-lab/trackintel/pull/538?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mie-lab#diff-dHJhY2tpbnRlbC9nZW9nci9fX2luaXRfXy5weQ==) | `100.00% <100.00%> (ø)` | | | [trackintel/geogr/distances.py](https://app.codecov.io/gh/mie-lab/trackintel/pull/538?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mie-lab#diff-dHJhY2tpbnRlbC9nZW9nci9kaXN0YW5jZXMucHk=) | `96.71% <100.00%> (+2.20%)` | :arrow_up: | | [trackintel/io/file.py](https://app.codecov.io/gh/mie-lab/trackintel/pull/538?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mie-lab#diff-dHJhY2tpbnRlbC9pby9maWxlLnB5) | `100.00% <100.00%> (ø)` | | | [trackintel/io/postgis.py](https://app.codecov.io/gh/mie-lab/trackintel/pull/538?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mie-lab#diff-dHJhY2tpbnRlbC9pby9wb3N0Z2lzLnB5) | `96.11% <100.00%> (+0.03%)` | :arrow_up: | | [trackintel/model/positionfixes.py](https://app.codecov.io/gh/mie-lab/trackintel/pull/538?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mie-lab#diff-dHJhY2tpbnRlbC9tb2RlbC9wb3NpdGlvbmZpeGVzLnB5) | `100.00% <100.00%> (ø)` | | | [trackintel/model/triplegs.py](https://app.codecov.io/gh/mie-lab/trackintel/pull/538?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mie-lab#diff-dHJhY2tpbnRlbC9tb2RlbC90cmlwbGVncy5weQ==) | `100.00% <100.00%> (ø)` | | | [trackintel/preprocessing/positionfixes.py](https://app.codecov.io/gh/mie-lab/trackintel/pull/538?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mie-lab#diff-dHJhY2tpbnRlbC9wcmVwcm9jZXNzaW5nL3Bvc2l0aW9uZml4ZXMucHk=) | `98.83% <100.00%> (+0.02%)` | :arrow_up: | | ... and [1 more](https://app.codecov.io/gh/mie-lab/trackintel/pull/538?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mie-lab) | |

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

bifbof commented 12 months ago

Will reopen this PR after #538 and #539 went through, like this it makes no sense.