pdoc_prep: Add sphinx-like function doc specs to pdoc
Prepares Python files that use sphinx-like parameter and return specifications for input to the pdoc documentation tool (https://pypi.org/project/pdoc/).
Motivation:
The pdoc HTML output does not recognize function/method parameter and return specifications in doc strings as special. So,
:param foo: controls whether bar is set to None
:type foo: int
:return True for success, else False
:rtype bool
will show up literally. If a module to be documentated is instead preprocessed using this script, then the pdoc documentation will look like this:
foo (int): controls whether bar is set to None
returns True for success, else False
return type: bool
The keywords, such as returns, and parameters, such as foo (int) will be bold faced.
Note: whether ':' is used to introduce a specification, or '@' is controlled from a command line option. See main section below.
Usage
shell> pdoc_run.py --html-dir docs src/pdoc_prep/pdoc_prep.py
This command may be run from the project root, from within the evolving docs directory, or in the package directory. Obviously, the paths need to be adjusted accordingly.
Notes
Note 1: You may see:
DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
import imp
This warning occurs in pdoc, which is not modified by this preprocessor. To suppress the warning, you can define an environment variable:
export PYTHONWARNINGS=ignore
in the shell where you are working.
Note2: It would be more sensible to include this functionality in the pdoc HTML production code itself. Alas, not enough time.
Metadata
Release files for pdoc-prep 0.0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| pdoc_prep-0.0.4.tar.gz | 60.9 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pdoc_prep-0.0.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 77.4 kB
Release files / pdoc_prep-0.0.4.tar.gz
| Download URL | pdoc_prep-0.0.4.tar.gz |
|---|---|
| Size | 60.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
27318826a66e6bbd0cec44917c9222e365586a2274cb9005dafd374f58936ae3
|
|
BLAKE2b-256 checksum How to use checksums |
628251579f0ca8908ef9d5c22dba35087d1fd3bc7874d318768c095473a7b33b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1
|
Release files / pdoc_prep-0.0.4-py3-none-any.whl
| Download URL | pdoc_prep-0.0.4-py3-none-any.whl |
|---|---|
| Size | 16.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fb3f01a174e5bf254f46f127487b7be1aca77aa54e6c488e0d1f41904c80713f
|
|
BLAKE2b-256 checksum How to use checksums |
ee04462f34d89f03f12641f76d718fa7ad15af38f36fcc20776ca4ec15c40c3a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1
|
Security for pdoc-prep 0.0.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.