Installation¶
Using poetry¶
poetry add sphinx-modeling
Using pip¶
pip install sphinx-modeling
Using sources¶
git clone https://github.com/useblocks/sphinx-modeling
cd sphinx-modeling
pip install .
# or
poetry install
Activation¶
For final activation, please add sphinx_modeling to the project’s extension list of your conf.py file.
extensions = ["sphinx_modeling",]
For the full configuration, please read Configuration.
PlantUML support¶
A feature is planned for Sphinx-Modeling to export the defined user models into a diagram. For this PlantUML will be used and the Sphinx-extension sphinxcontrib-plantuml for generating the diagrams.
Both must be available and correctly configured to work.
Install PlantUML¶
Download the latest version of the plantuml.jar file: http://sourceforge.net/projects/plantuml/files/plantuml.jar/download
Make a new folder called
utils
inside your docs folder. Copy theplantuml.jar
file into theutils
folder.Install the plantuml sphinx extension:
pip install sphinxcontrib-plantuml
.Add
sphinxcontrib.plantuml
to the sphinx extension list inconf.py
extensions = ['sphinx_needs', 'sphinx_modeling', 'sphinxcontrib.plantuml', ]
Configure plantuml in
conf.py
plantuml = f'java -jar {os.path.join(os.path.dirname(__file__), "utils", "plantuml.jar")}'
plantuml_output_format = 'png'