Skip to content

Commit

Permalink
📝 Drop typer CLI usage doc generation
Browse files Browse the repository at this point in the history
`typer-cli` not very actively maintained and is causing dependency
conflicts for newer dependency versions. Given the fairly minor benefit
of automatic CLI usage doc generation, dropping it entirely to remove
the `typer-cli` dependency.
  • Loading branch information
TeoZosa committed Feb 27, 2022
1 parent 5e2200e commit 815b94a
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 32 deletions.
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -301,8 +301,6 @@ cruft update

- Documentation building
with [Sphinx](https://www.sphinx-doc.org/en/master/index.html)
- CLI reference
with the [typer-cli documentation generator](https://typer.tiangolo.com/typer-cli/#generate-docs-with-typer-cli)
- Rich automatic documentation from type annotations and docstrings (NumPy, Google,
etc.)
with [`sphinx-autoapi`](https://github.com/readthedocs/sphinx-autoapi)
Expand Down
7 changes: 0 additions & 7 deletions {{cookiecutter.project_slug}}/docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,7 @@ clean:

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
#{%- if cookiecutter.project_boilerplate_type == 'cli' %}
%: USAGE_PAGE := source/usage.md
#{%- endif %}
%: Makefile
#{%- if cookiecutter.project_boilerplate_type == 'cli' %}
@echo "# Usage" > "$(USAGE_PAGE)"
poetry run typer $(shell git rev-parse --show-toplevel)/{{cookiecutter.package_name}}/main.py utils docs --name {{cookiecutter.package_name}} | tail -n +2 >> "$(USAGE_PAGE)"
#{%- endif %}
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
ifneq ($(filter html,$(MAKECMDGOALS)),)
ifneq ($(shell command -v open),)
Expand Down
16 changes: 0 additions & 16 deletions {{cookiecutter.project_slug}}/docs/source/usage.md

This file was deleted.

8 changes: 1 addition & 7 deletions {{cookiecutter.project_slug}}/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -64,17 +64,14 @@ sphinx = { version = "^4.4.0", optional = true}
sphinx-autoapi = { version = "^1.8.4", optional = true}
sphinx-rtd-theme = { version = "^1.0.0", optional = true}
sphinxcontrib-confluencebuilder = { version = "^1.7.1", optional = true}
{%- if cookiecutter.project_boilerplate_type == 'cli' %}
typer-cli = { version = "^0.0.12", optional = true}
{%- endif %}
types-emoji = { version = "^1.2.7", optional = true} # PEP 561 compliant stub package for mypy

# Project-Specific
python-dotenv = "^0.19.2"
{%- if cookiecutter.project_boilerplate_type == 'cli' %}
importlib-metadata = "^4.11.1"
rich = "^11.2.0"
typer = {extras = ["all"], version = "^0.3.2"}
typer = {extras = ["all"], version = "^0.4.0"}
{%- else %}
numpy = "^1.22.2"
pandas = "^1.4.1"
Expand Down Expand Up @@ -143,9 +140,6 @@ docs = [
"sphinx-autoapi",
"sphinx-rtd-theme",
"sphinxcontrib-confluencebuilder",
{%- if cookiecutter.project_boilerplate_type == 'cli' %}
"typer-cli",
{%- endif %}
"types-emoji",
]

Expand Down

0 comments on commit 815b94a

Please sign in to comment.