Skip to content
This repository was archived by the owner on Jul 16, 2025. It is now read-only.

Commit a3ef63a

Browse files
authored
Merge pull request #138 from codecov/update-readme-pre-oss
Update README.md
2 parents c6f6c8d + 3b9bd9d commit a3ef63a

File tree

1 file changed

+42
-24
lines changed

1 file changed

+42
-24
lines changed

README.md

Lines changed: 42 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@
22

33
[![codecov](https://codecov.io/gh/codecov/codecov-cli/branch/master/graph/badge.svg?token=jN0CICuA6Z)](https://codecov.io/gh/codecov/codecov-cli)
44

5-
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 amazing features.
5+
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.
66

77
- [Installing](#installing)
8+
- [Using PIP](#using-pip)
9+
- [As a Binary](#as-a-binary)
810
- [Usage](#usage)
911
- [Codecov-cli Commands](#codecov-cli-commands)
1012
- [create-commit](#create-commit)
@@ -14,28 +16,33 @@ CodecovCLI is a new way for users to interact with Codecov directly from the use
1416
- [get-report-results](#get-report-results)
1517
- [pr-base-picking](#pr-base-picking)
1618
- [How to upload to Codecov](#how-to-upload-to-codecov)
17-
- [How to Local upload](#how-to-local-upload)
18-
- [Plugin System](#plugin-system)
19+
- [How to Use Local Upload](#how-to-use-local-upload)
20+
- [Work in Progress Features](#work-in-progress-features)
21+
- [Plugin System](#plugin-system)
22+
- [Static Analysis](#static-analysis)
1923
- [Contributions](#contributions)
2024
- [Requirements](#requirements)
2125
- [Guidelines](#guidelines)
2226
- [Releases](#releases)
2327

2428
# Installing
2529

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

2833
`pip install codecov-cli`
2934

30-
The above command will download the latest version of Codecov-cli. If you wish to use a specific version, releases can be viewed [here]().
31-
You can also find Codecovcli [here](https://cli.codecov.io/) or in the [Github releases](https://github.com/codecov/codecov-cli/releases) where you can download the binary distributable files.
35+
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).
36+
37+
## As a Binary
38+
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.
3239

3340
# Usage
3441
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.
3542
```
3643
Usage: codecovcli [OPTIONS] COMMAND [ARGS]...
3744
```
38-
Codecov-cli supports inputs from the user. These inputs, along with their descriptions and usage contexts, are listed in the table below:
45+
Codecov-cli supports user input. These inputs, along with their descriptions and usage contexts, are listed in the table below:
3946

4047
| Input | Description | Usage |
4148
| :---: | :---: | :---: |
@@ -48,7 +55,7 @@ Codecov-cli supports inputs from the user. These inputs, along with their descri
4855
# Codecov-cli Commands
4956
| Command | Description |
5057
| :---: | :---: |
51-
| `create-commit` | Saves the commit's metadata in codecov, only need to do it once for a commit
58+
| `create-commit` | Saves the commit's metadata in codecov, it's only necessry to run this once per commit
5259
| `create-report` | Creates an empty report in codecov with initial data e.g. report name, report's commit
5360
| `do-upload` | Searches for and uploads coverage data to codecov
5461
| `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.
@@ -150,8 +157,9 @@ Codecov-cli supports inputs from the user. These inputs, along with their descri
150157
|--service | Git provider. Options: github, gitlab, bitbucket, github_enterprise, gitlab_enterprise, bitbucket_server | Optional
151158
|--help | Shows usage, and command options
152159

153-
# How to upload to Codecov
154-
In your CI workflow, you need to add these commands:
160+
# How to Upload to Codecov
161+
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:
162+
155163
```
156164
pip install codecovcli
157165
codecovcli create-commit
@@ -160,8 +168,12 @@ codecovcli do-upload
160168
```
161169
You can customize the commands with the options aligned with each command.
162170

163-
# How to Local upload:
164-
If you CI workflow takes too much time to run, and you have to wait for it to finish to know the coverage results, you can make your changes locally, make a PR and then run these commands:
171+
# How to Use Local Upload
172+
173+
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.
174+
175+
Local Upload is accomplished as follows:
176+
165177
```
166178
pip install codecovcli
167179
codecovcli create-commit
@@ -173,21 +185,27 @@ codecovcli get-report-results --code <CODE>
173185

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

188+
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.
189+
190+
# Work in Progress Features
191+
192+
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.
176193

177-
# Plugin System
194+
## Plugin System
178195

179-
In some of the commands, there is a plugin system. For most cases, one might find that changing them is not really needed. But in some cases, have some custom logic run would be beneficial
196+
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.
180197

198+
## Static Analysis
181199

182-
WIP
200+
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.
183201

184202
# Contributions
185203

186204
## Requirements
187205

188-
To start, most of this package is a normal Python package. The main different thing is the static analysis tool that uses both git submodules and c code
206+
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
189207

190-
Before installing, one should pull the submodules with
208+
Before installing, one should pull the submodules with:
191209

192210
```
193211
git submodule update --init
@@ -198,20 +216,20 @@ pip install -r requirements.txt
198216
python setup.py develop
199217
```
200218

201-
The c code shouldn't require anything in most places, but it might ask you to install compilers and stuff. Most of the times you can find the instructions online given the error message
219+
The C code shouldn't require anything additional setup to get running, but depending on your enviroment, you may be prompted to install compilers and supporting tools. If errors are generating 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.
202220

203221
## Guidelines
204222

205-
There are a few guidelines when developing in this systems. We have a few notable folders:
223+
There are a few guidelines when developing in this systems. Some notable folders:
206224

207-
1. `commands` - It's the folder that interacts with the caller. This is where the commands themselves should live. They are not meant to do heavy lifting. They only do wiring, which is mostly parsing the input parameters
208-
2. `services` - It's where the heavy logic lives. It's mostly organizaed by which command needs them.
209-
3. `helpers` - This is meant for logic that is probably useful accross different commands. For example, logging helpers, or the logic the searches folders
225+
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.
226+
2. `services` - It's where the heavy logic resides. It's mostly organizaed by which command needs them. Commands should generally be thin wrappers around these services.
227+
3. `helpers` - This is meant for logic that is useful accross different commands. For example, logging helpers, or the logic the searches folders.
210228

211229
# Releases
212230

213231
The standard way to making a new release is the following:
214-
1) Open a PR that increases the version number in setup.py. As a rule of thumb, just add one to the micro version (number most to the right).
232+
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).
215233

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

@@ -221,4 +239,4 @@ The version tag must match the regex defined on the Makefile (`tag_regex := ^v([
221239

222240
>**Note**: \
223241
>Releases with `test` word in them are created as `draft`. \
224-
>Releases with `beta` work in them are created as `pre-release`.
242+
>Releases with `beta` word in them are created as `pre-release`.

0 commit comments

Comments
 (0)