-
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
Run tests against fondant package with tox #283
Changes from 6 commits
789c555
ec11f60
beaacf7
a279508
8f06a0a
b730746
56b40dc
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
[tox] | ||
isolated_build = True | ||
envlist = | ||
pre-commit | ||
check-licenses | ||
py{38,39,310,311} | ||
|
||
[gh-actions] | ||
python = | ||
3.8: py38 | ||
3.9: py39 | ||
3.10: pre-commit,check-licenses, py310 | ||
3.11: py311 | ||
|
||
[testenv:pre-commit] | ||
deps=pre-commit | ||
commands=pre-commit run --all-files --show-diff-on-failure | ||
|
||
[testenv:check-licenses] | ||
deps= | ||
liccheck==0.7.3 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can we have soft dependency versions here like we had in There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good point. Updated. |
||
commands= | ||
poetry lock | ||
poetry install --all-extras | ||
poetry show | ||
poetry export -f requirements.txt --output /tmp/requirements.txt | ||
poetry run liccheck -s license_strategy.ini -r /tmp/requirements.txt -l PARANOID | ||
|
||
[testenv] | ||
setenv=PYTHONPATH = {toxinidir}:{toxinidir} | ||
deps= | ||
pytest==7.4.0 | ||
pytest-cov==4.1.0 | ||
allowlist_externals= | ||
poetry | ||
/usr/bin/bash | ||
commands= | ||
bash ./scripts/pre-build.sh | ||
poetry lock | ||
poetry install --all-extras | ||
poetry show | ||
poetry run python -m pytest tests --cov fondant --cov-report term-missing |
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.
do these dependencies only get built when running tox then? does it automatically invoke
pip install
on them since we no longer have them in thepyproject.toml
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.
Yes, installs in this file are only installed by tox when executing the related environment. If a dependency is only needed for a single environment type, I moved them from
pyproject.toml
to here, and I addedtox
topyproject.toml
.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.
alright thanks for the clarification