Documentation builder for Python packages
Project description
GenPackageDoc Description
The Python package GenPackageDoc generates the documentation of Python modules. The content of this documentation is taken out of the docstrings of functions, classes and their methods.
It is possible to extend the documentation by the content of additional files either in reStructuredText (RST) format or in LaTeX format.
The documentation is generated in four steps:
- Files in LaTeX format are taken over immediately.
- Files in reStructuredText format are converted to LaTeX files.
- All docstrings of all Python modules in the package are converted to LaTeX files.
- All LaTeX files together are converted to a single PDF document. This requires a separately installed LaTeX distribution (recommended: TeX Live). A LaTeX distribution is not part of GenPackageDoc and has to be installed separately!
How to install
GenPackageDoc can be installed in two different ways.
-
Installation via PyPi (recommended for users)
pip install GenPackageDoc
-
Installation via GitHub (recommended for developers)
-
Clone the python-genpackagedoc repository to your machine
git clone https://github.com/test-fullautomation/python-genpackagedoc.git
-
Install dependencies
GenPackageDoc requires some additional Python libraries. Before you install the cloned repository sources you have to install the dependencies manually. The names of all related packages you can find in the file
requirements.txt
in the repository root folder. Use pip to install them:pip install -r requirements.txt
Additionally install LaTeX (recommended: TeX Live). This is required.
Additionally install PlantUML. This is an option.
-
Configure dependencies
GenPackageDoc uses LaTeX to generate the documentation in PDF format. GenPackageDoc also supports PlantUML. PlantUML requires Java.
GenPackageDoc needs to know where to find those applications. This is defined in the GenPackageDoc configuration file
packagedoc\packagedoc_config.json
Before you start the installation you have to introduce the following environment variables, that are used in
packagedoc_config.json
:GENDOC_LATEXPATH
: path topdflatex
executableGENDOC_PLANTUML_PATH
: path toplantuml
executable (optional)JAVA_HOME
: path tojava
executable (optional, only in case of PlantUML is used)
-
Use the following command to install GenPackageDoc:
setup.py install
-
How to use
GenPackageDoc provides a toolchain to generate documentation out of Python sources that are stored within a repository. GenPackageDoc is also designed to be able to consider setup informations of a repository.
The impact is: There is a deep relationship between the repository containing the sources to be documented, and the sources and the configuration of GenPackageDoc itself. Therefore GenPackageDoc needs to be configured to get to know about things like the path to the package sources and the desired name of the generated documentation PDF file.
GenPackageDoc is able to use it's own sources to document itself. Therefore the complete GenPackageDoc repository can be used as example about about writing a package documentation.
At the end of all preparations you will get for your own repository a PDF document that will look like this: GenPackageDoc.pdf (that is the detailed documentation of GenPackageDoc).
Feedback
To give us a feedback, you can send an email to Thomas Pollerspöck
In case you want to report a bug or request any interesting feature, please don't hesitate to raise a ticket.
Maintainers
Contributors
License
Copyright 2020-2023 Robert Bosch GmbH
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file GenPackageDoc-0.41.1.tar.gz
.
File metadata
- Download URL: GenPackageDoc-0.41.1.tar.gz
- Upload date:
- Size: 360.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f450b7c0c39df40f8300c09e46f383b2303449cb4f75aff974bfc77125ad2e12 |
|
MD5 | 269b9cbb7110d92657d86c321d19cb3f |
|
BLAKE2b-256 | 4343d60dfd0c63437ecfdf685168f49979cb4c225db474fb20ed23cc2f23b8b6 |
File details
Details for the file GenPackageDoc-0.41.1-py3-none-any.whl
.
File metadata
- Download URL: GenPackageDoc-0.41.1-py3-none-any.whl
- Upload date:
- Size: 363.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 037652db9f0053e5af165f1f2e4103087b2b563c61e4ee30a35a622cda655e62 |
|
MD5 | 08a879bf17f03f4a388f1dc3c10d4019 |
|
BLAKE2b-256 | 91534124f7fe099a92cea0781cfdffadcc7750fd42dbd341696dca5b2281a93c |