Skip to content

Commit

Permalink
chore: using pdoc instead of pdoc3 for doc build
Browse files Browse the repository at this point in the history
We cannot support repos that clearly engage into  backhanded tactics: pdoc3/pdoc#64
  • Loading branch information
kjczarne committed Sep 27, 2021
1 parent 5f55216 commit 6a46f8c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion kalash/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@
.. include:: ./pdoc/contributing.md
.. include:: ./pdoc/trailer.md
"""

__docformat__ = "restructuredtext"
__version__ = "4.0.0"
2 changes: 1 addition & 1 deletion kalash/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ def make_loader_and_trigger_object(
def docs():
"""Open bundled documentation in the web browser."""
base_dir = os.path.dirname(__file__)
rel_docpath = ['built_docs', 'html', 'kalash', 'index.html']
rel_docpath = ['built_docs', 'kalash.html']
docpath = os.path.join(base_dir, *rel_docpath)
_platform = platform.system()
if _platform == "Darwin" or "Linux":
Expand Down
4 changes: 2 additions & 2 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class Tasks:
coverage = lambda posargs: f'coverage {posargs}'
build_wheel = 'python -m setup bdist_wheel'
send = r'twine upload dist/*.whl -u __token__ -p'
docs = 'pdoc --html kalash --force'
docs = 'pdoc kalash -o .'
quality = 'flake8'


Expand Down Expand Up @@ -100,7 +100,7 @@ def docs(session: nox.Session):
if not os.path.exists(built_docs_dir):
os.makedirs(built_docs_dir)
_copy_and_sanitize_paths_for_pdoc3('kalash/doc', pdoc_dir)
session.install('pdoc3', '.')
session.install('pdoc', '.')
cwd = os.getcwd()
session.chdir(built_docs_dir)
session.run(*split_cmd(Tasks.docs))
Expand Down

1 comment on commit 6a46f8c

@xiaohk
Copy link

@xiaohk xiaohk commented on 6a46f8c Oct 9, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good choice!

Please sign in to comment.