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

Added helper script to run multiple tox environments #4095

Conversation

antonpirker
Copy link
Contributor

@antonpirker antonpirker commented Jul 31, 2024

Description

This adds a simple helper script ./scripts/runtox.sh that allows people to run multiple tox environments with one call.

So ./scripts/runtox.sh py312 will run all tox environments having the string "py312" in their name.

This is helpful if you want to run all tox environments in one Python version, or run one environment in all Python versions. (like this: ./scripts/runtox.sh opentelemetry-api)

Constributed the same thing in opentelementry-python-contrib:
open-telemetry/opentelemetry-python-contrib#2763

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • Ran it locally and it works (also we have something similar in Sentry, so I just copied it over)

Does This PR Require a Contrib Repo Change?

  • Yes. - Link to PR:
  • No.

Checklist:

  • Followed the style guidelines of this project
  • Changelogs have been updated
  • Unit tests have been added
  • Documentation has been updated

Copy link
Member

@emdneto emdneto left a comment

Choose a reason for hiding this comment

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

I like the idea of automating things, but for this case tox -f can't solve the problem? Maybe we can just improve our docs to make it explicit

$ tox -f py312

And

$ tox -f opentelemetry-api

I know we have some issues with tox that makes some packages to leak during runs, like the issue that happened here with fastapi-slim: open-telemetry/opentelemetry-python-contrib#2756, but I think it's a problem with the way tox works.

@antonpirker
Copy link
Contributor Author

antonpirker commented Aug 1, 2024

wait what? 😅

I think its not a problem in our documentation but in toxs. I stumbled upon this command line arg in their docs but it says this:

-f FACTOR - factors to evaluate (passing multiple factors means 'AND', passing this option multiple times means 'OR') (default: [])

Which did not mean anything to me.

Ok then, ignore my PR (will go and remove runtox.sh from Sentry now 😄 )

@antonpirker
Copy link
Contributor Author

tox can do what this script does, so it is useless! Closing this!

@antonpirker antonpirker closed this Aug 1, 2024
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