Skip to content

Move testing dependencies to setup.cfg #108

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

Merged
merged 1 commit into from
Apr 4, 2023

Conversation

ajnelson-nist
Copy link
Member

See patch 1 for description of the patch series.

This patch moves the packages listed in `tests/requirements.txt` into
`setup.cfg`.

This is done to:

* Reduce complexity of downstream projects that wish to inherit testing
  dependencies.  E.g. currently the `tests/requirements.txt` file is
  loaded via incorporating `case-utils` as a submodule in at least two
  projects (`case_exiftool`, `case_gnu_time`).
* Expose test requirements for supply-chain review via package metadata.

The feature name is for the test requirements is `testing`, inheriting
the name from Python's `setuptools`.

This feature is added knowing that, once added, it should not be
removed, per this best practice in the PyPA guidance:

> Best practice: if a project ends up no longer needing any other
> packages to support a feature, it should keep an empty requirements
> list for that feature in its extras_require argument, so that packages
> depending on that feature don’t break (due to an invalid feature
> name).

There were no effects observed on Make-managed files.

References:
* https://github.com/casework/CASE-Implementation-ExifTool/blob/0.5.0/tests/Makefile#L43-L45
* https://github.com/casework/CASE-Implementation-GNU-Time/blob/0.7.0/tests/Makefile#L56-L58
* https://github.com/pypa/setuptools/blob/v67.6.1/setup.cfg#L42
* https://setuptools.pypa.io/en/latest/userguide/dependency_management.html#optional-dependencies

Signed-off-by: Alex Nelson <[email protected]>
@ajnelson-nist ajnelson-nist added this to the 0.11.0 milestone Apr 4, 2023
@ajnelson-nist ajnelson-nist marked this pull request as ready for review April 4, 2023 17:55
@ajnelson-nist ajnelson-nist requested a review from a team as a code owner April 4, 2023 17:55
@kchason kchason merged commit 3a7bc91 into develop Apr 4, 2023
@kchason kchason deleted the move_testing_dependencies_to_setup_cfg branch April 4, 2023 20:47
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