Build UML diagrams in the documentation.
Project description
sphinx-uml
Overview
sphinx-uml is a python package that provides:
- A Sphinx extension, called using
.. uml, which generates UML diagrams from python modules, just likesphinx-pyreverse. - The
pyreverse2command, that extendspyreverseprovided bypylint.
Compared to sphinx-pyreverse,
sphinx-uml outputs enriched dot or
SVG UML diagrams.
- responsive to light/black Sphinx themes (as pydata);
- if the HTML address is known, the class/attribute/method names can be clicked to browse the corresponding documentation page.
Features
.. uml directive
UML diagrams can be obtained by using the .. uml directive.
Example:
.. uml:: example.module.b1
:caption: UML diagram of ``example.module.b1``
:classes:
:packages:
This toy example
shows how to use the .. uml directive in a Sphinx documentation using
sphinx.ext.autodoc and
sphinx.ext.autosummary.
pyreverse2
The pyreverse2 behaves like the original pyreverse command with two main differences:
--ouput:svganddotare the only supported output formats;--sphinx-html-dircan be used to indicate where is the HTML root directory.
Example: In the example below, we assume that:
- the
examplepackage has been installed - the documentation has been built in $HOME/git/sphinx-pyreverse/example/docs/_build/html/
# Generate the UML diagram for each value of x
for x in example example.module example.module.submodule example.module.submodule.c1
do
pyreverse2 \
--sphinx-html-dir $HOME/git/sphinx-uml/example/docs/_build/html/ \
--output svg \
--project $x \
$x
# The previous command outputs {classes,packages}_$o.svg
done
Documentation
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sphinx_uml-0.3.2.tar.gz.
File metadata
- Download URL: sphinx_uml-0.3.2.tar.gz
- Upload date:
- Size: 12.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b2c0a235a72b211a2e56b81db8532cd4dc705d845d620d8b747b3f5937636fe9
|
|
| MD5 |
ee12c23b541a30a6f08befc64a126618
|
|
| BLAKE2b-256 |
0f95a8c8d9e262e1e6770c06086d18ffff788f31b2d6e63466cc147003b38d9e
|
Provenance
The following attestation bundles were made for sphinx_uml-0.3.2.tar.gz:
Publisher:
publish_on_pypi.yml on ibgp2/sphinx-uml
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sphinx_uml-0.3.2.tar.gz -
Subject digest:
b2c0a235a72b211a2e56b81db8532cd4dc705d845d620d8b747b3f5937636fe9 - Sigstore transparency entry: 258322003
- Sigstore integration time:
-
Permalink:
ibgp2/sphinx-uml@334b9ffc76d6bc3ba8d01f114151817153039405 -
Branch / Tag:
refs/tags/v0.3.2 - Owner: https://github.com/ibgp2
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish_on_pypi.yml@334b9ffc76d6bc3ba8d01f114151817153039405 -
Trigger Event:
push
-
Statement type:
File details
Details for the file sphinx_uml-0.3.2-py3-none-any.whl.
File metadata
- Download URL: sphinx_uml-0.3.2-py3-none-any.whl
- Upload date:
- Size: 14.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
04952dd13e3d6795c358cc5545d33ea2e0025d46ab6f6c80bc875049f69bbbfc
|
|
| MD5 |
d06a005d34a0a557d3ceada49252ca43
|
|
| BLAKE2b-256 |
57f5c6f9117451daa19442d74b8819d79c989a3b9363625797b4b0e6f1e4c170
|
Provenance
The following attestation bundles were made for sphinx_uml-0.3.2-py3-none-any.whl:
Publisher:
publish_on_pypi.yml on ibgp2/sphinx-uml
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sphinx_uml-0.3.2-py3-none-any.whl -
Subject digest:
04952dd13e3d6795c358cc5545d33ea2e0025d46ab6f6c80bc875049f69bbbfc - Sigstore transparency entry: 258322015
- Sigstore integration time:
-
Permalink:
ibgp2/sphinx-uml@334b9ffc76d6bc3ba8d01f114151817153039405 -
Branch / Tag:
refs/tags/v0.3.2 - Owner: https://github.com/ibgp2
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish_on_pypi.yml@334b9ffc76d6bc3ba8d01f114151817153039405 -
Trigger Event:
push
-
Statement type: