Skip to content

Commit ed760fd

Browse files
committed
SCons scripting to build docs from pipelines.
1 parent 922acca commit ed760fd

File tree

5 files changed

+31
-2
lines changed

5 files changed

+31
-2
lines changed

Diff for: doc/.gitignore

+4
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,7 @@ doxygen.conf
88
# Sphinx products
99
_build
1010
py-api
11+
12+
# Doc content built by SCons
13+
lsst.drp.pipe/pipelines
14+
lsst.drp.pipe/pipelines_index.rst

Diff for: doc/SConscript

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
from lsst.sconsUtils.state import env, targets
2+
from pathlib import Path
3+
from lsst.pipe.base.pipeline_doc_builder import PackagePipelinesDocBuilder
4+
5+
target_root = Path(str(env.Dir("lsst.drp.pipe/pipelines")))
6+
artifacts = list(
7+
PackagePipelinesDocBuilder.from_source(
8+
Path(str(env.Dir("#pipelines"))),
9+
rst_root=target_root,
10+
pipeline_root=target_root,
11+
dot_root=target_root,
12+
graph_root=target_root,
13+
graph_suffix=".svg",
14+
rst_path=Path(str(env.File("lsst.drp.pipe/pipelines_index.rst"))),
15+
).scons_generate(env)
16+
)
17+
18+
env.AlwaysBuild(artifacts)
19+
env.Clean("doc", artifacts)
20+
21+
targets["doc"].extend(artifacts)

Diff for: doc/lsst.drp.pipe/index.rst

+2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
lsst.drp.pipe
77
#############
88

9+
.. include:: pipelines_index.rst
10+
911
.. Paragraph that describes what this Python module does and links to related modules and frameworks.
1012
1113
.. .. _lsst.drp.pipe-using:

Diff for: doc/manifest.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ modules:
99
# Static content directories are usually named after the package.
1010
# Most packages do not need a static content directory (leave commented out).
1111
# statics:
12-
# - "_static/drp_pipe"
12+
# - "_static"

Diff for: setup.cfg

+3-1
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,10 @@ exclude =
77
doc/conf.py,
88
**/*/__init__.py,
99
**/*/version.py,
10-
tests/.tests
10+
tests/.tests,
11+
doc/**/pipelines/**/*.py
1112

1213
[tool:pytest]
1314
addopts = --flake8
1415
flake8-ignore = E133 E226 E228 N802 N803 N806 N812 N813 N815 N816 W503
16+
doc/**/pipelines/**/*.py ALL

0 commit comments

Comments
 (0)