pytroll / satpy

Python package for earth-observing satellite data processing
http://satpy.readthedocs.org/en/latest/
GNU General Public License v3.0
1.06k stars 292 forks source link

Update docs for Developer's Guide, add dev-key for dependency install… #2825

Closed sjoro closed 2 months ago

sjoro commented 3 months ago

This PR fixes documentation under "Developer's Guide" by introducing new dependency group devin pyproject.toml-file and updating the docs accordingly.

Old documentation instructed the user to run pip install -e ".[all]", which only results to a warning as dependency key all does not exist in pyproject.toml-file.

codecov[bot] commented 3 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 95.94%. Comparing base (3c7938c) to head (25d09b8). Report is 25 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #2825 +/- ## ======================================= Coverage 95.94% 95.94% ======================================= Files 366 366 Lines 53504 53504 ======================================= Hits 51332 51332 Misses 2172 2172 ``` | [Flag](https://app.codecov.io/gh/pytroll/satpy/pull/2825/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pytroll) | Coverage Δ | | |---|---|---| | [behaviourtests](https://app.codecov.io/gh/pytroll/satpy/pull/2825/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pytroll) | `4.04% <ø> (ø)` | | | [unittests](https://app.codecov.io/gh/pytroll/satpy/pull/2825/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pytroll) | `96.03% <ø> (ø)` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pytroll#carryforward-flags-in-the-pull-request-comment) to find out more.

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

coveralls commented 3 months ago

Pull Request Test Coverage Report for Build 9515364672

Details


Totals Coverage Status
Change from base Build 9513521871: 0.0%
Covered Lines: 51561
Relevant Lines: 53687

💛 - Coveralls
djhoese commented 3 months ago

Did you come up with this idea of listing satpy as a dependency of itself or is this recommended by some documentation?

sjoro commented 3 months ago

@djhoese not sure what you refer to? this one dev = ["satpy[doc,tests]"]?

djhoese commented 3 months ago

Yes that. I've never seen a project reference itself as a dependency.

sjoro commented 3 months ago

it should not be a satpy-dependency (maybe i have misunderstood something then), but this notation in toml, according to what i found online (stackoverflow), is to bind two dependency groups into to one so that pip install -e ".[dev]" installs the dependecies for doc and tests. https://stackoverflow.com/questions/75490231/pip-pyproject-toml-can-optional-dependency-groups-require-other-optional-depend

sjoro commented 3 months ago

what i would like to achieve here is to have a straight forward way to install a dev dependencies, which to me essentially are the docsand tests dependency groups. if the notation is wrong, i can just update the docs and instruct to install doc and tests dependencies and leave the toml-file untouched.

djhoese commented 3 months ago

Ok it looks like this is supported in modern versions of pip. I found this thread:

https://discuss.python.org/t/pyproject-toml-optional-dependencies-redundancy-aka-dry-extras/8428/5

And the last 3 comments talk about recursion/inconsistency issues but reference a filed github issue:

https://github.com/pypa/pip/issues/10393

Where it is pointed out that this syntax is supported. That is good enough for me.