Skip to content

Conversation

gomri15
Copy link

@gomri15 gomri15 commented Sep 26, 2025

  • Added flag to skip attempting to generate parametrization ids and just raise error on duplicate ids during collection

Closes #13737

@psf-chronographer psf-chronographer bot added the bot:chronographer:provided (automation) changelog entry is part of PR label Sep 26, 2025
Copy link
Member

@Zac-HD Zac-HD left a comment

Choose a reason for hiding this comment

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

Should i documentation like there is for --collect-only?

Yes please - and then I think we'll be ready to merge 🙂

@gomri15 gomri15 force-pushed the 13737-require-unique-paramset-ids branch 2 times, most recently from 907cf3e to 8a770c9 Compare September 27, 2025 16:44
@gomri15
Copy link
Author

gomri15 commented Sep 27, 2025

Should i documentation like there is for --collect-only?

Yes please - and then I think we'll be ready to merge 🙂

Is this till needed or did with @nicoddemus say cover this?

@gomri15 gomri15 force-pushed the 13737-require-unique-paramset-ids branch 2 times, most recently from c0ce285 to a07ff8a Compare September 27, 2025 17:01
@gomri15 gomri15 force-pushed the 13737-require-unique-paramset-ids branch from 35da7df to 4d6fa15 Compare October 1, 2025 07:09
@gomri15 gomri15 requested a review from Zac-HD October 1, 2025 07:10
@gomri15 gomri15 force-pushed the 13737-require-unique-paramset-ids branch 3 times, most recently from 71152b2 to 9cebbab Compare October 1, 2025 19:45
Copy link
Author

@gomri15 gomri15 left a comment

Choose a reason for hiding this comment

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

Done all fixes

@nicoddemus
Copy link
Member

@Zac-HD just realized something: doesn't make more sense for this to be an ini option rather than a command-line flag? I understand this is something one would like to setup permanently for a test suite, rather than something to be passed on the command line on occasion.

@Zac-HD
Copy link
Member

Zac-HD commented Oct 3, 2025

doesn't make more sense for this to be an ini option rather than a command-line flag?

Ideally both, I guess?

@gomri15 gomri15 force-pushed the 13737-require-unique-paramset-ids branch from b1bae36 to b825eb4 Compare October 3, 2025 11:41
@gomri15
Copy link
Author

gomri15 commented Oct 3, 2025

doesn't make more sense for this to be an ini option rather than a command-line flag?

Ideally both, I guess?

@nicoddemus, @Zac-HD
added support for the ini flag and tests for it.

@gomri15 gomri15 force-pushed the 13737-require-unique-paramset-ids branch 4 times, most recently from 03b31f8 to 358627e Compare October 3, 2025 19:28
@gomri15 gomri15 force-pushed the 13737-require-unique-paramset-ids branch from 358627e to f547106 Compare October 11, 2025 09:08
@gomri15 gomri15 force-pushed the 13737-require-unique-paramset-ids branch from f547106 to 1d26702 Compare October 11, 2025 15:38
@gomri15 gomri15 requested a review from nicoddemus October 11, 2025 15:40
@gomri15
Copy link
Author

gomri15 commented Oct 11, 2025

@nicoddemus, @Zac-HD I've addressed all issues and added support both as ini and cli param would love to try get this over line

Copy link
Member

@Zac-HD Zac-HD left a comment

Choose a reason for hiding this comment

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

Minor edits to the docs, and then I'll give @nicoddemus a few days to comment, and then merge!

@bluetech
Copy link
Member

just realized something: doesn't make more sense for this to be an ini option rather than a command-line flag? I understand this is something one would like to setup permanently for a test suite, rather than something to be passed on the command line on occasion.

FWIW I agree with this, I don't see a reason for this to be a CLI flag, only ini. Having fewer flags is generally a good thing.

In the future we could also consider adding it to the planned strict setting. A while ago we deprecated and removed strict with the intention of re-adding it such that it enabled various "strict" options, like this one. Though I do reckon that if we add it it should be as an INI flag not CLI.

@gomri15
Copy link
Author

gomri15 commented Oct 12, 2025

I understand wanting to have fewer flags to reduce complexity and setup pain.

Because we can get the same results from an ini and most likely, this parameter wills be set at the level of the whole execution and not just a few tests being run

Would you like me to remove the cli flag oart of this pr and leave the ini?

Copy link
Member

@bluetech bluetech left a comment

Choose a reason for hiding this comment

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

Some comments from me. I think this can be a nice strictness flag.

@bluetech
Copy link
Member

Thanks for the input bluetech, would you like me to remove the cli flag oart of this pr and leave the ini?

I'll let @Zac-HD decide, I don't feel strongly about it.

@gomri15 gomri15 force-pushed the 13737-require-unique-paramset-ids branch 3 times, most recently from 57b5f00 to 9a1d479 Compare October 14, 2025 10:48
@gomri15
Copy link
Author

gomri15 commented Oct 14, 2025

@bluetech I went over and fixed all your comments, thanks for the input.

Main changes made:

  • rename flag to - "require-unique-parameterization-ids" i agree it's much more readable and would be easier for pytest users to understand
  • Added fix suggestion to error message (it might be too explicit, but I was thinking it would be nice for the message to be a one stop shop for solving the problem)
  • Inlined testing until function which called create testfile
  • Improved wording of description for clarity.

@gomri15 gomri15 requested review from Zac-HD and bluetech October 14, 2025 12:04
@gomri15 gomri15 force-pushed the 13737-require-unique-paramset-ids branch from 9a1d479 to 4782ea6 Compare October 14, 2025 12:05
Copy link
Member

@bluetech bluetech left a comment

Choose a reason for hiding this comment

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

Thanks for the update! Please see my comments below.

@bluetech
Copy link
Member

Thanks for the input bluetech, would you like me to remove the cli flag oart of this pr and leave the ini?

I'll let @Zac-HD decide, I don't feel strongly about it.

BTW, if we go with ini only, I think it would make sense to use the name strict_parametrization_ids or such, similar to strict_xfail, to indicate it's a strictness flag. And if in the future we add the strict ini it'd be clear that it's part of it.

@gomri15 gomri15 force-pushed the 13737-require-unique-paramset-ids branch 2 times, most recently from ec2d70e to 9d7870a Compare October 14, 2025 20:51
@gomri15 gomri15 force-pushed the 13737-require-unique-paramset-ids branch from 9d7870a to 4eaf20e Compare October 14, 2025 20:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bot:chronographer:provided (automation) changelog entry is part of PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

New config option: require_unique_paramset_ids

4 participants