datalad / datalad-extension-template

Minimal implementation of a DataLad extension module
http://datalad.org
Other
2 stars 17 forks source link

Retire requirements_devel #89

Closed mslw closed 10 months ago

mslw commented 11 months ago

There is requirements-devel.txt:

pytest
pytest-cov
coverage
sphinx
sphinx_rtd_theme

but also setup.cfg:

[options.extras_require]
# this matches the name used by -core and what is expected by some CI setups
devel =
    pytest
    pytest-cov
    coverage
    sphinx
    sphinx_rtd_theme
devel-utils =
    pytest-xdist
    scriv

The requirements-devel.txt file is used in appveyor and github workflow:

❱ git grep requirements-devel
.appveyor.yml:  - python -m pip install -r requirements-devel.txt
.github/workflows/docbuild.yml:        pip install -r requirements-devel.txt
.github/workflows/test_crippledfs.yml:        pip install -r requirements-devel.txt
.readthedocs.yaml:    - requirements: requirements-devel.txt
docs/README.md:pip install -r requirements-devel.txt

The only place where it kind of makes a difference is that test_crippledfs currently splits installation of requirements and installation of package into separate steps.

I think requirements-devel.txt feels like legacy, and its usage can be removed in favour of pip install .[devel].

adswa commented 11 months ago

I think requirements-devel.txt feels like legacy, and its usage can be removed in favour of pip install .[devel].

Although I personally use requirements-devel.txt frequently, I don't mind changing to pip install .[devel] (provided documentation helps me remember). I couldn't find anything about requirements-devel.txt files being legacy, though, the pip docs talk about "other requirements files" https://pip.pypa.io/en/stable/reference/requirements-file-format/

mslw commented 11 months ago

I couldn't find anything about requirements-devel.txt files being legacy, though, the pip docs talk about "other requirements files" https://pip.pypa.io/en/stable/reference/requirements-file-format/

Okay, that was not the right phrasing from my side. I have a feeling, perhaps incorrect, that there is a tendency to move towards declarations in setup.cfg.

I guess the main issue for me is that the information about optional dependencies is now duplicated.

mih commented 11 months ago

A removal of this file would require changing approach in many places.

Duplication of dependencies is a choice made in the template, and is not an implication. See https://github.com/datalad/datalad-next/blob/main/requirements-devel.txt for an example.

mslw commented 10 months ago

Thanks for the comments.

Regarding RTD docs (mentioned in the requirements file linked above), RTD configuration file allows requirements files (like requirements_devel) or extra requirements (like devel or docs). Either way, I agree that it is a choice.

I think the conclusion is that the usage of requirements_devel is a choice that we continue to make, and we keep using the file in CI and doc build.