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

Merge adding tox into main #160

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

Conversation

MokhFn
Copy link
Contributor

@MokhFn MokhFn commented Aug 25, 2024

All Submissions:

  • Have you followed the guidelines in our Contributing documentation?
  • Have you verified that there aren't any other open Pull Requests for the same update/change?
  • Does the Pull Request pass all tests?

Description

This PR makes tests more automated as they run via tox.
This introduces tox environments, for future uses, such as automated code reformatting, code analysis, releases, doc updates, etc ... within isolated environments.

@MokhFn MokhFn changed the title Misc/add tox Merge adding tox to main Aug 25, 2024
@MokhFn MokhFn changed the title Merge adding tox to main Merge adding tox into main Aug 25, 2024
@MokhFn
Copy link
Contributor Author

MokhFn commented Nov 19, 2024

Any news on a potential review on this please ? @LadyChristina

@LadyChristina
Copy link
Member

Hi @MokhFn, thanks for the nudge, as I had taken a look at this last month but forgot to follow up. My issue was that I was getting some errors while running this locally, so I wasn't sure if there was sth wrong with the PR or my local tox configuration. But I also didn't know about tox before so it would help if you could explain why it's useful to have? If we go for it, it would be useful to include some instructions for how to use it (e.g. in the README), as I assume other people may not be familiar with it either

@MokhFn
Copy link
Contributor Author

MokhFn commented Nov 20, 2024

No problem @LadyChristina, and thanks for reaching back.
Tox is basically a virtualenv manager to isolate specific tasks (it does a lot more than that btw, but in a nutshell).

Where it adds a lot of value here, is enabling us to setup specific and different environments for each step of the pipeline.
1 env for unit tests, 1 env for releasing/packaging, 1 env for updating docs, etc ... With each env having it's own config, separately.

Another, important use case too, is testing our package within multiple python versions, which is easier to do with tox.

For more details, you can maybe check the tox doc, or this article.

Finally, there is also nox, which is a more pythonic way compared to tox (basically tox, but without the tox.ini file, instead, we use a noxfile.py).
I personally never used nox, but i am open to implementing it instead of tox if you prefer a more pythonic tool.

Now, for the local issues, i just added a requirement for tox installation. Could you retry and let me know please ? If it doesn't fix your issues, could you publish details ? On another hand, doc updates are noted, will be updated once the issues are resolved.

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