Skip to content

refactor: remove prevent-cli and flatten codecov-cli to repo root#709

Merged
thomasrockhu-codecov merged 1 commit into
mainfrom
th/flatten-codecov-cli
May 19, 2026
Merged

refactor: remove prevent-cli and flatten codecov-cli to repo root#709
thomasrockhu-codecov merged 1 commit into
mainfrom
th/flatten-codecov-cli

Conversation

@thomasrockhu-codecov
Copy link
Copy Markdown
Contributor

Summary

Roll the codecov-cli project structure back to a single, top-level Python package. The prevent-cli/ subproject is deleted outright and every codecov-cli/* file is moved up to the repository root.

This PR is the structural counterpart to #708 (which restores the original release flow). The two PRs are independent and either order is fine; whichever lands second will need a trivial rebase to reconcile workflow/script edits.

Layout changes

  • Delete prevent-cli/ (sources, lock, README, command dump, all of it).
  • git mv codecov-cli/{codecov_cli,tests,samples,pyproject.toml,uv.lock,setup.py,MANIFEST.in,ruff.toml,codecovcli_commands,README.md,LICENSE} to the repo root.
  • Replace the prevent-cli flavoured root README.md / LICENSE with the codecov-cli versions (LICENSE was byte-identical to the root one, so it shows up as a pure delete).

Tooling and config touchups

  • Makefile: drop cd codecov-cli from test; repoint command_dump at the new top-level command_dump.py.
  • command_dump.py: restored at the repo root, dumps only codecovcli (no more sentry-prevent-cli).
  • hooks/pre-commit: stop staging prevent-cli/preventcli_commands.
  • .craft.yml: point at codecov/codecov-cli, drop the sentry_prevent_cli artifact patterns.
  • .github/workflows/broadcast_api_changes.yml: watch codecovcli_commands at the root.
  • .github/workflows/ci.yml: drop all prevent-cli / sentry-prevent-cli jobs and cd codecov-cli; fix the owner guard from getsentry to codecov so codecov-startup and dogfood jobs actually run.
  • .github/workflows/build.yml: build codecov-cli only, from the repo root; drop the dual-CLI matrix, the prevent-cli wheel, and the Cosign signing step (only used for sentry-prevent-cli binaries).
  • .github/workflows/release-codecov-cli.yml: download / publish from ./dist instead of codecov-cli/dist.
  • scripts/build_alpine.sh and scripts/build_linux.sh: rewritten to build codecov-cli only out of the repo root with uv.
  • scripts/{bump-version.sh,pre-build.sh,uv-installer-0.7.8.sha256sum}: deleted (all prevent-cli specific).
  • tests/helpers/test_versioning_systems.py: update the exotic-filename assertion from codecov-cli/tests/data/... to tests/data/....
  • pyproject.toml + README.md: project URLs and badges now point at codecov/codecov-cli instead of getsentry/prevent-cli. (CHANGELOG.md is left alone; the historical PR links live on getsentry/prevent-cli.)

Test plan

Verified locally on this branch:

  • uv sync succeeds with the flat layout.
  • uv run pytest697 passed, including tests/helpers/test_versioning_systems.py after the path fix.
  • uv run ruff check --ignore F401 --exclude languages --exclude samples is clean.
  • uv run python command_dump.py produces no diff against the checked-in codecovcli_commands.

Still to verify in CI / on merge:

  • Workflows green on the PR run (CLI CI lint / detect-command-change / codecov-startup / build-test-upload matrix).
  • On a follow-up release branch, build.yml produces sdist + wheel + per-OS pyinstaller binaries from the new root paths.

Made with Cursor

Remove the prevent-cli sub-project entirely and move every
codecov-cli/* file up to the repository root so codecov-cli is once
again a top-level Python project.

Layout changes:
- Delete prevent-cli/.
- git mv codecov-cli/{codecov_cli,tests,samples,pyproject.toml,
  uv.lock,setup.py,MANIFEST.in,ruff.toml,codecovcli_commands,
  README.md,LICENSE} to the repo root.
- Replace the prevent-cli root README and LICENSE with the
  codecov-cli ones (they're identical, so LICENSE shows as a
  pure delete + retained file).

Companion edits to make the flat layout build cleanly:
- Makefile: drop `cd codecov-cli` from `test`, point
  `command_dump` at the new top-level command_dump.py.
- command_dump.py: restored at the repo root, dumps only
  codecovcli (sentry-prevent-cli no longer exists).
- hooks/pre-commit: stop staging prevent-cli/preventcli_commands.
- .craft.yml: point at codecov/codecov-cli and drop the
  sentry_prevent_cli targets.
- .github/workflows/broadcast_api_changes.yml: watch
  codecovcli_commands at the root.
- .github/workflows/ci.yml: drop all prevent-cli/sentry-prevent-cli
  jobs and `cd codecov-cli`, fix repository_owner == 'codecov'
  so dogfood / codecov-startup jobs actually run.
- .github/workflows/build.yml: build codecov-cli only, from the
  repo root (no more dual-CLI matrix or Cosign signing).
- .github/workflows/release-codecov-cli.yml: download/publish from
  ./dist instead of codecov-cli/dist.
- scripts/build_alpine.sh, scripts/build_linux.sh: rewritten to
  build codecov-cli only out of the repo root with uv.
- scripts/{bump-version.sh,pre-build.sh,uv-installer-0.7.8.sha256sum}:
  deleted (prevent-cli specific).
- tests/helpers/test_versioning_systems.py: update the exotic
  filename assertion from `codecov-cli/tests/data/...` to
  `tests/data/...` now that tests live at the root.
- pyproject.toml + README.md: project URLs and badges now point
  at codecov/codecov-cli instead of getsentry/prevent-cli.

Verified locally: `uv sync` succeeds, the full pytest suite passes
(697 tests), `ruff check` is clean, and `make command_dump`
produces no diff against the checked-in codecovcli_commands.
@sentry
Copy link
Copy Markdown

sentry Bot commented May 18, 2026

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
700 1 699 1
View the full list of 1 ❄️ flaky test(s)
api.temp.calculator.test_calculator::test_divide

Flake rate in main: 100.00% (Passed 0 times, Failed 21 times)

Stack Traces | 0.001s run time
def
                test_divide():
                > assert Calculator.divide(1, 2) == 0.5
                E assert 1.0 == 0.5
                E + where 1.0 = <function Calculator.divide at 0x104c9eb90>(1, 2)
                E + where <function Calculator.divide at 0x104c9eb90> = Calculator.divide
                .../temp/calculator/test_calculator.py:30: AssertionError

To view more test analytics, go to the Prevent Tests Dashboard

@thomasrockhu-codecov thomasrockhu-codecov merged commit dbf2b74 into main May 19, 2026
24 checks passed
@thomasrockhu-codecov thomasrockhu-codecov deleted the th/flatten-codecov-cli branch May 19, 2026 23:33
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.

2 participants