Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

📝 Drop typer CLI usage doc generation #542

Merged
merged 1 commit into from
Feb 27, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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