Skip to content

Commit 2e7c2bd

Browse files
committed
feat: add pdoc for leveraging python docstrings for documentation
1 parent 3589ff5 commit 2e7c2bd

File tree

4 files changed

+203
-4
lines changed

4 files changed

+203
-4
lines changed

.github/workflows/pages.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
---
2+
name: Deploy static content to Pages
3+
4+
on:
5+
push:
6+
branches:
7+
- main
8+
9+
workflow_dispatch:
10+
11+
permissions:
12+
contents: read
13+
pages: write
14+
id-token: write
15+
actions: read
16+
17+
concurrency:
18+
group: "pages"
19+
cancel-in-progress: true
20+
21+
jobs:
22+
deploy:
23+
environment:
24+
name: github-pages
25+
url: ${{ steps.deployment.outputs.page_url }}
26+
runs-on: ubuntu-latest
27+
strategy:
28+
fail-fast: false
29+
steps:
30+
- uses: actions/checkout@v5
31+
- uses: snok/[email protected]
32+
- name: Install Dependencies
33+
run: poetry install
34+
shell: bash
35+
- run: pdoc ./roborock -o docs/pdoc
36+
- name: Setup Pages
37+
uses: actions/configure-pages@v5
38+
- name: Upload artifact
39+
uses: actions/upload-pages-artifact@v3
40+
with:
41+
# Upload pdoc output
42+
path: 'docs/pdoc/'
43+
- name: Deploy to GitHub Pages
44+
id: deployment
45+
uses: actions/deploy-pages@v4

poetry.lock

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

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ aioresponses = "^0.7.7"
5151
freezegun = "^1.5.1"
5252
pytest-timeout = "^2.3.1"
5353
syrupy = "^4.9.1"
54+
pdoc = "^15.0.4"
5455

5556
[tool.semantic_release]
5657
branch = "main"

roborock/__init__.py

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,26 @@
1-
"""Roborock API."""
1+
"""Roborock API.
2+
3+
.. include:: ../README.md
4+
"""
25

36
from roborock.b01_containers import *
47
from roborock.code_mappings import *
58
from roborock.containers import *
69
from roborock.exceptions import *
710
from roborock.roborock_typing import *
11+
12+
__all__ = [
13+
"web_api",
14+
"version_1_apis",
15+
"version_a01_apis",
16+
"containers",
17+
"b01_containers",
18+
"const",
19+
"cloud_api",
20+
"clean_modes",
21+
"code_mappings",
22+
"roborock_typing",
23+
"exceptions",
24+
25+
# We'll add new APIs here in the future e.g. devices/
26+
]

0 commit comments

Comments
 (0)