Skip to content

Commit 0efd55f

Browse files
committed
chore: try using stubdoc to generate documentation
1 parent c3da494 commit 0efd55f

5 files changed

Lines changed: 20 additions & 3 deletions

File tree

.github/workflows/docs.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,9 @@ jobs:
102102
source .venv/bin/activate
103103
uv sync --active
104104
# comment out cookies module import
105-
sed -i 's/from .cookies/#from .cookies/' ./python/impit/__init__.pyi
105+
sed -i 's/from .cookies/#from .cookies/' ./python/impit/impit.pyi
106106
sed -i 's/from .cookies/#from .cookies/' ./python/impit/__init__.py
107+
sed -i 's/__version__/#__version__/' ./python/impit/__init__.py
107108
# copy empty impit.py to avoid Sphinx errors
108109
cp ./docs/stub.py ./python/impit/impit.py
109110

impit-python/docs/conf.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@
1616
# -- General configuration ---------------------------------------------------
1717
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
1818

19-
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.coverage', 'sphinx.ext.napoleon', 'myst_parser']
19+
extensions = ['stubdoc', 'sphinx.ext.autodoc', 'sphinx.ext.coverage', 'sphinx.ext.napoleon', 'myst_parser']
20+
21+
module_names = ["impit"]
2022

2123
templates_path = ['_templates']
2224
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']

impit-python/pyproject.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ keywords = [
2828
"browser",
2929
"impersonation",
3030
]
31-
dependencies = []
3231

3332
[project.urls]
3433
"Homepage" = "https://apify.github.io/impit/"
@@ -52,6 +51,7 @@ dev = [
5251
"sphinx>=7.4.7",
5352
"myst-parser>=3.0.1",
5453
"furo",
54+
"stubdoc",
5555
]
5656

5757
[tool.maturin]
@@ -126,3 +126,5 @@ warn_return_any = true
126126
warn_unreachable = true
127127
warn_unused_ignores = true
128128

129+
[tool.uv.sources]
130+
stubdoc = { git = "https://github.com/bayashi-cl/stubdoc" }

impit-python/uv.lock

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

0 commit comments

Comments
 (0)