lbl-anp / becquerel

Becquerel is a Python package for analyzing nuclear spectroscopic measurements.
Other
44 stars 16 forks source link

setup: added pytest-black requirement #262

Closed arunpersaud closed 3 years ago

arunpersaud commented 3 years ago

Setup.cfg has a --black option for tests, which I think needs pytest-black to be installed?

markbandstra commented 3 years ago

Seems to make sense. Did this cause an error for you?

markbandstra commented 3 years ago

Alternate solution: read requirements-dev.txt in setup.py in the same way we currently read requirements.txt, and send its contents to tests_require. I can work on this.

arunpersaud commented 3 years ago

yes, I couldn't run "python3 -m pytest" since it complained about the --black option in setup.cfg

markbandstra commented 3 years ago

Not sure the best workflow for making this contribution (could do a PR on your fork I suppose), but what I had in mind to make this PR more futureproof was:

What do you think?

arunpersaud commented 3 years ago

sure, I can add this. requirements-dev also seems to include requirements.txt... should that be removed too or parsed out when loading the test-requirements? I'm not that familiar with requirements files

markbandstra commented 3 years ago

sure, I can add this. requirements-dev also seems to include requirements.txt... should that be removed too or parsed out when loading the test-requirements? I'm not that familiar with requirements files

Yes, good point, and my intention was to filter out that line with the [1:] in REQUIREMENTS_DEV.split("\n")[1:], so that will return just the packages unique to requirements-dev.txt.

arunpersaud commented 3 years ago

Just pushed an update. Let me know if this is what you were thinking

markbandstra commented 3 years ago

@arunpersaud we've conventionally been letting the person who worked on the PR do the final update and merge commit, so please have a go at this one and #264 . I can also do it if you prefer.