Skip to content

Commit 4837711

Browse files
authored
Add job to generate dependencies graph (#267)
2 parents a16d498 + f34b3cf commit 4837711

File tree

5 files changed

+35
-3
lines changed

5 files changed

+35
-3
lines changed

.github/workflows/documentation.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,14 @@ jobs:
5757
- name: Install project as a package
5858
run: python -m pip install -e .
5959

60+
# this job must run before installing other dependencies to avoid listing everything
61+
- name: Generates dependencies graph page with pipdetree
62+
run: |
63+
python -m pip install -U "pipdeptree<3"
64+
echo -e "\`\`\`{mermaid}" > docs/misc/dependencies.md
65+
pipdeptree --exclude pip,pipdeptree,setuptools,wheel --mermaid >> docs/misc/dependencies.md
66+
echo -e "\`\`\`" >> docs/misc/dependencies.md
67+
6068
# this job must run before installing other dependencies to avoid listing everything
6169
- name: Generates licenses page with pip-licences
6270
run: |

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,9 @@ dmypy.json
132132

133133
version_info.txt
134134
_logs/
135+
*.exe
135136
*.pfx
136137
docs/misc/licenses.md
138+
docs/misc/dependencies.md
137139
QGISDeploymentToolbelt_*Ubuntu*
138140
tests/fixtures/tmp/*

docs/conf.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@
4949
"sphinx_argparse_cli",
5050
"sphinx_copybutton",
5151
"sphinx_design",
52+
"sphinxcontrib.mermaid",
5253
"sphinxext.opengraph",
5354
]
5455

@@ -140,6 +141,15 @@
140141

141142
# -- Extension configuration -------------------------------------------------
142143

144+
# mermaid
145+
mermaid_params = [
146+
"--theme",
147+
"forest",
148+
"--width",
149+
"600",
150+
"--backgroundColor",
151+
"transparent",
152+
]
143153

144154
# MyST Parser
145155
myst_enable_extensions = [

docs/misc/credits.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,18 @@
11
# Credits
22

3-
## Dependencies
4-
53
- [Python 3](https://www.python.org/)
64
- [PyInstaller](https://www.pyinstaller.org/) to generate the Windows executable
75

6+
## Dependencies
7+
8+
> Generated with [pipdeptree](https://pypi.org/project/pipdeptree/).
9+
10+
```{include} dependencies.md
11+
12+
```
13+
14+
## Licenses
15+
816
> Generated with [pip-licenses](https://pypi.org/project/pip-licenses/)
917
1018
```{include} licenses.md

requirements/documentation.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,13 @@
33

44
furo==2023.*
55
myst-parser[linkify]>=0.18,<1.1
6-
pip-licenses>=4,<5
76
sphinx-argparse-cli>=1,<2
87
sphinx-autobuild==2021.3.14
98
sphinx-copybutton<1
109
sphinx-design>=0.3,<0.5
10+
sphinxcontrib-mermaid<1
1111
sphinxext-opengraph>=0.4,<1
12+
13+
# -- 'HIDDEN' dependencies, used during CI
14+
# pip-licenses<5
15+
# pipdeptree<3

0 commit comments

Comments
 (0)