-
Notifications
You must be signed in to change notification settings - Fork 201
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
🔧 Add tox configuration #4355
🔧 Add tox configuration #4355
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #4355 +/- ##
========================================
Coverage 79.32% 79.32%
========================================
Files 468 468
Lines 34713 34713
========================================
Hits 27533 27533
Misses 7180 7180
Flags with carried forward coverage won't be shown. Click here to find out more. Continue to review full report at Codecov.
|
The On another note, is that literal string syntax currently the only way that tox can be configured through the Edit: found that they are considering it, but it is not on the list of priorities |
Tagging @csadorf, guess it's time to pick this discussion back up. |
yeh but hey at least it can go in there 🤷
what is this madness lol, maybe it would just be better to just check that it is consistent with setup.json in the pre-commit rather than rebuilding Alternatively, for now, I could add a |
Nonono, in the long run we definitely want to start relying more heavily on |
Yeh was just trying to lazy lol. |
It is likely possibly to improve the logic, but I also have only so much time to spend on these things. Feel free to create a PR with an improved logic, the validator function is already implemented. Concerning tox, I moved away from it in the vast majority of my projects, because I had more trouble with it then gaining from it. But if it works well here, I see no reason why not to include it. |
Interesting, I've being using it on about 10 different projects, including aiida-core, and it's worked like a charm |
It's been a few years since I touched it so possible that it improved or maybe I didn't use it right or maybe there was some other reason that it didn't fit and I decided to abandon it. So, just to emphasize: no qualms with applying it here if it works well. 👍 |
yeh quite possibly, I only "discovered" it recently and am now wondering how I lived without it lol Ok well I will try to make the pre-commit fix here |
All done. |
utils/dependency_management.py
Outdated
@@ -161,37 +161,43 @@ def generate_environment_yml(): | |||
|
|||
|
|||
@cli.command() | |||
def generate_pyproject_toml(): | |||
def update_pyproject_toml(): | |||
"""Generate 'pyproject.toml' file.""" |
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.
Please adjust the doc-string as well to reflect the change in function.
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.
Thx a lot!
Surprised no one has looked to add this before.
tox is a ubiquitous test automation tool,
simply
pip/conda install tox
then run e.g.tox -- tests/tools/groups/test_paths.py
and it will set up your test environment (or re-use the cached one) and run pytest.Massively helpful when you are working across multiple repositories with different test environments!
Want to run against a different python version / backend?
tox -e py38-sqla -- tests/tools/groups/test_paths.py
Want to test the docs?
tox -e docs-clean
ortox -e docs-update