Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/usethis/_ui/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,12 @@
)(
usethis._ui.interface.test.test,
)
app.add_typer(usethis._ui.interface.ci.app, name="ci", rich_help_panel=rich_help_panel)
app.add_typer(
usethis._ui.interface.ci.app,
name="ci",
rich_help_panel=rich_help_panel,
deprecated=True,
)
app.add_typer(
usethis._ui.interface.tool.app, name="tool", rich_help_panel=rich_help_panel
)
Expand Down
8 changes: 6 additions & 2 deletions src/usethis/_ui/interface/ci.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
from usethis._ui.options import backend_opt, frozen_opt, offline_opt, quiet_opt

app = typer.Typer(
help="Add config for Continuous Integration (CI) pipelines.", add_completion=False
help="Add config for Continuous Integration (CI) pipelines.",
add_completion=False,
deprecated=True,
)


Expand All @@ -25,12 +27,14 @@ def bitbucket(
backend: BackendEnum = backend_opt,
) -> None:
from usethis._config_file import files_manager
from usethis._console import err_print
from usethis._console import err_print, warn_print
from usethis._core.ci import use_ci_bitbucket
from usethis.errors import UsethisError

assert isinstance(backend, BackendEnum)

warn_print("'usethis ci' is deprecated and will be removed in v0.20.0.")

with (
usethis_config.set(
offline=offline,
Expand Down
2 changes: 2 additions & 0 deletions tests/usethis/_ui/interface/test_ci.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ def test_readme_example(self, tmp_path: Path):
assert (
result.output
== """\
⚠ 'usethis ci' is deprecated and will be removed in v0.20.0.
✔ Writing 'bitbucket-pipelines.yml'.
✔ Adding cache 'uv' definition to 'bitbucket-pipelines.yml'.
✔ Adding 'Run Ruff' to default pipeline in 'bitbucket-pipelines.yml'.
Expand All @@ -57,6 +58,7 @@ def test_none_backend(self, tmp_path: Path):
assert result.exit_code == 0, result.output
assert (tmp_path / "bitbucket-pipelines.yml").exists()
assert result.output == (
"⚠ 'usethis ci' is deprecated and will be removed in v0.20.0.\n"
"✔ Writing 'bitbucket-pipelines.yml'.\n"
"✔ Adding placeholder step to default pipeline in 'bitbucket-pipelines.yml'.\n"
"☐ Remove the placeholder pipeline step in 'bitbucket-pipelines.yml'.\n"
Expand Down
Loading