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

Replace tox with nox #1122

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

coruscating
Copy link
Collaborator

Summary

This PR replaces tox with nox, an attractive alternative with configuration purely in Python.

Details and comments

The recent issues with tox have been well-documented (see Qiskit/rustworkx#851 for one). nox is used by quite a few big projects, including pip. Besides the Python configuration file, it has a command-line interface similar to tox but with more options, such as tags. For example, now you can run nox -t ci to run the exact suite of builds that the CI uses.

Potential caveats to using nox:

  • By default, nox passes all environmental variables unlike tox. If there are ever specific variables we don't want to pass, they need to be manually overwritten (See Unexpected (buggy?) environment passing wntrblm/nox#253).
  • Possibly slower performance. I saw a comment mention this but it was a few years old. We'll see how fast the CI on this PR runs.

this commit switches current usages of tox to nox. the documentation isn't
updated pending results of CI runs.
@coruscating
Copy link
Collaborator Author

On the first CI run, the performance seems slightly better than tox. Almost all test builds ran 1-4 minutes faster with the exception of docs, which was a few minutes slower.

A note for migrating from tox: nox provides the tox-to-nox tool for generating a first pass noxfile.py from an existing tox.ini. The tool did not work for me in the 2022.11.21 release (it's a known issue: wntrblm/nox#671), but the previous release worked fine. I still needed to update a lot of the file afterwards, but it's much faster than starting from scratch.

@CLAassistant
Copy link

CLAassistant commented Jul 18, 2023

CLA assistant check
All committers have signed the CLA.

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