Skip to content

Commit 22221ac

Browse files
committed
Changing documentation system from pdoc3 to mkdocs with mkapi
1 parent 3470565 commit 22221ac

File tree

8 files changed

+185
-33
lines changed

8 files changed

+185
-33
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ It includes automatic generation of API documentation, tests using PyTest, code
6565
Flake8 linting to enforce standardized Python coding, virtual environments using Poetry, workflow automation using Poe the Poet,
6666
code formatting using black and a space optimized Dockerfile to kickstart your project and run tests using the power of Docker containers.
6767

68-
All you need to do is to install [Cookiecutter](https://cookiecutter.readthedocs.io/en/1.7.2/usage.html)!
68+
You only need to install [Cookiecutter](https://cookiecutter.readthedocs.io/en/1.7.2/usage.html)!
6969

7070
---
7171

{{cookiecutter.project_slug}}/.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ __pycache__/
66
*.py[cod]
77
*$py.class
88

9+
# Remove html generated by documentation
10+
11+
docs/html
12+
913
# Remove tests and coverage reports
1014
docs/cov-report
1115
docs/pytest_report.html

{{cookiecutter.project_slug}}/docs/api/{{cookiecutter.project_slug}}/index.html

Whitespace-only changes.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Welcome to MkDocs
2+
3+
For full documentation visit [mkdocs.org](https://www.mkdocs.org).
4+
5+
## Commands
6+
7+
* `mkdocs new [dir-name]` - Create a new project.
8+
* `mkdocs serve` - Start the live-reloading docs server.
9+
* `mkdocs build` - Build the documentation site.
10+
* `mkdocs -h` - Print help message and exit.
11+
12+
## Project layout
13+
14+
mkdocs.yml
15+
docs/
16+
index.md
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
site_name: MkApi
2+
site_url: https://github.com/nullhack
3+
site_description: API documentation with MkDocs.
4+
site_author: nullhack
5+
site_dir: html
6+
7+
plugins:
8+
- search
9+
- mkapi
10+
11+
theme:
12+
name: readthedocs
13+
14+
nav:
15+
- index.md
16+
- API: mkapi/api/python_base_package
17+
- Tests: mkapi/tests/tests
18+

{{cookiecutter.project_slug}}/poetry.lock

Lines changed: 141 additions & 30 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

{{cookiecutter.project_slug}}/pyproject.toml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,12 @@ black = {version = "^22.3.0", allow-prereleases = true}
2222
xdoctest = "^1.0.0"
2323
Pygments = "^2.11.2"
2424
darglint = "^1.8.1"
25-
pdoc3 = "^0.10.0"
2625
cookiecutter = "^1.7.3"
2726
pylint = "^2.13.4"
2827
poethepoet = "^0.16.4"
28+
mkdocs = "^1.4.2"
29+
mkapi = "^1.0.14"
30+
mako = "^1.2.3"
2931
pep8-naming = "^0.12.1"
3032
mypy = "^0.942"
3133
flake8 = "^4.0.1"
@@ -140,7 +142,7 @@ run = "poetry run python -m {{cookiecutter.package_name}}.{{cookiecutter.module_
140142
test = "poetry run pytest"
141143
pre-commit = "poetry run pre-commit run --all-files"
142144
lint = "poetry run flake8"
143-
doc = "poetry run pdoc --html . --force --output-dir docs/api"
145+
doc = "poetry run mkdocs serve --use-directory-urls -f docs/mkdocs.yaml"
144146

145147
[tool.poe.tasks.docker-build]
146148
cmd = """
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"""Init file for test module."""

0 commit comments

Comments
 (0)