Skip to content

Additional toxgen options #4495

@sentrivana

Description

@sentrivana
Contributor

Sometimes you just want to make a change to some part of tox.jinja that is not toxgen-generated. In order to propagate this to tox.ini, you now can either do it manually (copy-paste) or run generate-test-files, but the latter will also attempt to update all toxgen-managed test definitions.

It'd also be good to have a special mode for when all you want is to add a new integration managed by toxgen, without regenerating all the rest.

Activity

self-assigned this
on Jun 18, 2025
changed the title [-]Add a no-update option to toxgen[/-] [+]Additional toxgen options[/+] on Jun 23, 2025
sentrivana

sentrivana commented on Sep 25, 2025

@sentrivana
ContributorAuthor

So I've given this some thought now and I don't think it's worth it.

In order for toxgen to only generate the test matrix for a single package, it'd need to take the rest of the test matrix from the existing tox.ini, so we'd need to essentially add a way to parse tox.ini as well as a separate way for toxgen to generate tox.ini without using the existing template. This would make the script much more complicated for not much benefit.

There's also the question of how the CI check for unauthorized edits would work. It'd somehow need to detect that toxgen was run in this special mode and also run in the same mode itself.

For now I believe it's ok to ask folks to regenerate tox.ini completely if they add a new test suite. With the improvements we've made with the cache etc. it shouldn't be much of a pain. Also, new integrations are not added often and even if there is one, it's a rare occurrence that a new release breaks something.

If this actually becomes a pain point, we can reconsider.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

    Development

    No branches or pull requests

      Participants

      @sentrivana

      Issue actions

        Additional toxgen options · Issue #4495 · getsentry/sentry-python