Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DM-33034: SCons scripting to build docs from pipelines. #1

Open
wants to merge 1 commit into
base: u/jbosch/DM-33034/review-base
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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