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
Test the consistency of requirements defined in different locations #1500
Test the consistency of requirements defined in different locations #1500
Conversation
This would have a structure like: requirements["build"]["requirements/build.txt"] which would contain a set of the requirements strings. Experimental, so I'm not sure if I'm going to use this.
Codecov Report
@@ Coverage Diff @@
## main #1500 +/- ##
==========================================
- Coverage 97.23% 97.22% -0.01%
==========================================
Files 84 84
Lines 8016 8000 -16
==========================================
- Hits 7794 7778 -16
Misses 222 222
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
This is to resolve the problem that toml was not being found in the py38 minimal requirements tests.
|
@rocco8773's idea regarding the pre-commit test failure — try putting a restriction on which version of |
return { | ||
prefix: read_requirements_txt_file(prefix, requirements_directory) | ||
for prefix in requirements_prefixes | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A point on design. I've been reading https://web.stanford.edu/~ouster/cgi-bin/book.php lately, and I can't help but notice that these few functions you've got here are rather shallow - they don't hide much complexity, if any. I get the fear of long functions, but I think these oneliners could be, well, inlined.
Co-authored-by: Dominik Stańczak <stanczakdominik@gmail.com>
Co-authored-by: Dominik Stańczak <stanczakdominik@gmail.com>
…ments-consistency
…ments-consistency
…ments-consistency
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have one single suggestion that fixes the CI problem, then it's a speedy merge :) I've tested that it does work nicely on adding a surplus package to setup.cfg
.
pre-commit.ci autofix |
for more information, see https://pre-commit.ci
Co-authored-by: Dominik Stańczak-Marikin <stanczakdominik@gmail.com>
pre-commit.ci autofix |
This PR adds tests to check that the requirements defined in the
{build,docs,extras,install,tests}.txt
files are consistent with the requirements defined insetup.cfg
andpyproject.toml
. Turns out that we can usesetuptools.config.read_configuration
to read insetup.cfg
, andtoml.loads
to read inpyproject.toml
. Closes #1277.One thing I needed to handle was that the
tests
anddocs
requirements insetup.cfg
also include theextras
requirements.This PR also includes an explicit
import plasmapy
statement, so I'm wondering if #1447 could possibly be closed by this as well. I checked and didn't find anyimport plasmapy
lines in any of our other tests, so this would be helpful to add.