Skip to content

Remove all Bitbucket Pipelines logic from the codebase#1515

Merged
nathanjmcdougall merged 5 commits into
mainfrom
copilot/remove-bitbucket-pipelines-logic
Mar 25, 2026
Merged

Remove all Bitbucket Pipelines logic from the codebase#1515
nathanjmcdougall merged 5 commits into
mainfrom
copilot/remove-bitbucket-pipelines-logic

Conversation

Copilot AI commented Mar 25, 2026

Copy link
Copy Markdown
Contributor

Complete removal of Bitbucket Pipelines CI integration. The internal _pipeweld module is retained for future use with pre-commit/prek.

Deleted modules

  • src/usethis/_integrations/ci/bitbucket/ — schema, YAML management, step/cache/anchor handling (12 files)
  • src/usethis/_core/ci.py, src/usethis/_types/ci.py, src/usethis/_detect/ci/
  • All corresponding test files (~4k LOC of tests)

Modified source

  • _tool/base.py — Removed get_bitbucket_steps, get_managed_bitbucket_step_names, remove_bitbucket_steps, update_bitbucket_steps, unconditional_update_bitbucket_steps and their imports
  • _tool/impl/base/{pre_commit,ruff,pytest}.py — Removed bitbucket step override methods
  • _core/tool.py — Stripped update_bitbucket_steps()/remove_bitbucket_steps() calls from all use_* functions; removed _add_bitbucket_linter_steps_to_default and _remove_bitbucket_linter_steps_from_default helpers
  • _core/list.py — Removed Bitbucket Pipelines row and "ci" category from usage table
  • _config_file.py — Removed BitbucketPipelinesYAMLManager from files_manager()
  • _ui/interface/init.py + _ui/options.py — Removed --ci parameter and CIServiceEnum usage

Config & docs

  • .importlinter — Removed ci from core layers, bitbucket from CI contract
  • pyproject.toml — Removed bitbucket basedpyright execution environment
  • docs/cli/reference.md — Removed --ci documentation

Retained

  • src/usethis/_pipeweld/ — Kept for planned future use with pre-commit/prek; tests and docs also retained
Original prompt

This section details on the original issue you should resolve

<issue_title>Remove all references to bitbucket pipelines logic from the codebase</issue_title>
<issue_description>Toward #1313.

This will involve removing a lot of files, functions, methods, invocations, tests etc. and probably modifying tests too to match new expectations.</issue_description>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 3 commits March 25, 2026 02:43
- Delete src/usethis/_integrations/ci/bitbucket/ directory (12 files)
- Delete src/usethis/_pipeweld/ directory (5 files)
- Delete src/usethis/_core/ci.py
- Delete src/usethis/_types/ci.py (CIServiceEnum)
- Delete src/usethis/_detect/ci/ directory
- Delete docs/pipeweld.md
- Delete all bitbucket-related test directories and files
- Remove bitbucket methods from Tool base class
- Remove bitbucket overrides from pre_commit, ruff, pytest tools
- Remove bitbucket step calls from all use_* tool functions
- Remove bitbucket status from usage list
- Remove BitbucketPipelinesYAMLManager from config_file.py
- Remove --ci parameter from init command
- Remove init_ci_opt from options.py

Co-authored-by: nathanjmcdougall <18602289+nathanjmcdougall@users.noreply.github.com>
Agent-Logs-Url: https://github.com/usethis-python/usethis-python/sessions/2b46fad4-b933-4c23-a33c-8f7cd4dbbb21
…removal

Removed all Bitbucket-related test code from:
- tests/usethis/_core/test_core_tool.py: Removed import, TestAllBitbucketCompatibleSteps class, all test_bitbucket_integration methods, and all TestBitbucketIntegration inner classes
- tests/usethis/_tool/impl/base/test_pytest.py: Removed bitbucket import and TestUpdateBitbucketSteps/TestRemoveBitbucketSteps inner classes
- tests/usethis/_ui/interface/test_init.py: Removed test_bitbucket_docstyle_and_status method
- tests/usethis/_core/test_list.py: Removed Bitbucket Pipelines UsageRow entries
- tests/usethis/_integrations/pre_commit/test_hooks.py: Removed bitbucket sync comment
- tests/conftest.py: Updated comment to remove Bitbucket reference

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Remove bitbucket test methods/classes from test_core_tool.py
- Remove bitbucket test classes from test_pytest.py
- Remove bitbucket test from test_init.py
- Remove Bitbucket Pipelines rows from test_list.py
- Remove bitbucket comment from test_hooks.py
- Update conftest.py comment
- Remove bitbucket from docs/cli/reference.md
- Remove bitbucket basedpyright config from pyproject.toml
- Remove pipeweld from mkdocs.yml navigation
- Update .importlinter to remove pipeweld, ci, and bitbucket references

Co-authored-by: nathanjmcdougall <18602289+nathanjmcdougall@users.noreply.github.com>
Agent-Logs-Url: https://github.com/usethis-python/usethis-python/sessions/2b46fad4-b933-4c23-a33c-8f7cd4dbbb21
Copilot AI changed the title [WIP] Remove all references to bitbucket pipelines logic from the codebase Remove all Bitbucket Pipelines logic from the codebase Mar 25, 2026
Copilot AI requested a review from nathanjmcdougall March 25, 2026 03:03
@nathanjmcdougall

Copy link
Copy Markdown
Collaborator

@copilot please restore pipeweld - even if there's no consumer anymore I plan to use it for pre-commit/prek later, and it's useful code that could be pulled out into its own package.

@codecov

codecov Bot commented Mar 25, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

The pipeweld utility is kept for future use with pre-commit/prek
and as a potential standalone package.

Co-authored-by: nathanjmcdougall <18602289+nathanjmcdougall@users.noreply.github.com>
Agent-Logs-Url: https://github.com/usethis-python/usethis-python/sessions/f8fe25b7-3495-4399-91be-a5274472ea4b

Copilot AI commented Mar 25, 2026

Copy link
Copy Markdown
Contributor Author

@copilot please restore pipeweld - even if there's no consumer anymore I plan to use it for pre-commit/prek later, and it's useful code that could be pulled out into its own package.

Restored _pipeweld module, tests, docs, and config references in f7eaea5. All 52 pipeweld tests pass and static checks are clean.

@codspeed-hq

codspeed-hq Bot commented Mar 25, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 2 untouched benchmarks


Comparing copilot/remove-bitbucket-pipelines-logic (f7eaea5) with main (e6d8676)1

Open in CodSpeed

Footnotes

  1. No successful run was found on main (b51510a) during the generation of this report, so e6d8676 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

@nathanjmcdougall nathanjmcdougall marked this pull request as ready for review March 25, 2026 03:11
@nathanjmcdougall nathanjmcdougall merged commit 40cd6ef into main Mar 25, 2026
20 checks passed
@nathanjmcdougall nathanjmcdougall deleted the copilot/remove-bitbucket-pipelines-logic branch March 25, 2026 03:53
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.

Remove all references to bitbucket pipelines logic from the codebase

2 participants