-
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
789c555
Add tox for testing
RobbeSneyders ec11f60
Move fondant package into src directory
RobbeSneyders beaacf7
Update imports with fondant as third party package
RobbeSneyders a279508
Run tox with poetry in github action
RobbeSneyders 8f06a0a
Install using poetry in check-licenses tox environment
RobbeSneyders b730746
Add tox-gh-actions test dependency
RobbeSneyders 56b40dc
Add soft version constraints in tox.ini
RobbeSneyders File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
[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 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 |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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