Skip to content

Commit

Permalink
Update invokation
Browse files Browse the repository at this point in the history
  • Loading branch information
kdeldycke committed Jul 3, 2024
1 parent cbd0885 commit d693351
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 15 deletions.
14 changes: 9 additions & 5 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,18 @@ jobs:
- uses: actions/[email protected]
with:
python-version: "3.12"
- name: Install click-extra

- name: Install uv
run: |
python -m pip install -r https://raw.githubusercontent.com/kdeldycke/workflows/v4.1.4/requirements/uv.txt
- name: Install project
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade poetry
poetry install --all-extras --no-interaction
uv venv --system
uv pip install --all-extras ./pyproject.toml
- name: Generate dynamic doc
run: |
poetry run python -m click_extra.docs_update
uv run python -m click_extra.docs_update
- uses: peter-evans/[email protected]
with:
assignees: ${{ github.actor }}
Expand Down
29 changes: 19 additions & 10 deletions docs/commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -273,20 +273,29 @@ $ git clone https://github.com/kdeldycke/click-extra
$ cd click-extra
(...)
$ poetry install
$ python -m pip install uv
(...)
$ poetry run python -m pip install dbt-core
$ uv venv
(...)
$ poetry run python -m pip install aws-sam-cli
$ source .venv/bin/activate
(...)
$ uv pip install --all-extras ./pyproject.toml
(...)
$ uv run python -m pip install dbt-core
(...)
$ uv run python -m pip install aws-sam-cli
(...)
```
That way I had the latest Click Extra, `dbt` and `aws-sam-cli` installed in the same virtual environment:
```shell-session
$ poetry run dbt --version
$ uv run dbt --version
Core:
- installed: 1.6.1
- latest: 1.6.2 - Update available!
Expand All @@ -301,7 +310,7 @@ Plugins:
```
```shell-session
$ poetry run sam --version
$ uv run sam --version
SAM CLI, version 1.97.0
```
````
Expand Down Expand Up @@ -331,7 +340,7 @@ if __name__ == "__main__":
And this simple script gets rendered into:

```shell-session
$ poetry run python ./wrap.py
$ uv run python ./wrap.py
Usage: wrap.py [OPTIONS] COMMAND [ARGS]...
Options:
Expand Down Expand Up @@ -365,7 +374,7 @@ You can compare the output of the `aws_sam` subcommand with its original one:
`````{tab-set}
````{tab-item} aws_sam subcommand in wrap.py
```shell-session
$ poetry run python ./wrap.py aws_sam --help
$ uv run python ./wrap.py aws_sam --help
Usage: wrap.py aws_sam [OPTIONS] COMMAND [ARGS]...
AWS Serverless Application Model (SAM) CLI
Expand Down Expand Up @@ -429,7 +438,7 @@ Examples:
````{tab-item} Vanilla sam CLI
```shell-session
$ poetry run sam --help
$ uv run sam --help
Usage: sam [OPTIONS] COMMAND [ARGS]...
AWS Serverless Application Model (SAM) CLI
Expand Down Expand Up @@ -496,9 +505,9 @@ Here is the highlighted differences to make them even more obvious:

```diff
@@ -1,5 +1,5 @@
-$ poetry run python ./wrap.py aws_sam --help
-$ uv run python ./wrap.py aws_sam --help
-Usage: wrap.py aws_sam [OPTIONS] COMMAND [ARGS]...
+$ poetry run sam --help
+$ uv run sam --help
+Usage: sam [OPTIONS] COMMAND [ARGS]...

AWS Serverless Application Model (SAM) CLI
Expand Down

0 comments on commit d693351

Please sign in to comment.