Closed arunpersaud closed 3 years ago
Seems to make sense. Did this cause an error for you?
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.
yes, I couldn't run "python3 -m pytest" since it complained about the --black option in setup.cfg
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:
setup.py
add:
with open("requirements-dev.txt", "r") as fh:
REQUIREMENTS_DEV = fh.read()
setup.py
change:
tests_require=["pytest", "pytest-cov", "pytest-black"],
to
tests_require=[_f for _f in REQUIREMENTS_DEV.split("\n")[1:] if _f],
flake8
and pydocstyle
from requirements-dev.txt
since they're no longer required.What do you think?
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
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
.
Just pushed an update. Let me know if this is what you were thinking
@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.
Setup.cfg has a --black option for tests, which I think needs pytest-black to be installed?