-
Notifications
You must be signed in to change notification settings - Fork 33
/
Copy path.readthedocs.yaml
41 lines (38 loc) · 2.08 KB
/
.readthedocs.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# SPDX-FileCopyrightText: Contributors to the Power Grid Model project <[email protected]>
#
# SPDX-License-Identifier: MPL-2.0
version: 2
# Build from the docs/ directory with Sphinx
sphinx:
configuration: docs/conf.py
build:
os: "ubuntu-22.04"
tools:
python: "3.11"
apt_packages:
- graphviz
jobs:
post_install:
# Build package with doc requirements from pyproject.optional-dependencies
- pip install --verbose --editable .[doc]
# remove API DLL define in header
- find power_grid_model_c/power_grid_model_c/include -name *.h -exec sed -i -r "s/#define PGM.*//g" {} \;
- find power_grid_model_c/power_grid_model_c/include -name *.h -exec sed -i -r "s/PGM_API //g" {} \;
# build doxygen for C header
- cd docs/doxygen && doxygen && cd ../..
# build class and package diagrams
- pyreverse --no-standalone -o dot src/power_grid_model
- ccomps -x classes.dot | dot -Grankdir=LR -Nfontsize=13 -Efontsize=13 | gvpack -m100 -array_l1 | neato -n2 -Tsvg -o docs/_static/classes.svg
- dot packages.dot -Grankdir=TD -Nfontsize=13 -Efontsize=13 -Tsvg -o docs/_static/packages.svg
- rm packages.dot classes.dot
# download support
- wget -P docs/release_and_support https://github.com/PowerGridModel/.github/raw/main/RELEASE.md
- wget -P docs/release_and_support https://github.com/PowerGridModel/.github/raw/main/SUPPORT.md
- wget -P docs/release_and_support https://github.com/PowerGridModel/.github/raw/main/SECURITY.md
- wget -P docs/release_and_support https://github.com/PowerGridModel/.github/raw/main/CITATION.md
# download contribution
- wget -P docs/contribution https://github.com/PowerGridModel/.github/raw/main/GOVERNANCE.md
- wget -P docs/contribution https://github.com/PowerGridModel/.github/raw/main/CONTRIBUTING.md
- wget -P docs/contribution https://github.com/PowerGridModel/.github/raw/main/CODE_OF_CONDUCT.md
# fix links
- find docs/release_and_support -name "*.md" -exec sed -i -r "s|./CONTRIBUTING.md|../contribution/CONTRIBUTING.md|g" {} \;