Skip to content

Commit b2947cf

Browse files
committed
flat is better than nested
1 parent 2fb6a73 commit b2947cf

File tree

3 files changed

+6
-9
lines changed

3 files changed

+6
-9
lines changed

.github/workflows/generate.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ jobs:
1313
- name: Install uv
1414
uses: astral-sh/setup-uv@v6
1515
- name: Generate the list of grants
16-
run: uv run pyvec-docs gen grants > ./docs/operations/grants.rst
16+
run: uv run pyvec-docs gen-grants > ./docs/operations/grants.rst
1717
env:
1818
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1919
- name: Generate the list of boards
20-
run: uv run pyvec-docs gen boards > ./docs/operations/boards.rst
20+
run: uv run pyvec-docs gen-boards > ./docs/operations/boards.rst
2121
- name: Create PR
2222
uses: peter-evans/create-pull-request@v7
2323
with:

CONTRIBUTING.rst

+2
Original file line numberDiff line numberDiff line change
@@ -99,3 +99,5 @@ Některé stránky a soubory se generují automaticky pomocí skriptů. Tyto skr
9999

100100
- Generuje se ``operations/boards.rst`` ze `souboru boards.toml <https://github.com/pyvec/docs.pyvec.org/blob/master/src/pyvec_docs/boards.toml>`_ a ze šablony ``operations/boards.rst``.
101101
- Generuje se ``operations/grants.rst`` z dat na `pyvec/money <https://github.com/pyvec/money>`_ a ze šablony ``operations/grants.rst``.
102+
103+
Kód pro generování je v ``src/pyvec_docs/cli.py``. Skripty jde pouštět např. ``uv run pyvec-docs gen-boards``, výstup jde do ``stdout``.

src/pyvec_docs/cli.py

+2-7
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,7 @@ def watch() -> None:
4040
sys.exit(1)
4141

4242

43-
@main.group()
44-
def gen() -> None:
45-
pass
46-
47-
48-
@gen.command(name="grants")
43+
@main.command()
4944
@click.option(
5045
"--template",
5146
"template_path",
@@ -126,7 +121,7 @@ def gen_grants(
126121
click.echo(tpl.render(grants=grants))
127122

128123

129-
@gen.command(name="boards")
124+
@main.command()
130125
@click.option(
131126
"--template",
132127
"template_path",

0 commit comments

Comments
 (0)