Skip to content
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

Merged
merged 8 commits into from
Sep 16, 2024
Merged

Ci/tests #9

merged 8 commits into from
Sep 16, 2024

Conversation

ClementPinard
Copy link
Collaborator

Add CI test

  • Pytest for python 3.10 3.11 3.12, across linux and macos (windows works but the slash anti slash pattern for paths is making me crazy by making the doctests failing)
  • Pyright
  • Sphinx with warning. Not the same as readthedocs, here we fail is there is a warning.

Copy link

codecov bot commented Sep 13, 2024

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 ☂️

@@ -532,6 +532,7 @@ def test_from_files():
dataset.check()


@pytest.mark.xdist_group(name="fiftyone-group")
Copy link
Collaborator

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?

Copy link
Collaborator Author

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"
Copy link
Collaborator

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?

Copy link
Collaborator Author

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:
Copy link
Collaborator

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 ?

Copy link
Collaborator Author

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

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here's what I see in the checks 🤔 I'm I missing something ?
image

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image You can scroll the list of tests inside the mbedded window ;)

Copy link
Collaborator Author

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

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see, thanks ! :)

@ClementPinard ClementPinard merged commit f72e8dc into main Sep 16, 2024
14 checks passed
@ClementPinard ClementPinard deleted the CI/tests branch September 27, 2024 14:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants