From 62a029cde8a5fbd3ac260d4528e1a2424c1fd718 Mon Sep 17 00:00:00 2001 From: Arpad Borsos Date: Mon, 17 Mar 2025 14:54:14 +0100 Subject: [PATCH] Hide and mark ATS-related commands as deprecated As a first step, this just hides the commands from help output, and marks them as deprecated, which means invoking them outputs a message saying so. --- codecov_cli/commands/labelanalysis.py | 6 +++-- codecov_cli/commands/staticanalysis.py | 2 +- codecovcli_commands | 37 -------------------------- 3 files changed, 5 insertions(+), 40 deletions(-) diff --git a/codecov_cli/commands/labelanalysis.py b/codecov_cli/commands/labelanalysis.py index 8cd9d8b85..6b72ac829 100644 --- a/codecov_cli/commands/labelanalysis.py +++ b/codecov_cli/commands/labelanalysis.py @@ -23,7 +23,7 @@ logger = logging.getLogger("codecovcli") -@click.command() +@click.command(hidden=True, deprecated=True) @click.option( "--token", required=True, @@ -141,7 +141,9 @@ def label_analysis( logger.info(f"Collected {len(requested_labels)} test labels") logger.debug( "Labels collected", - extra=dict(extra_log_attributes=dict(labels_collected=requested_labels)), + extra=dict( + extra_log_attributes=dict(labels_collected=requested_labels) + ), ) payload["requested_labels"] = requested_labels diff --git a/codecov_cli/commands/staticanalysis.py b/codecov_cli/commands/staticanalysis.py index b8cb9e9c6..58592291c 100644 --- a/codecov_cli/commands/staticanalysis.py +++ b/codecov_cli/commands/staticanalysis.py @@ -15,7 +15,7 @@ logger = logging.getLogger("codecovcli") -@click.command() +@click.command(hidden=True, deprecated=True) @click.option( "--foldertosearch", default=".", diff --git a/codecovcli_commands b/codecovcli_commands index 22391fc05..34cca21ec 100644 --- a/codecovcli_commands +++ b/codecovcli_commands @@ -17,11 +17,9 @@ Commands: do-upload empty-upload get-report-results - label-analysis pr-base-picking process-test-results send-notifications - static-analysis upload-coverage upload-process @@ -179,28 +177,6 @@ Options: repo token in Self-hosted -h, --help Show this message and exit. -Usage: codecovcli label-analysis [OPTIONS] - -Options: - --token TEXT The static analysis token (NOT the same - token as upload) [required] - --head-sha TEXT Commit SHA (with 40 chars) [required] - --base-sha TEXT Commit SHA (with 40 chars) [required] - --runner-name, --runner TEXT Runner to use - --max-wait-time INTEGER Max time (in seconds) to wait for the label - analysis result before falling back to - running all tests. Default is to wait - forever. - --dry-run Print list of tests to run AND tests skipped - AND options that need to be added to the - test runner to stdout. Choose format with - --dry-run-format option. Default is JSON. - --dry-run-format [json|space-separated-list] - Format in which --dry-run data is printed. - Default is JSON. - --runner-param TEXT - -h, --help Show this message and exit. - Usage: codecovcli pr-base-picking [OPTIONS] Options: @@ -245,19 +221,6 @@ Options: repo token in Self-hosted -h, --help Show this message and exit. -Usage: codecovcli static-analysis [OPTIONS] - -Options: - --foldertosearch PATH Folder to search - --numberprocesses INTEGER number of processes to use - --pattern TEXT file pattern to search for - --force / --no-force - --commit-sha TEXT Commit SHA (with 40 chars) [required] - --folders-to-exclude PATH Folders not to search - --token TEXT The static analysis token (NOT the same token as - upload) [required] - -h, --help Show this message and exit. - Usage: codecovcli upload-coverage [OPTIONS] Options: