codecov-cli


Namecodecov-cli JSON
Version 0.6.0 PyPI version JSON
download
home_pageNone
SummaryCodecov Command Line Interface
upload_time2024-05-07 17:44:27
maintainerNone
docs_urlNone
authorCodecov
requires_python>=3.8
licenseNone
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # CodecovCLI 

[![codecov](https://codecov.io/gh/codecov/codecov-cli/branch/master/graph/badge.svg?token=jN0CICuA6Z)](https://codecov.io/gh/codecov/codecov-cli)
[![Build-Test-Upload](https://github.com/codecov/codecov-cli/actions/workflows/push_flow.yml/badge.svg)](https://github.com/codecov/codecov-cli/actions/workflows/push_flow.yml)

CodecovCLI is a new way for users to interact with Codecov directly from the user’s terminal or CI platform. Many Codecov features that require the user’s interference can be done via the codecovCLI. It saves commits, creates reports, uploads coverage and has many more features.

- [CodecovCLI](#codecovcli)
- [Installing](#installing)
  - [Using PIP](#using-pip)
  - [As a Binary](#as-a-binary)
    - [Integrity Checking the Binary](#integrity-checking-the-binary)
- [How to Upload to Codecov](#how-to-upload-to-codecov)
  - [How to Get an Upload Token](#how-to-get-an-upload-token)
- [Usage](#usage)
- [Codecov-cli Commands](#codecov-cli-commands)
  - [create-commit](#create-commit)
  - [create-report](#create-report)
  - [do-upload](#do-upload)
  - [create-report-results](#create-report-results)
  - [get-report-results](#get-report-results)
  - [pr-base-picking](#pr-base-picking)
  - [send-notifications](#send-notifications)
  - [empty-upload](#empty-upload)
- [How to Use Local Upload](#how-to-use-local-upload)
- [Work in Progress Features](#work-in-progress-features)
  - [Plugin System](#plugin-system)
  - [Static Analysis](#static-analysis)
- [Contributions](#contributions)
  - [Requirements](#requirements)
  - [Guidelines](#guidelines)
  - [Dependencies](#dependencies)
- [Releases](#releases)

# Installing

## Using PIP
To use codecov-cli in your local machine, or your CI workflows, you need to install it:

`pip install codecov-cli`

The above command will download the latest version of Codecov-cli. If you wish to use a specific version, releases can be viewed [here](https://pypi.org/project/codecov-cli/#history). 

Note: If you're installing in a `pyenv` environment, you may need to call `pyenv rehash` before the CLI will work. 

## As a Binary
If you would like to use the CLI in an environment that does not have access to Python / PIP, you can install the CLI as a compiled binary. Linux and macOS releases can be found [here](https://cli.codecov.io/), along with SHASUMs and signatures for each released version. Binary releases are also available via [Github releases](https://github.com/codecov/codecov-cli/releases) on this repository. 

You can retrieve the Binary for Linux directly from your command line as follows:

```
curl -Os https://cli.codecov.io/latest/linux/codecov
sudo chmod +x codecov
./codecov --help
```

### Integrity Checking the Binary

The binary can be integrity checked using a SHASUM256 and SHASUM256.sig file. The process for macos and Linux is identical. Linux is as follows:

```
curl https://keybase.io/codecovsecurity/pgp_keys.asc | gpg --no-default-keyring --keyring trustedkeys.gpg --import # One-time step
curl -Os https://cli.codecov.io/latest/linux/codecov
curl -Os https://cli.codecov.io/latest/linux/codecov.SHA256SUM
curl -Os https://cli.codecov.io/latest/linux/codecov.SHA256SUM.sig

gpgv codecov.SHA256SUM.sig codecov.SHA256SUM

shasum -a 256 -c codecov.SHA256SUM
```

For macos you will want to use the macos distributions of the binary (e.g., https://cli.codecov.io/latest/macos/codecov)


# How to Upload to Codecov
If desired, the CLI can be used as a replacement for our [NodeJS Binary Uploader](https://github.com/codecov/uploader). To use the CLI to upload from your CI workflow, you need to add these commands: 

```
pip install codecov-cli
codecovcli create-commit
codecovcli create-report
codecovcli do-upload
```
OR 
```
pip install codecov-cli
codecovcli upload-process
```
codecovcli upload-process is a wrapper for create-commit, create-report and do-upload. 

You can customize the commands with the options aligned with each command. 

Note that these commands will automatically search your environment for a `$CODECOV_TOKEN` environment variable and use it if found. If you do not have a repository upload token, or global upload token, stored as an environment variable, you will need to pass it into **each command manually**, like so: `-t {$CODECOV_TOKEN}`. 

## How to Get an Upload Token
The following tokens are suitable for uploading:

* The [Repository Upload Token](https://docs.codecov.com/docs/codecov-uploader#upload-token): Found on the settings page of your repository, also viewable on the `/new` page when setting up a repository on Codecov for the first time. 
* The [Global Upload Token](https://docs.codecov.com/docs/codecov-uploader#organization-upload-token): Found on your organization settings page (e.g., `https://app.codecov.io/account/<scm>/<org>/org-upload-token`). 


# Usage 
If the installation is successful, running `codecovcli --help` will output the available commands along with the different general options that can be used with them. 
```
Usage: codecovcli [OPTIONS] COMMAND [ARGS]...
```
Codecov-cli supports user input. These inputs, along with their descriptions and usage contexts, are listed in the table below:

| Input  | Description | Usage |
| :---:     |     :---:   |    :---:   |
| `--auto-load-params-from`  | The CI/CD platform   | Optional |
| `--codecov-yml-path` | The path for your codecov.yml  | Optional
| `--enterprise-url` | Change the upload host (Enterprise use) | Optional
| `--version` | Codecov-cli's version | Optional
| `--verbose` or `-v` | Run the cli with verbose logging | Optional 

# Codecov-cli Commands
| Command  | Description | 
| :---:     |     :---:   |    
| `create-commit` | Saves the commit's metadata in codecov, it's only necessary to run this once per commit 
| `create-report` | Creates an empty report in codecov with initial data e.g. report name, report's commit 
| `do-upload` | Searches for and uploads coverage data to codecov 
| `create-report-results` | Used for local upload. It tells codecov that you finished local uploading and want it to calculate the results for you to get them locally.
| `get-report-results` | Used for local upload. It asks codecov to provide you the report results you calculated with the previous command. 
| `pr-base-picking` | Tells codecov that you want to explicitly define a base for your PR
| `upload-process` | A wrapper for 3 commands. Create-commit, create-report and do-upload. You can use this command to upload to codecov instead of using the previosly mentioned commands.
| `send-notifications` | A command that tells Codecov that you finished uploading and you want to be sent notifications. To disable automatically sent notifications please consider adding manual_trigger to your codecov.yml, so it will look like codecov: notify: manual_trigger: true.
>**Note**: Every command has its own different options that will be mentioned later in this doc. Codecov will try to load these options from your CI environment variables, if not, it will try to load them from git, if not found, you may need to add them manually. 



## create-commit 
`codecovcli create-commit [Options]`

| Option  | Description | Usage
| :---:     |     :---:   |    :---:   |   
| -C, --sha, --commit-sha | Commit SHA (with 40 chars) | Required
|--parent-sha | SHA (with 40 chars) of what should be the parent of this commit | Optional
|-P, --pr, --pull-request-number| Specify the pull request number manually. Used to override pre-existing CI environment variables | Optional
|-B, --branch | Branch to which this commit belongs to | Optional
|-r, --slug | owner/repo slug used instead of the private repo token in Self-hosted | Required
|-t, --token | Codecov upload token | Required 
|--git-service | Git Provider. Options: github, gitlab, bitbucket, github_enterprise, gitlab_enterprise, bitbucket_server | Required
|-h, --help | Shows usage, and command options                         


## create-report
`codecovcli create-report [OPTIONS]`

| Option  | Description | Usage
| :---:     |     :---:   |    :---:   |   
| -C, --sha, --commit-sha | Commit SHA (with 40 chars) | Required
|-r, --slug | owner/repo slug used instead of the private repo token in Self-hosted | Required
|-t, --token | Codecov upload token | Required 
|--git-service | Git Provider. Options: github, gitlab, bitbucket, github_enterprise, gitlab_enterprise, bitbucket_server | Required
|--code| The code of the report. This is used in local uploading to isolate local reports from regular or cloud reports uploaded to codecov so they don't get merged. It's basically a name you give to your report e.g. local-report. | Optional
|-h, --help | Shows usage, and command options      

## do-upload
`codecovcli do-upload [OPTIONS]`

| Option  | Description | Usage
| :---:     |     :---:   |    :---:   |   
|-C, --sha, --commit-sha|    Commit SHA (with 40 chars) | Required
|--report-code | The code of the report defined when creating the report. If unsure, leave default | Optional
|--network-root-folder |      Root folder from which to consider paths on the network section  default: (Current working directory) | Optional
|-s, --dir, --coverage-files-search-root-folder | Folder where to search for coverage files default: (Current Working Directory) | Optional
|--exclude, --coverage-files-search-exclude-folder | Folders to exclude from search | Optional
|-f, --file, --coverage-files-search-direct-file | Explicit files to upload | Optional
|--disable-search | Disable search for coverage files. This is helpful when specifying what files you want to upload with the --file option.| Optional
|-b, --build, --build-code | Specify the build number manually | Optional
|--build-url | The URL of the build where this is running | Optional
|--job-code | The job code for the CI run | Optional
|-t, --token | Codecov upload token | Required
|-n, --name | Custom defined name of the upload. Visible in Codecov UI | Optional
|-B, --branch | Branch to which this commit belongs to | Optional
|-r, --slug | owner/repo slug | Required
|-P, --pr, --pull-request-number | Specify the pull request number manually. Used to override pre-existing CI environment variables | Optional
|-e, --env, --env-var | Specify environment variables to be included with this build. | Optional
|-F, --flag | Flag the upload to group coverage metrics. Multiple flags allowed. | Optional
|--plugin | plugins to run. Options: xcode, gcov, pycoverage. The default behavior runs them all. | Optional
|-Z, --fail-on-error | Exit with non-zero code in case of error uploading.|Optional
|-d, --dry-run | Don't upload files to Codecov | Optional
|--legacy, --use-legacy-uploader | Use the legacy upload endpoint | Optional
|--git-service | Git Provider. Options: github, gitlab, bitbucket, github_enterprise, gitlab_enterprise, bitbucket_server | Required
|-h, --help | Shows usage, and command options 

## create-report-results
`codecovcli create-report-results [OPTIONS]`

| Option  | Description | Usage
| :---:     |     :---:   |    :---:   | 
|--commit-sha | Commit SHA (with 40 chars) | Required
|--code | The code of the report. If unsure, leave default | Required
|--slug | owner/repo slug | Required
|--git-service | Git provider. Options: github, gitlab, bitbucket, github_enterprise, gitlab_enterprise, bitbucket_server | Optional
|-t, --token | Codecov upload token | Required
|-h, --help | Shows usage, and command options

## get-report-results
`codecovcli get-report-results [OPTIONS]`

| Option  | Description | Usage
| :---:     |     :---:   |    :---:   | 
|--commit-sha | Commit SHA (with 40 chars) | Required
|--code | The code of the report. If unsure, leave default | Required
|--slug | owner/repo slug | Required
|--git-service | Git provider. Options: github, gitlab, bitbucket, github_enterprise, gitlab_enterprise, bitbucket_server | Optional
|-t, --token | Codecov upload token | Required
|-h, --help | Shows usage, and command options

## pr-base-picking
`codecovcli pr-base-picking [OPTIONS]`

| Option  | Description | Usage
| :---:     |     :---:   |    :---:   | 
|--base-sha | Base commit SHA (with 40 chars) | Required
|--pr  | Pull Request id to associate commit with | Required
|--slug | owner/repo slug | Required
|-t, --token| Codecov upload token | Required
|--service | Git provider. Options: github, gitlab, bitbucket, github_enterprise, gitlab_enterprise, bitbucket_server | Optional
|-h, --help | Shows usage, and command options

## send-notifications 
`codecovcli send-notifications [OPTIONS]`

| Option  | Description | Usage
| :---:     |     :---:   |    :---:   | 
| -C, --sha, --commit-sha TEXT    |Commit SHA (with 40 chars) | Required
| -r, --slug TEXT                 |owner/repo slug used instead of the private repo token in Self-hosted | Required
| -t, --token TEXT                |Codecov upload token | Required
| --git-service | Git provider. Options: github, gitlab, bitbucket, github_enterprise, gitlab_enterprise, bitbucket_server | Optional
| -h,--help                      |Show this message and exit.

## empty-upload

Used if the changes made don't need testing, but PRs require a passing codecov status to be merged.
This command will scan the files in the commit and send passing status checks configured if all the changed files
are ignored by codecov (including README and configuration files)

`Usage: codecovcli empty-upload [OPTIONS]`

Options:
  -C, --sha, --commit-sha TEXT    Commit SHA (with 40 chars)  [required]
  -Z, --fail-on-error             Exit with non-zero code in case of error
  --git-service [github|gitlab|bitbucket|github_enterprise|gitlab_enterprise|bitbucket_server]
  -t, --token TEXT                Codecov upload token
  -r, --slug TEXT                 owner/repo slug used instead of the private
                                  repo token in Self-hosted
  -h, --help                      Show this message and exit.

# How to Use Local Upload

The CLI also supports "dry run" local uploading. This is useful if you prefer to see Codecov status checks and coverage reporting locally, in your terminal, as opposed to opening a PR and waiting for your full CI to run. Local uploads do not interfere with regular uploads made from your CI for any given commit / Pull Request. 

Local Upload is accomplished as follows:

```
pip install codecov-cli
codecovcli create-commit
codecovcli create-report --code <CODE>
codecovcli do-upload --report-code <CODE>
codecovcli create-report-results --code <CODE>
codecovcli get-report-results --code <CODE>
```

Codecov will calculate the coverage results, and return them in your terminal, telling you whether your PR will fail or pass the coverage check.

Note: In order for Local Upload to work, it must be used against a commit on the origin repository. Local Upload does not work for arbitrary diffs or uncommitted changes on your local machine. 

# Work in Progress Features

The following features are somewhat implemented in code, but are not yet meant for use. These features will be documented once they are fully implemented in the CLI. 

## Plugin System

To provide extensibility to some of its commands, the CLI makes use of a plugin system. For most cases, the default commands are sufficient. But in some cases, having some custom logic specific to your use case can be beneficial. Note that full documentation of the plugin system is pending, as the feature is still heavily a work in progress.

## Static Analysis

The CLI can perform basic static analysis on Python code today. This static analysis is meant to power more future looking Codecov features and, as such, is not required or in active use today. As more functionality dependent on static analysis becomes available for use, we will document static analysis in detail here. 

# Contributions

This repository, like all of Codecov's repositories, strives to follow our general [Contributing guidlines](https://github.com/codecov/contributing). If you're considering making a contribution to this repository, we encourage review of our Contributing guidelines first. 

## Requirements

Most of this package is a very conventional Python package. The main difference is the static the CLI's analysis module uses both git submodules and C code

Before installing, one should pull the submodules with:

```
git submodule update --init
```
Then, install dependencies with
```
pip install -r requirements.txt 
python setup.py develop
```

The C code shouldn't require any additional setup to get running, but depending on your environment, you may be prompted to install compilers and supporting tools. If errors are generated during installation, it is likely due to missing dependencies / tools required of the C code. In many cases, resulting error messages should be clear enough to determine what is missing and how to install it, but common errors will be collected here as they are encountered.

## Guidelines

There are a few guidelines when developing in this system. Some notable folders:

1. `commands` - It's the folder that interacts with the caller. This is where the commands themselves should reside. These commands are not meant to do heavy lifting. They only do wiring, which is mostly parsing the input parameters. 
2. `services` - It's where the heavy logic resides. It's mostly organized by which command needs them. Commands should generally be thin wrappers around these services.
3. `helpers` - This is meant for logic that is useful across different commands. For example, logging helpers, or the logic that searches folders.

## Dependencies

If external dependencies need to be added, it's important to check whether those dependencies have wheels available on PyPI with the `any` or `universal2` platform tags. If those dependencies don't have those wheels available, then they will need to built during the CI, so they will have to be added to the list of
dependencies in the `--no-binary` flag when building the requirements for the macos release in `build_assets.yml`.

# Releases

The standard way to making a new release is the following:
1)  Open a PR that increases the version number in setup.py. As a rule of thumb, just add one to the micro/patch version (e.g., v0.1.6 -> v0.1.7).

2) Get the up-to-date master branch locally and run the `tag.release` command from the Makefile.

`$ make tag.release version=v<VERSION_NUM>`

The version tag must match the regex defined on the Makefile (`tag_regex := ^v([0-9]{1,}\.){2}[0-9]{1,}([-_]\w+)?$`).

>**Note**: \
>Releases with `test` word in them are created as `draft`. \
>Releases with `beta` word in them are created as `pre-release`.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "codecov-cli",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": null,
    "author": "Codecov",
    "author_email": "support@codecov.io",
    "download_url": "https://files.pythonhosted.org/packages/96/73/e18aaee2b3638528cfbece0615c34a59489f9063413744a31149558a0645/codecov-cli-0.6.0.tar.gz",
    "platform": null,
    "description": "# CodecovCLI \n\n[![codecov](https://codecov.io/gh/codecov/codecov-cli/branch/master/graph/badge.svg?token=jN0CICuA6Z)](https://codecov.io/gh/codecov/codecov-cli)\n[![Build-Test-Upload](https://github.com/codecov/codecov-cli/actions/workflows/push_flow.yml/badge.svg)](https://github.com/codecov/codecov-cli/actions/workflows/push_flow.yml)\n\nCodecovCLI is a new way for users to interact with Codecov directly from the user\u2019s terminal or CI platform. Many Codecov features that require the user\u2019s interference can be done via the codecovCLI. It saves commits, creates reports, uploads coverage and has many more features.\n\n- [CodecovCLI](#codecovcli)\n- [Installing](#installing)\n  - [Using PIP](#using-pip)\n  - [As a Binary](#as-a-binary)\n    - [Integrity Checking the Binary](#integrity-checking-the-binary)\n- [How to Upload to Codecov](#how-to-upload-to-codecov)\n  - [How to Get an Upload Token](#how-to-get-an-upload-token)\n- [Usage](#usage)\n- [Codecov-cli Commands](#codecov-cli-commands)\n  - [create-commit](#create-commit)\n  - [create-report](#create-report)\n  - [do-upload](#do-upload)\n  - [create-report-results](#create-report-results)\n  - [get-report-results](#get-report-results)\n  - [pr-base-picking](#pr-base-picking)\n  - [send-notifications](#send-notifications)\n  - [empty-upload](#empty-upload)\n- [How to Use Local Upload](#how-to-use-local-upload)\n- [Work in Progress Features](#work-in-progress-features)\n  - [Plugin System](#plugin-system)\n  - [Static Analysis](#static-analysis)\n- [Contributions](#contributions)\n  - [Requirements](#requirements)\n  - [Guidelines](#guidelines)\n  - [Dependencies](#dependencies)\n- [Releases](#releases)\n\n# Installing\n\n## Using PIP\nTo use codecov-cli in your local machine, or your CI workflows, you need to install it:\n\n`pip install codecov-cli`\n\nThe above command will download the latest version of Codecov-cli. If you wish to use a specific version, releases can be viewed [here](https://pypi.org/project/codecov-cli/#history). \n\nNote: If you're installing in a `pyenv` environment, you may need to call `pyenv rehash` before the CLI will work. \n\n## As a Binary\nIf you would like to use the CLI in an environment that does not have access to Python / PIP, you can install the CLI as a compiled binary. Linux and macOS releases can be found [here](https://cli.codecov.io/), along with SHASUMs and signatures for each released version. Binary releases are also available via [Github releases](https://github.com/codecov/codecov-cli/releases) on this repository. \n\nYou can retrieve the Binary for Linux directly from your command line as follows:\n\n```\ncurl -Os https://cli.codecov.io/latest/linux/codecov\nsudo chmod +x codecov\n./codecov --help\n```\n\n### Integrity Checking the Binary\n\nThe binary can be integrity checked using a SHASUM256 and SHASUM256.sig file. The process for macos and Linux is identical. Linux is as follows:\n\n```\ncurl https://keybase.io/codecovsecurity/pgp_keys.asc | gpg --no-default-keyring --keyring trustedkeys.gpg --import # One-time step\ncurl -Os https://cli.codecov.io/latest/linux/codecov\ncurl -Os https://cli.codecov.io/latest/linux/codecov.SHA256SUM\ncurl -Os https://cli.codecov.io/latest/linux/codecov.SHA256SUM.sig\n\ngpgv codecov.SHA256SUM.sig codecov.SHA256SUM\n\nshasum -a 256 -c codecov.SHA256SUM\n```\n\nFor macos you will want to use the macos distributions of the binary (e.g., https://cli.codecov.io/latest/macos/codecov)\n\n\n# How to Upload to Codecov\nIf desired, the CLI can be used as a replacement for our [NodeJS Binary Uploader](https://github.com/codecov/uploader). To use the CLI to upload from your CI workflow, you need to add these commands: \n\n```\npip install codecov-cli\ncodecovcli create-commit\ncodecovcli create-report\ncodecovcli do-upload\n```\nOR \n```\npip install codecov-cli\ncodecovcli upload-process\n```\ncodecovcli upload-process is a wrapper for create-commit, create-report and do-upload. \n\nYou can customize the commands with the options aligned with each command. \n\nNote that these commands will automatically search your environment for a `$CODECOV_TOKEN` environment variable and use it if found. If you do not have a repository upload token, or global upload token, stored as an environment variable, you will need to pass it into **each command manually**, like so: `-t {$CODECOV_TOKEN}`. \n\n## How to Get an Upload Token\nThe following tokens are suitable for uploading:\n\n* The [Repository Upload Token](https://docs.codecov.com/docs/codecov-uploader#upload-token): Found on the settings page of your repository, also viewable on the `/new` page when setting up a repository on Codecov for the first time. \n* The [Global Upload Token](https://docs.codecov.com/docs/codecov-uploader#organization-upload-token): Found on your organization settings page (e.g., `https://app.codecov.io/account/<scm>/<org>/org-upload-token`). \n\n\n# Usage \nIf the installation is successful, running `codecovcli --help` will output the available commands along with the different general options that can be used with them. \n```\nUsage: codecovcli [OPTIONS] COMMAND [ARGS]...\n```\nCodecov-cli supports user input. These inputs, along with their descriptions and usage contexts, are listed in the table below:\n\n| Input  | Description | Usage |\n| :---:     |     :---:   |    :---:   |\n| `--auto-load-params-from`  | The CI/CD platform   | Optional |\n| `--codecov-yml-path` | The path for your codecov.yml  | Optional\n| `--enterprise-url` | Change the upload host (Enterprise use) | Optional\n| `--version` | Codecov-cli's version | Optional\n| `--verbose` or `-v` | Run the cli with verbose logging | Optional \n\n# Codecov-cli Commands\n| Command  | Description | \n| :---:     |     :---:   |    \n| `create-commit` | Saves the commit's metadata in codecov, it's only necessary to run this once per commit \n| `create-report` | Creates an empty report in codecov with initial data e.g. report name, report's commit \n| `do-upload` | Searches for and uploads coverage data to codecov \n| `create-report-results` | Used for local upload. It tells codecov that you finished local uploading and want it to calculate the results for you to get them locally.\n| `get-report-results` | Used for local upload. It asks codecov to provide you the report results you calculated with the previous command. \n| `pr-base-picking` | Tells codecov that you want to explicitly define a base for your PR\n| `upload-process` | A wrapper for 3 commands. Create-commit, create-report and do-upload. You can use this command to upload to codecov instead of using the previosly mentioned commands.\n| `send-notifications` | A command that tells Codecov that you finished uploading and you want to be sent notifications. To disable automatically sent notifications please consider adding manual_trigger to your codecov.yml, so it will look like codecov: notify: manual_trigger: true.\n>**Note**: Every command has its own different options that will be mentioned later in this doc. Codecov will try to load these options from your CI environment variables, if not, it will try to load them from git, if not found, you may need to add them manually. \n\n\n\n## create-commit \n`codecovcli create-commit [Options]`\n\n| Option  | Description | Usage\n| :---:     |     :---:   |    :---:   |   \n| -C, --sha, --commit-sha | Commit SHA (with 40 chars) | Required\n|--parent-sha | SHA (with 40 chars) of what should be the parent of this commit | Optional\n|-P, --pr, --pull-request-number| Specify the pull request number manually. Used to override pre-existing CI environment variables | Optional\n|-B, --branch | Branch to which this commit belongs to | Optional\n|-r, --slug | owner/repo slug used instead of the private repo token in Self-hosted | Required\n|-t, --token | Codecov upload token | Required \n|--git-service | Git Provider. Options: github, gitlab, bitbucket, github_enterprise, gitlab_enterprise, bitbucket_server | Required\n|-h, --help | Shows usage, and command options                         \n\n\n## create-report\n`codecovcli create-report [OPTIONS]`\n\n| Option  | Description | Usage\n| :---:     |     :---:   |    :---:   |   \n| -C, --sha, --commit-sha | Commit SHA (with 40 chars) | Required\n|-r, --slug | owner/repo slug used instead of the private repo token in Self-hosted | Required\n|-t, --token | Codecov upload token | Required \n|--git-service | Git Provider. Options: github, gitlab, bitbucket, github_enterprise, gitlab_enterprise, bitbucket_server | Required\n|--code| The code of the report. This is used in local uploading to isolate local reports from regular or cloud reports uploaded to codecov so they don't get merged. It's basically a name you give to your report e.g. local-report. | Optional\n|-h, --help | Shows usage, and command options      \n\n## do-upload\n`codecovcli do-upload [OPTIONS]`\n\n| Option  | Description | Usage\n| :---:     |     :---:   |    :---:   |   \n|-C, --sha, --commit-sha|    Commit SHA (with 40 chars) | Required\n|--report-code | The code of the report defined when creating the report. If unsure, leave default | Optional\n|--network-root-folder |      Root folder from which to consider paths on the network section  default: (Current working directory) | Optional\n|-s, --dir, --coverage-files-search-root-folder | Folder where to search for coverage files default: (Current Working Directory) | Optional\n|--exclude, --coverage-files-search-exclude-folder | Folders to exclude from search | Optional\n|-f, --file, --coverage-files-search-direct-file | Explicit files to upload | Optional\n|--disable-search | Disable search for coverage files. This is helpful when specifying what files you want to upload with the --file option.| Optional\n|-b, --build, --build-code | Specify the build number manually | Optional\n|--build-url | The URL of the build where this is running | Optional\n|--job-code | The job code for the CI run | Optional\n|-t, --token | Codecov upload token | Required\n|-n, --name | Custom defined name of the upload. Visible in Codecov UI | Optional\n|-B, --branch | Branch to which this commit belongs to | Optional\n|-r, --slug | owner/repo slug | Required\n|-P, --pr, --pull-request-number | Specify the pull request number manually. Used to override pre-existing CI environment variables | Optional\n|-e, --env, --env-var | Specify environment variables to be included with this build. | Optional\n|-F, --flag | Flag the upload to group coverage metrics. Multiple flags allowed. | Optional\n|--plugin | plugins to run. Options: xcode, gcov, pycoverage. The default behavior runs them all. | Optional\n|-Z, --fail-on-error | Exit with non-zero code in case of error uploading.|Optional\n|-d, --dry-run | Don't upload files to Codecov | Optional\n|--legacy, --use-legacy-uploader | Use the legacy upload endpoint | Optional\n|--git-service | Git Provider. Options: github, gitlab, bitbucket, github_enterprise, gitlab_enterprise, bitbucket_server | Required\n|-h, --help | Shows usage, and command options \n\n## create-report-results\n`codecovcli create-report-results [OPTIONS]`\n\n| Option  | Description | Usage\n| :---:     |     :---:   |    :---:   | \n|--commit-sha | Commit SHA (with 40 chars) | Required\n|--code | The code of the report. If unsure, leave default | Required\n|--slug | owner/repo slug | Required\n|--git-service | Git provider. Options: github, gitlab, bitbucket, github_enterprise, gitlab_enterprise, bitbucket_server | Optional\n|-t, --token | Codecov upload token | Required\n|-h, --help | Shows usage, and command options\n\n## get-report-results\n`codecovcli get-report-results [OPTIONS]`\n\n| Option  | Description | Usage\n| :---:     |     :---:   |    :---:   | \n|--commit-sha | Commit SHA (with 40 chars) | Required\n|--code | The code of the report. If unsure, leave default | Required\n|--slug | owner/repo slug | Required\n|--git-service | Git provider. Options: github, gitlab, bitbucket, github_enterprise, gitlab_enterprise, bitbucket_server | Optional\n|-t, --token | Codecov upload token | Required\n|-h, --help | Shows usage, and command options\n\n## pr-base-picking\n`codecovcli pr-base-picking [OPTIONS]`\n\n| Option  | Description | Usage\n| :---:     |     :---:   |    :---:   | \n|--base-sha | Base commit SHA (with 40 chars) | Required\n|--pr  | Pull Request id to associate commit with | Required\n|--slug | owner/repo slug | Required\n|-t, --token| Codecov upload token | Required\n|--service | Git provider. Options: github, gitlab, bitbucket, github_enterprise, gitlab_enterprise, bitbucket_server | Optional\n|-h, --help | Shows usage, and command options\n\n## send-notifications \n`codecovcli send-notifications [OPTIONS]`\n\n| Option  | Description | Usage\n| :---:     |     :---:   |    :---:   | \n| -C, --sha, --commit-sha TEXT    |Commit SHA (with 40 chars) | Required\n| -r, --slug TEXT                 |owner/repo slug used instead of the private repo token in Self-hosted | Required\n| -t, --token TEXT                |Codecov upload token | Required\n| --git-service | Git provider. Options: github, gitlab, bitbucket, github_enterprise, gitlab_enterprise, bitbucket_server | Optional\n| -h,--help                      |Show this message and exit.\n\n## empty-upload\n\nUsed if the changes made don't need testing, but PRs require a passing codecov status to be merged.\nThis command will scan the files in the commit and send passing status checks configured if all the changed files\nare ignored by codecov (including README and configuration files)\n\n`Usage: codecovcli empty-upload [OPTIONS]`\n\nOptions:\n  -C, --sha, --commit-sha TEXT    Commit SHA (with 40 chars)  [required]\n  -Z, --fail-on-error             Exit with non-zero code in case of error\n  --git-service [github|gitlab|bitbucket|github_enterprise|gitlab_enterprise|bitbucket_server]\n  -t, --token TEXT                Codecov upload token\n  -r, --slug TEXT                 owner/repo slug used instead of the private\n                                  repo token in Self-hosted\n  -h, --help                      Show this message and exit.\n\n# How to Use Local Upload\n\nThe CLI also supports \"dry run\" local uploading. This is useful if you prefer to see Codecov status checks and coverage reporting locally, in your terminal, as opposed to opening a PR and waiting for your full CI to run. Local uploads do not interfere with regular uploads made from your CI for any given commit / Pull Request. \n\nLocal Upload is accomplished as follows:\n\n```\npip install codecov-cli\ncodecovcli create-commit\ncodecovcli create-report --code <CODE>\ncodecovcli do-upload --report-code <CODE>\ncodecovcli create-report-results --code <CODE>\ncodecovcli get-report-results --code <CODE>\n```\n\nCodecov will calculate the coverage results, and return them in your terminal, telling you whether your PR will fail or pass the coverage check.\n\nNote: In order for Local Upload to work, it must be used against a commit on the origin repository. Local Upload does not work for arbitrary diffs or uncommitted changes on your local machine. \n\n# Work in Progress Features\n\nThe following features are somewhat implemented in code, but are not yet meant for use. These features will be documented once they are fully implemented in the CLI. \n\n## Plugin System\n\nTo provide extensibility to some of its commands, the CLI makes use of a plugin system. For most cases, the default commands are sufficient. But in some cases, having some custom logic specific to your use case can be beneficial. Note that full documentation of the plugin system is pending, as the feature is still heavily a work in progress.\n\n## Static Analysis\n\nThe CLI can perform basic static analysis on Python code today. This static analysis is meant to power more future looking Codecov features and, as such, is not required or in active use today. As more functionality dependent on static analysis becomes available for use, we will document static analysis in detail here. \n\n# Contributions\n\nThis repository, like all of Codecov's repositories, strives to follow our general [Contributing guidlines](https://github.com/codecov/contributing). If you're considering making a contribution to this repository, we encourage review of our Contributing guidelines first. \n\n## Requirements\n\nMost of this package is a very conventional Python package. The main difference is the static the CLI's analysis module uses both git submodules and C code\n\nBefore installing, one should pull the submodules with:\n\n```\ngit submodule update --init\n```\nThen, install dependencies with\n```\npip install -r requirements.txt \npython setup.py develop\n```\n\nThe C code shouldn't require any additional setup to get running, but depending on your environment, you may be prompted to install compilers and supporting tools. If errors are generated during installation, it is likely due to missing dependencies / tools required of the C code. In many cases, resulting error messages should be clear enough to determine what is missing and how to install it, but common errors will be collected here as they are encountered.\n\n## Guidelines\n\nThere are a few guidelines when developing in this system. Some notable folders:\n\n1. `commands` - It's the folder that interacts with the caller. This is where the commands themselves should reside. These commands are not meant to do heavy lifting. They only do wiring, which is mostly parsing the input parameters. \n2. `services` - It's where the heavy logic resides. It's mostly organized by which command needs them. Commands should generally be thin wrappers around these services.\n3. `helpers` - This is meant for logic that is useful across different commands. For example, logging helpers, or the logic that searches folders.\n\n## Dependencies\n\nIf external dependencies need to be added, it's important to check whether those dependencies have wheels available on PyPI with the `any` or `universal2` platform tags. If those dependencies don't have those wheels available, then they will need to built during the CI, so they will have to be added to the list of\ndependencies in the `--no-binary` flag when building the requirements for the macos release in `build_assets.yml`.\n\n# Releases\n\nThe standard way to making a new release is the following:\n1)  Open a PR that increases the version number in setup.py. As a rule of thumb, just add one to the micro/patch version (e.g., v0.1.6 -> v0.1.7).\n\n2) Get the up-to-date master branch locally and run the `tag.release` command from the Makefile.\n\n`$ make tag.release version=v<VERSION_NUM>`\n\nThe version tag must match the regex defined on the Makefile (`tag_regex := ^v([0-9]{1,}\\.){2}[0-9]{1,}([-_]\\w+)?$`).\n\n>**Note**: \\\n>Releases with `test` word in them are created as `draft`. \\\n>Releases with `beta` word in them are created as `pre-release`.\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Codecov Command Line Interface",
    "version": "0.6.0",
    "project_urls": null,
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "544971c3ff7ce3bc045ccccb760c580503f080fc2b7834a9f0479300c9e50310",
                "md5": "ff2d41f5f60e2e69e6498a4a9c47fac2",
                "sha256": "0bee51b94bd30f194962069e504dd8d4754c805839218ba02a1d773b204b37d6"
            },
            "downloads": -1,
            "filename": "codecov_cli-0.6.0-cp311-cp311-macosx_12_6_x86_64.whl",
            "has_sig": false,
            "md5_digest": "ff2d41f5f60e2e69e6498a4a9c47fac2",
            "packagetype": "bdist_wheel",
            "python_version": "cp311",
            "requires_python": ">=3.8",
            "size": 291482,
            "upload_time": "2024-05-07T17:44:20",
            "upload_time_iso_8601": "2024-05-07T17:44:20.862359Z",
            "url": "https://files.pythonhosted.org/packages/54/49/71c3ff7ce3bc045ccccb760c580503f080fc2b7834a9f0479300c9e50310/codecov_cli-0.6.0-cp311-cp311-macosx_12_6_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d3976bbeab24e8950d7003c233d2382427e6d5a24c532d0db63790607b8244d7",
                "md5": "a4e07a4d80f3e18a4282f6ba9aa2f009",
                "sha256": "ce56f1d75504725a12f533cb552d9141ac3d6574c868f2357a038019870a16eb"
            },
            "downloads": -1,
            "filename": "codecov_cli-0.6.0-cp311-cp311-manylinux2014_x86_64.whl",
            "has_sig": false,
            "md5_digest": "a4e07a4d80f3e18a4282f6ba9aa2f009",
            "packagetype": "bdist_wheel",
            "python_version": "cp311",
            "requires_python": ">=3.8",
            "size": 291484,
            "upload_time": "2024-05-07T17:44:22",
            "upload_time_iso_8601": "2024-05-07T17:44:22.901082Z",
            "url": "https://files.pythonhosted.org/packages/d3/97/6bbeab24e8950d7003c233d2382427e6d5a24c532d0db63790607b8244d7/codecov_cli-0.6.0-cp311-cp311-manylinux2014_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "31b15da5e0bcb3db78f4ce581c1f070b13228db6d92c40f5ee6a6cea4aa76cb1",
                "md5": "d6d85b9d7888be05964327a842015f65",
                "sha256": "3a51f4465f33d452e5dec99fbed1c975e40110dfe68432fe0e296118329e51ea"
            },
            "downloads": -1,
            "filename": "codecov_cli-0.6.0-cp311-cp311-win_amd64.whl",
            "has_sig": false,
            "md5_digest": "d6d85b9d7888be05964327a842015f65",
            "packagetype": "bdist_wheel",
            "python_version": "cp311",
            "requires_python": ">=3.8",
            "size": 291474,
            "upload_time": "2024-05-07T17:44:24",
            "upload_time_iso_8601": "2024-05-07T17:44:24.773093Z",
            "url": "https://files.pythonhosted.org/packages/31/b1/5da5e0bcb3db78f4ce581c1f070b13228db6d92c40f5ee6a6cea4aa76cb1/codecov_cli-0.6.0-cp311-cp311-win_amd64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "9673e18aaee2b3638528cfbece0615c34a59489f9063413744a31149558a0645",
                "md5": "e3a2d13da1f885b521567669518de935",
                "sha256": "25d23c14d99f58c071d1db4d78aa9774a7407054cef49ca676ad805d1daaefe1"
            },
            "downloads": -1,
            "filename": "codecov-cli-0.6.0.tar.gz",
            "has_sig": false,
            "md5_digest": "e3a2d13da1f885b521567669518de935",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 276323,
            "upload_time": "2024-05-07T17:44:27",
            "upload_time_iso_8601": "2024-05-07T17:44:27.150335Z",
            "url": "https://files.pythonhosted.org/packages/96/73/e18aaee2b3638528cfbece0615c34a59489f9063413744a31149558a0645/codecov-cli-0.6.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-05-07 17:44:27",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "codecov-cli"
}
        
Elapsed time: 0.25091s