-
Notifications
You must be signed in to change notification settings - Fork 1
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
Ci/tests #9
Ci/tests #9
Conversation
Also add pytest xdist compatibility
Welcome to Codecov 🎉Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests. ℹ️ You can also turn on project coverage checks and project coverage reporting on Pull Request comment Thanks for integrating Codecov - We've got you covered ☂️ |
b61367e
to
87c112d
Compare
87c112d
to
f16b0be
Compare
@@ -532,6 +532,7 @@ def test_from_files(): | |||
dataset.check() | |||
|
|||
|
|||
@pytest.mark.xdist_group(name="fiftyone-group") |
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.
Out of curiosity, why did you group all fiftyone tests?
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.
This is done to ensure they are run in the same process.
Now, you can launch the tests locally with multiple proceses, thanks to pytest xdist : https://pytest-xdist.readthedocs.io/en/stable/
But the tests involving fiftyone must be run sequentially becasue there can be only one mongodb runnin at the same time.
token: ${{ secrets.CODECOV_TOKEN }} | ||
|
||
build-site: | ||
name: "build docs" |
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.
So we run this stage as a safetly measure to detect warnings in the doc (that are not detected by RTD's builds) and the publish of the doc is handeled by RTD right?
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
run: | | ||
poetry run sphinx-build docs docs/_build -W | ||
|
||
run-pyright: |
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.
why not run pre-commit altogether which will include pyright but also black, ruff, etc ?
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.
pre-commit is already run with pre-commit.ci.
You can see actually that it's run at every commit in this PR, when you show all the checks.
And pre-commit no longer runs pyright, because it's a job that needs an installed environment, contrary to other linters, hence the dedicated job here
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.
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.
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.
Note that pre-commit, codecov and RTD are not github actions but webhook, that's why they only appear on the test breakdown insidd the PR but not in the Actions tab
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.
I see, thanks ! :)
Add CI test