Skip to content

Commit

Permalink
SCons scripting to build docs from pipelines.
Browse files Browse the repository at this point in the history
WIP: first draft of pipelines doc build.

Needs .gitignore, flake8 guards, comments, tweaks.

WIP: doc build.

Outputs are now decent, but everything breaks with 'scons -j'.

WIP: doc build; final tuneups.
  • Loading branch information
TallJimbo committed Dec 21, 2021
1 parent 922acca commit 7447133
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 2 deletions.
4 changes: 4 additions & 0 deletions doc/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,7 @@ doxygen.conf
# Sphinx products
_build
py-api

# Doc content built by SCons
lsst.drp.pipe/pipelines
lsst.drp.pipe/pipelines_index.rst
21 changes: 21 additions & 0 deletions doc/SConscript
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
from lsst.sconsUtils.state import env, targets
from pathlib import Path
from lsst.pipe.base.pipeline_doc_builder import PackagePipelinesDocBuilder

target_root = Path(str(env.Dir("lsst.drp.pipe/pipelines")))
artifacts = list(
PackagePipelinesDocBuilder.from_source(
Path(str(env.Dir("#pipelines"))),
rst_root=target_root,
pipeline_root=target_root,
dot_root=target_root,
graph_root=target_root,
graph_suffix=".svg",
rst_path=Path(str(env.File("lsst.drp.pipe/pipelines_index.rst"))),
).scons_generate(env)
)

env.AlwaysBuild(artifacts)
env.Clean("doc", artifacts)

targets["doc"].extend(artifacts)
2 changes: 2 additions & 0 deletions doc/lsst.drp.pipe/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
lsst.drp.pipe
#############

.. include:: pipelines_index.rst

.. Paragraph that describes what this Python module does and links to related modules and frameworks.
.. .. _lsst.drp.pipe-using:
Expand Down
2 changes: 1 addition & 1 deletion doc/manifest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ modules:
# Static content directories are usually named after the package.
# Most packages do not need a static content directory (leave commented out).
# statics:
# - "_static/drp_pipe"
# - "_static"
4 changes: 3 additions & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@ exclude =
doc/conf.py,
**/*/__init__.py,
**/*/version.py,
tests/.tests
tests/.tests,
doc/**/pipelines/**/*.py

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

0 comments on commit 7447133

Please sign in to comment.