From 3c08e40e7a761f2be7e6d7dacb847b6884b5bb0f Mon Sep 17 00:00:00 2001 From: "Samuel Hierholzer (Adfinis AG)" Date: Wed, 18 Dec 2024 09:52:11 +0100 Subject: [PATCH] fixup! docs: Generate documentation with sphinx --- Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 0396a4b..ba5ff38 100644 --- a/Makefile +++ b/Makefile @@ -65,7 +65,7 @@ test: pytest mypy lint-code ## run all testing .PHONY: docs -docs: poetry-install +docs: poetry-install ## generate documentation rm -vrf docs/_build/* docs/cli/* [[ -d docs/sphinx-template ]] || git clone https://github.com/adfinis-sygroup/adsy-sphinx-template docs/sphinx-template @docker compose exec testing bash -c "poetry install --only docs" @@ -76,13 +76,13 @@ docs: poetry-install # Generate CLI docs @docker compose exec testing bash -c "mkdir -p docs/_temp && poetry run mdclick dumps --baseModule=pyaptly.cli --baseCommand=pyaptly --docsPath=./docs/_temp" - + @cat docs/_temp/pyaptly.md docs/_temp/pyaptly-*.md > docs/Command_Line_Reference.md # mdclick has not enough indentation @sed -i 's/^#/##/' docs/Command_Line_Reference.md # Add title, must happen after the above sed command @sed -i '1a\n# Command Line Reference' docs/Command_Line_Reference.md - @rm -r docs/_temp + @docker compose exec testing bash -c "rm -r docs/_temp" # SPHINX Render @docker compose exec testing bash -c 'cd docs/ && poetry run make html'