From b3a1acf3b8cb4f0f9e311838336669bbbd4dee6f Mon Sep 17 00:00:00 2001 From: Anaconda Bot Date: Fri, 10 May 2024 13:42:55 +0000 Subject: [PATCH] chore(pre-commit): linting --- README.md | 74 ++++++++++++++++++++++++++++++++++++++----------------- 1 file changed, 52 insertions(+), 22 deletions(-) diff --git a/README.md b/README.md index eb2fcee..c04885c 100644 --- a/README.md +++ b/README.md @@ -40,19 +40,49 @@ from generate_cli_output import main main(command="generate-renovate-annotations --help") ]]] --> ```shell -Usage: generate-renovate-annotations [OPTIONS] ENV_FILES... - -╭─ Arguments ──────────────────────────────────────────────────────────────────╮ -│ * env_files ENV_FILES... [default: None] [required] │ -╰──────────────────────────────────────────────────────────────────────────────╯ -╭─ Options ────────────────────────────────────────────────────────────────────╮ -│ --internal-pip-package TEXT [default: None] │ -│ --internal-pip-index-url TEXT │ -│ --create-command TEXT [default: make setup] │ -│ --environment-selector TEXT [default: -p ./env] │ -│ --disable-environment-creation │ -│ --help Show this message and exit. │ -╰──────────────────────────────────────────────────────────────────────────────╯ +  + Usage: generate-renovate-annotations [OPTIONS] ENV_FILES... COMMAND [ARGS]...   +  + Generate Renovate comments for a list of conda environment files. + For each file, we: + +  • Run a command to ensure the environment is created/updated  +  • Extract a list of installed packages in that environment, including pip  +  • Generate a Renovate annotation comment, including the package name and   +  channel. This step also allows for overriding the index of pip packages.  +  • Pin the exact installed version of each dependency.  + +╭─ Arguments ──────────────────────────────────────────────────────────────────╮ +│ * env_files ENV_FILES... A list of conda environment files, │ +│ typically passed in from pre-commit │ +│ automatically │ +│ [default: None]  │ +│ [required]  │ +╰──────────────────────────────────────────────────────────────────────────────╯ +╭─ Options ────────────────────────────────────────────────────────────────────╮ +│ --internal-pip-package TEXT One or more packages to pull │ +│ from the │ +│ --internal-pip-index-url │ +│ [default: None]  │ +│ --internal-pip-index-url TEXT An optional extra pip index URL, │ +│ used in conjunction with the │ +│ --internal-pip-package option │ +│ --create-command TEXT A command to invoke at each │ +│ parent directory of all │ +│ environment files to ensure the │ +│ conda environment is created and │ +│ updated │ +│ [default: make setup]  │ +│ --environment-selector TEXT A string used to select the │ +│ conda environment, either │ +│ prefix-based (recommended) or │ +│ named │ +│ [default: -p ./env]  │ +│ --disable-environment-creation   If set, environment will not be │ +│ created/updated before │ +│ annotations are added. │ +│ --help   Show this message and exit. │ +╰──────────────────────────────────────────────────────────────────────────────╯ ``` @@ -116,15 +146,15 @@ import os, sys; sys.path.insert(0, os.path.join(os.getcwd(), "dev")) from generate_makefile_targets_table import main; main() ]]] --> -| Target | Description | -|-----------------|-----------------------------------------------------| -| `help` | Display help on all Makefile targets | -| `setup` | Setup local conda environment for development | -| `install-hooks` | Download + install all pre-commit hooks | -| `pre-commit` | Run pre-commit against all files | -| `type-check` | Run static type checks | -| `test` | Run all the unit tests | -| `cog-readme` | Run cog on the README.md to generate command output | +| Target | Description | +|-----------------|--------------------------------------------------------------------------| +| `help` | Display help on all Makefile targets | +| `setup` | Setup local conda environment for development | +| `install-hooks` | Download + install all pre-commit hooks | +| `pre-commit` | Run pre-commit against all files | +| `type-check` | Run static type checks | +| `test` | Run all the unit tests | +| `cog-readme` | Run cog on the README.md to generate command output | > **Note:** Interestingly, the table above is generated by the `cog` hook defined in this repo :smile: