From bd789206869242db750f7700a552125069094e82 Mon Sep 17 00:00:00 2001 From: Nathan McDougall Date: Sat, 1 Nov 2025 10:13:02 +1300 Subject: [PATCH 1/2] Use consistent capitalization of bitbucket pipelines --- CHANGELOG.md | 2 +- README.md | 2 +- docs/example-usage.md | 2 +- src/usethis/_integrations/ci/bitbucket/schema_utils.py | 2 +- src/usethis/_tool/impl/pytest.py | 2 +- src/usethis/_ui/interface/ci.py | 4 ++-- tests/conftest.py | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fc1083f4..5cb5ad75 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -273,7 +273,7 @@ - The Ruff linter and formatter can now be configured independently. When using the `usethis tool ruff` command, you can now specify whether to add or remove the linter or formatter independently using the `--linter` and `--formatter` options. This allows for more granular control over which components of Ruff are used in your project. By default, as before, both the linter and formatter will be added or removed together. This introduces a change in the way that Bitbucket Pipeline steps will be configured for Ruff, by having the linter and formatter as separate steps. -- Integrations with Ruff for pre-commit and Bitbucket pipelines will determine whether the linter or formatter is being used based on the presence of the `ruff.lint` and `ruff.format` keys the active Ruff configuration file. +- Integrations with Ruff for pre-commit and Bitbucket Pipelines will determine whether the linter or formatter is being used based on the presence of the `ruff.lint` and `ruff.format` keys the active Ruff configuration file. ### 🐞 Bug Fixes diff --git a/README.md b/README.md index 0994ead8..88db52ef 100644 --- a/README.md +++ b/README.md @@ -161,7 +161,7 @@ $ uvx usethis tool pytest ☐ Run 'uv run pytest' to run the tests. ``` -To configure Bitbucket pipelines, run: +To configure Bitbucket Pipelines, run: ```console $ uvx usethis ci bitbucket diff --git a/docs/example-usage.md b/docs/example-usage.md index 4e0276d4..cef09588 100644 --- a/docs/example-usage.md +++ b/docs/example-usage.md @@ -51,7 +51,7 @@ $ uvx usethis tool pytest ☐ Run 'uv run pytest' to run the tests. ``` -To configure Bitbucket pipelines, run: +To configure Bitbucket Pipelines, run: ```console $ uvx usethis ci bitbucket diff --git a/src/usethis/_integrations/ci/bitbucket/schema_utils.py b/src/usethis/_integrations/ci/bitbucket/schema_utils.py index 8c86f273..1bf86ca1 100644 --- a/src/usethis/_integrations/ci/bitbucket/schema_utils.py +++ b/src/usethis/_integrations/ci/bitbucket/schema_utils.py @@ -12,7 +12,7 @@ def step1tostep(step1: Step1) -> Step: """Promoting Step1 to a standard Step. This is necessary because there is some unusual inconsistency in the JSON Schema - for Bitbucket pipelines that means conditions are not constrained by type when + for Bitbucket Pipelines that means conditions are not constrained by type when occurring in a stage, whereas at time of writing they are constrained in all other circumstances. This gives rise to strange naming in the output of datamodel-code-generator (which is repeated here for consistency). diff --git a/src/usethis/_tool/impl/pytest.py b/src/usethis/_tool/impl/pytest.py index 0bc0ac6b..040578d2 100644 --- a/src/usethis/_tool/impl/pytest.py +++ b/src/usethis/_tool/impl/pytest.py @@ -265,7 +265,7 @@ def get_managed_bitbucket_step_names(self) -> list[str]: return sorted(names) def update_bitbucket_steps(self) -> None: - """Update the pytest-related Bitbucket pipelines steps. + """Update the pytest-related Bitbucket Pipelines steps. A bespoke function is needed here to ensure we inform the user about the need to manually add the dependencies if they are not using a backend. diff --git a/src/usethis/_ui/interface/ci.py b/src/usethis/_ui/interface/ci.py index a50a453a..51c14b32 100644 --- a/src/usethis/_ui/interface/ci.py +++ b/src/usethis/_ui/interface/ci.py @@ -8,10 +8,10 @@ ) -@app.command(help="Use Bitbucket pipelines for CI.") +@app.command(help="Use Bitbucket Pipelines for CI.") def bitbucket( remove: bool = typer.Option( - False, "--remove", help="Remove Bitbucket pipelines CI instead of adding it." + False, "--remove", help="Remove Bitbucket Pipelines CI instead of adding it." ), offline: bool = offline_opt, quiet: bool = quiet_opt, diff --git a/tests/conftest.py b/tests/conftest.py index 744e76b2..d6a7aa9f 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -26,7 +26,7 @@ def _uv_init_dir(tmp_path_factory: pytest.TempPathFactory) -> Path: "--lib", "--python", # Deliberately kept at at a version other than the latest version to - # check range checks e.g. for Bitbucket pipelines matrixes. + # check range checks e.g. for Bitbucket Pipelines matrixes. "3.13", "--vcs", "none", From a748be582b43e84d4c0902d684f54814494f9ae8 Mon Sep 17 00:00:00 2001 From: Nathan McDougall Date: Sat, 1 Nov 2025 10:22:06 +1300 Subject: [PATCH 2/2] Fix pluralization issue for Bitbucket Pipelines --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5cb5ad75..94c9a32f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -271,7 +271,7 @@ ### 🚀 New Features - The Ruff linter and formatter can now be configured independently. When using the `usethis tool ruff` command, you can now specify whether to add or remove the linter or formatter independently using the `--linter` and `--formatter` options. This allows for more granular control over which components of Ruff are used in your project. By default, as before, both the linter and formatter will be added or removed together. -This introduces a change in the way that Bitbucket Pipeline steps will be configured for Ruff, by having the linter and formatter as separate steps. +This introduces a change in the way that Bitbucket Pipelines steps will be configured for Ruff, by having the linter and formatter as separate steps. - Integrations with Ruff for pre-commit and Bitbucket Pipelines will determine whether the linter or formatter is being used based on the presence of the `ruff.lint` and `ruff.format` keys the active Ruff configuration file.