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

Splits tox into multiple jobs #250

Merged
merged 5 commits into from
Oct 18, 2024
Merged

Splits tox into multiple jobs #250

merged 5 commits into from
Oct 18, 2024

Conversation

billbrod
Copy link
Member

With this PR, we now have three possible tox environments: the default (run pytest), fix (runs black and isort commands that edit src/ and some of docs), and check (just check those directories and raise error).

Then additionally made changes to ci.yml:

  • adds new check job, which just runs the check tox environment.
  • remove pip install -e .[dev] during set up of tox (because tox will install all requirements into its own
  • final check job now requires all of tests, prevent_docs_absolute_links, and checkenvironments)

Thus our CI should be slightly faster (as we're no longer installing unnecessary packages and only running black+isort+flake8 with one OS / python version, instead of all)

I think that by editing envlist at the top of the tox.ini, we can make it so the default tox action is to run the test with a single python version and also run fix, do we want that?

Finally, CONTRIBUTING still needs to be updated. if this all looks good to you, I can go ahead and update it to reflect these changes.

@codecov-commenter
Copy link

codecov-commenter commented Oct 14, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.09%. Comparing base (ca25470) to head (64ea184).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #250   +/-   ##
=======================================
  Coverage   97.09%   97.09%           
=======================================
  Files          20       20           
  Lines        1857     1857           
=======================================
  Hits         1803     1803           
  Misses         54       54           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@billbrod
Copy link
Member Author

Most recent pushes:

  • Update CONTRIBUTING to describe recent changes to tox
  • adds parallelization for pytest, using pytest-xdist
  • change tox's default behavior to run test with one python version and fix

Copy link
Collaborator

@BalzaniEdoardo BalzaniEdoardo left a comment

Choose a reason for hiding this comment

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

this is great! thanks Billy! I would keep the toxenv as is now, but no strong preference.

@BalzaniEdoardo BalzaniEdoardo merged commit 6b3a1e8 into main Oct 18, 2024
13 checks passed
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.

3 participants