Add --matrix-python/--no-matrix-python flag to opt out of CI matrices#1089
Merged
nathanjmcdougall merged 11 commits intomainfrom Nov 5, 2025
Merged
Add --matrix-python/--no-matrix-python flag to opt out of CI matrices#1089nathanjmcdougall merged 11 commits intomainfrom
nathanjmcdougall merged 11 commits intomainfrom
Conversation
Co-authored-by: nathanjmcdougall <18602289+nathanjmcdougall@users.noreply.github.com>
…ignore Co-authored-by: nathanjmcdougall <18602289+nathanjmcdougall@users.noreply.github.com>
Co-authored-by: nathanjmcdougall <18602289+nathanjmcdougall@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add flag to opt out of CI matrices in usethis ci bitbucket
Add --matrix-python/--no-matrix-python flag to opt out of CI matrices
Nov 5, 2025
nathanjmcdougall
requested changes
Nov 5, 2025
…onfig Co-authored-by: nathanjmcdougall <18602289+nathanjmcdougall@users.noreply.github.com>
CodSpeed Performance ReportMerging #1089 will not alter performanceComparing Summary
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
nathanjmcdougall
requested changes
Nov 5, 2025
nathanjmcdougall
requested changes
Nov 5, 2025
Co-authored-by: nathanjmcdougall <18602289+nathanjmcdougall@users.noreply.github.com>
nathanjmcdougall
requested changes
Nov 5, 2025
Co-authored-by: nathanjmcdougall <18602289+nathanjmcdougall@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements the feature requested in the issue to allow opting out of CI matrices for Bitbucket Pipelines.
Changes
--matrix-python/--no-matrix-pythonflag tousethis ci bitbucketcommandmatrix_pythonparameter from CLI →use_ci_bitbucket()→PytestTool.gitignore,_config.py, andenviron/python.pyuse_ci_bitbucketandPytestTool)Toolclass to accept explicitmatrix_pythonparameterUsage
Default behavior (matrix enabled):
$ usethis ci bitbucket # Creates: Test on 3.11, Test on 3.12, Test on 3.13, Test on 3.14Single version (matrix disabled):
$ usethis ci bitbucket --no-matrix-python # Creates: Test on 3.10 (current development version only)Implementation Details
Tool.update_bitbucket_steps(*, matrix_python: bool = True)uses explicit keyword-only parameterTool.get_bitbucket_steps(*, matrix_python: bool = True)accepts the parameterPytestTool.update_bitbucket_steps()callssuper().update_bitbucket_steps(matrix_python=matrix_python)PytestTool.get_bitbucket_steps(matrix_python=...)uses parameter to decide version selectionFalse, usesget_python_major_version()for single current versionTrue(default), usesget_supported_major_python_versions()for full matrixTesting
Updated existing tests to pass
matrix_pythonparameterCLI tests remain unchanged (use flags directly)
All changes follow existing code patterns
Fixes A way to opt out of CI matrices #178
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.