-
Notifications
You must be signed in to change notification settings - Fork 26
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
Small improvements to tox configuration #343
Conversation
poetry run liccheck -s license_strategy.ini -r /tmp/requirements.txt -l PARANOID | ||
|
||
[testenv] | ||
[testenv:py{38,39,310,311}] |
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.
No longer inherit this configuration in the other test environments, which lead to unnecessary dependency installation etc.
poetry run python -m pytest tests -vv --cov fondant --cov-report term-missing | ||
commands_post= |
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.
Split pre and post commands so post script always run, even when command fails.
setenv=PYTHONPATH = {toxinidir}:{toxinidir} | ||
skip_install=true |
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.
Don't let tox install fondant. We need to run the pre-build.sh
script first and are overwriting the install with the poetry install
command below.
deps= | ||
liccheck>=0.7.3,<0.8 | ||
commands= | ||
allowlist_externals= |
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.
No longer inherited
allowlist_externals= | ||
pre-commit | ||
commands=pre-commit run --all-files --show-diff-on-failure | ||
|
||
[testenv:check-licenses] | ||
skip_install=true |
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.
Not necessary to install fondant.
@@ -13,33 +13,41 @@ python = | |||
3.11: py311 | |||
|
|||
[testenv:pre-commit] | |||
skip_install=true |
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.
Not necessary to install fondant.
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.
Thanks @RobbeSneyders! I have tested your changes locally, and everything is working.
Should be faster as well no ? With less installing of packages. |
Yes, running a single pytest environment takes ~20 seconds for me now. |
Had issues running tox locally which in the end were unrelated to the configuration. But in the meantime I learned some better practices for tox, which I implemented in this PR.
Had issues running tox locally which in the end were unrelated to the configuration. But in the meantime I learned some better practices for tox, which I implemented in this PR.