Skip to content

Commit

Permalink
Fix pydoc generation
Browse files Browse the repository at this point in the history
  • Loading branch information
tcaiazzi committed Jul 20, 2023
1 parent cdaf635 commit 04010e1
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 18 deletions.
18 changes: 5 additions & 13 deletions scripts/pydoc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,15 @@

.PHONY: all doc verify-doc clean

all: clean doc verify-doc
all: doc

doc: clean verify-doc
python3 generate_doc.py
cd docs && rm Kathara.model.md Kathara.setting.md Kathara.manager.md
sed '/manager.md/d' ./docs/Kathara-API-Docs.md
sed '/setting.md/d' ./docs/Kathara-API-Docs.md
sed '/docker.md/d' ./docs/Kathara-API-Docs.md
sed '/kubernetes.md/d' ./docs/Kathara-API-Docs.md
sed '/KubernetesSettingsAddon.md/d' ./docs/Kathara-API-Docs.md
sed '/DockerSettingsAddon.md/d' ./docs/Kathara-API-Docs.md
sed '/model.md/d' ./docs/Kathara-API-Docs.md
sed 's/\.\///g' ./docs/Kathara-API-Docs.md
sed 's/\.md//g' ./docs/Kathara-API-Docs.md
sed '/Modules/,/Classes/d' ./docs/Kathara-API-Docs.md
sed '/Functions/q' ./docs/Kathara-API-Docs.md
sed '/Functions/d' ./docs/Kathara-API-Docs.md
sed -i 's/\.\///' docs/Kathara-API-Docs.md
sed -i 's/\.md//' docs/Kathara-API-Docs.md
sed -i '/Modules/,/Classes/{/Classes/!d;}' docs/Kathara-API-Docs.md
rm docs/.pages

verify-doc:
python3 -m pip install lazydocs pydocstyle
Expand Down
14 changes: 9 additions & 5 deletions scripts/pydoc/generate_doc.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
from lazydocs import generate_docs

ignored_modules = [
"Kathara.version", "Kathara.auth", "Kathara.cli", "Kathara.event", "Kathara.foundation",
"Kathara.manager.docker.terminal", "Kathara.manager.kubernetes.terminal", "Kathara.os",
"Kathara.parser", "Kathara.test", "Kathara.trdparty", "Kathara.validator", "Kathara.kathara", "Kathara.decorators",
"Kathara.exceptions", "Kathara.strings", "Kathara.utils", "Kathara.webhooks", "kathara"
"Kathara.version", "Kathara.auth", "Kathara.cli", "Kathara.trdparty", "Kathara.foundation.cli",
"Kathara.foundation.test", "Kathara.exceptions", "Kathara.webhooks", "Kathara.validator", "Kathara.test", "kathara",
"Kathara.manager.kubernetes.terminal.KubernetesWSTerminal", "Kathara.foundation.factory",
"Kathara.manager.docker.terminal.DockerTTYTerminal",
"Kathara.foundation.manager.terminal.Terminal", "Kathara.foundation.manager.ManagerFactory",
"Kathara.foundation.setting.SettingsAddon", "Kathara.foundation.setting.SettingsAddonFactory",
"Kathara.setting.addon.DockerSettingsAddon", "Kathara.setting.addon.KubernetesSettingsAddon"
]

generate_docs(["../../src"], src_base_url="https://github.com/KatharaFramework/Kathara/tree/master", output_path="./docs",
generate_docs(["../../src"],
src_base_url="https://github.com/KatharaFramework/Kathara/tree/main", output_path="./docs",
ignored_modules=ignored_modules,
overview_file="Kathara-API-Docs.md", remove_package_prefix=False)

0 comments on commit 04010e1

Please sign in to comment.