-
Notifications
You must be signed in to change notification settings - Fork 2
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
Fix tox configuration #37
Conversation
Would adding |
@ofek I went back and forth about the best way to do this. When I use the tox config: [tox]
envlist = py{38,39,310}
skip_missing_interpreters = True
isolated_build = True
[testenv]
deps =
pytest >= 7.1.2
pytest-cov >= 3.0.0
commands = pytest
... I get: The upside to the implementation in this PR is that this warning doesn't show up (I can't find much information about what its implications are), and the testing dependencies are only defined once in A better solution may be to create a new set of optional dependencies (listed under |
Have you tried Hatch environments? |
@ofek We have internally discussed using Hatch for this repository after this issue was raised. We plan to test out Hatch and see if it is the solution we want to use longer-term, but for now we just want a quick fix for tox. |
When the time comes, this: [tox]
envlist = py{38,39,310}
skip_missing_interpreters = True
skipsdist = True
[testenv]
commands =
pip install .[dev]
pytest
[testenv:coverage]
commands =
pip install .[dev]
pytest --cov --cov-append --cov-report=term-missing --no-cov-on-fail could become in a [[envs.default.matrix]]
python = ["38", "39", "310"]
[envs.default.scripts]
test = "pytest"
test-cov = "pytest --cov --cov-append --cov-report=term-missing --no-cov-on-fail" |
Thanks for the feedback and assistance, @ofek! |
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.
Looks good, thanks!
Switching the build system to hatchling broke the configuration for tox.
This update fixes the tox configuration, moves it to pyproject.toml, and updates the related part of the README.
A future version of tox will natively support configuration in pyproject.toml, rather than the legacy version currently implemented in this PR. (See tox-dev/tox#999)