diff --git a/doc/.gitignore b/doc/.gitignore index ad2c2bbf..122b7a30 100644 --- a/doc/.gitignore +++ b/doc/.gitignore @@ -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 diff --git a/doc/SConscript b/doc/SConscript new file mode 100644 index 00000000..fa953a96 --- /dev/null +++ b/doc/SConscript @@ -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) diff --git a/doc/lsst.drp.pipe/index.rst b/doc/lsst.drp.pipe/index.rst index 518b0f05..9b1073d0 100644 --- a/doc/lsst.drp.pipe/index.rst +++ b/doc/lsst.drp.pipe/index.rst @@ -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: diff --git a/doc/manifest.yaml b/doc/manifest.yaml index 1b1e6eb8..931370d1 100644 --- a/doc/manifest.yaml +++ b/doc/manifest.yaml @@ -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" diff --git a/setup.cfg b/setup.cfg index 53fa4eb2..6e52d805 100644 --- a/setup.cfg +++ b/setup.cfg @@ -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 \ No newline at end of file