From 07bde25532820cb319b599dbe0624d7dfedbac69 Mon Sep 17 00:00:00 2001 From: Michelle Gower Date: Mon, 2 Feb 2026 14:07:17 -0600 Subject: [PATCH 1/3] Bump minimum Python version to 3.12. --- .github/workflows/build.yaml | 4 ++-- doc/changes/DM-54006.misc.rst | 1 + pyproject.toml | 7 +++---- 3 files changed, 6 insertions(+), 6 deletions(-) create mode 100644 doc/changes/DM-54006.misc.rst diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index a196b165..b2934f1f 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -13,7 +13,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.11", "3.12", "3.13", "3.14"] + python-version: ["3.12", "3.13", "3.14"] steps: - uses: actions/checkout@v6 @@ -82,7 +82,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v6 with: - python-version: "3.11" + python-version: "3.13" - name: Install dependencies run: | diff --git a/doc/changes/DM-54006.misc.rst b/doc/changes/DM-54006.misc.rst new file mode 100644 index 00000000..5fd9d8b7 --- /dev/null +++ b/doc/changes/DM-54006.misc.rst @@ -0,0 +1 @@ +Bumped minimum Python version to 3.12. diff --git a/pyproject.toml b/pyproject.toml index 8108e9fc..a37b5548 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "lsst-ctrl-bps" -requires-python = ">=3.11.0" +requires-python = ">=3.12.0" description = "Pluggable execution of workflow graphs from Rubin pipelines." license = "BSD-3-Clause OR GPL-3.0-or-later" license-files = ["COPYRIGHT", "LICENSE", "bsd_license.txt", "gpl-v3.0.txt"] @@ -16,7 +16,6 @@ classifiers = [ "Intended Audience :: Science/Research", "Operating System :: OS Independent", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", "Programming Language :: Python :: 3.14", @@ -100,7 +99,7 @@ bps = "lsst.ctrl.bps.cli.bps:main" [tool.black] line-length = 110 -target-version = ["py311"] +target-version = ["py312"] [tool.isort] profile = "black" @@ -134,7 +133,7 @@ exclude_lines = [ [tool.ruff] line-length = 110 -target-version = "py311" +target-version = "py312" exclude = [ "__init__.py", ] From d92d8973087a5943329b3e2f57d2ce6ab0f3d0b3 Mon Sep 17 00:00:00 2001 From: Michelle Gower Date: Mon, 2 Feb 2026 14:09:23 -0600 Subject: [PATCH 2/3] Drop ``black`` and ``isort`` sections. --- doc/changes/DM-54006.misc.rst | 2 +- pyproject.toml | 9 --------- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/doc/changes/DM-54006.misc.rst b/doc/changes/DM-54006.misc.rst index 5fd9d8b7..0ff0b138 100644 --- a/doc/changes/DM-54006.misc.rst +++ b/doc/changes/DM-54006.misc.rst @@ -1 +1 @@ -Bumped minimum Python version to 3.12. +Bumped minimum Python version to 3.12. Dropped ``black`` and ``isort`` sections from ``pyproject.toml``. diff --git a/pyproject.toml b/pyproject.toml index a37b5548..3b548db1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -97,15 +97,6 @@ bps = "lsst.ctrl.bps.cli.bps:main" name = "An API Removal or Deprecation" showcontent = true -[tool.black] -line-length = 110 -target-version = ["py312"] - -[tool.isort] -profile = "black" -line_length = 110 -known_first_party = ["lsst"] - [tool.lsst_versions] write_to = "python/lsst/ctrl/bps/version.py" From a53720760fd365c159f6a7cfabc0ea43d534c978 Mon Sep 17 00:00:00 2001 From: Michelle Gower Date: Mon, 2 Feb 2026 19:30:47 -0600 Subject: [PATCH 3/3] Switch docs action to use sphinxutils. --- .github/workflows/build_docs.yaml | 4 ++-- .gitignore | 1 + doc/changes/DM-54006.misc.rst | 2 +- doc/conf.py | 20 +++----------------- doc/documenteer.toml | 20 ++++++++++++++++++++ doc/lsst.ctrl.bps/quickstart.rst | 3 +++ doc/requirements.txt | 3 +++ pyproject.toml | 4 +++- python/lsst/ctrl/bps/bps_config.py | 2 +- python/lsst/ctrl/bps/generic_workflow.py | 6 +++--- 10 files changed, 40 insertions(+), 25 deletions(-) create mode 100644 doc/documenteer.toml create mode 100644 doc/requirements.txt diff --git a/.github/workflows/build_docs.yaml b/.github/workflows/build_docs.yaml index 2e118a2b..3d4e67e1 100644 --- a/.github/workflows/build_docs.yaml +++ b/.github/workflows/build_docs.yaml @@ -18,7 +18,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v6 with: - python-version: '3.11' + python-version: '3.13' cache: "pip" cache-dependency-path: "setup.cfg" @@ -36,7 +36,7 @@ jobs: run: uv pip install --system --no-deps -v . - name: Install documenteer - run: uv pip install --system 'documenteer[pipelines]==0.8.2' sphinx-automodapi==0.19 sphinx-prompt==1.6.0 + run: uv pip install --system -r doc/requirements.txt - name: Build documentation working-directory: ./doc diff --git a/.gitignore b/.gitignore index cc4d5803..8e34634a 100644 --- a/.gitignore +++ b/.gitignore @@ -73,6 +73,7 @@ instance/ # Sphinx documentation docs/_build/ +doc/api # PyBuilder target/ diff --git a/doc/changes/DM-54006.misc.rst b/doc/changes/DM-54006.misc.rst index 0ff0b138..79bf9ef9 100644 --- a/doc/changes/DM-54006.misc.rst +++ b/doc/changes/DM-54006.misc.rst @@ -1 +1 @@ -Bumped minimum Python version to 3.12. Dropped ``black`` and ``isort`` sections from ``pyproject.toml``. +Bumped minimum Python version to 3.12. Dropped ``black`` and ``isort`` sections from ``pyproject.toml``. Switched docs action to use ``sphinxutils``. diff --git a/doc/conf.py b/doc/conf.py index db0241de..d0ffa180 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -3,22 +3,8 @@ This configuration only affects single-package Sphinx documentation builds. """ -from documenteer.conf.pipelinespkg import * # noqa: F403, import * +# ruff: noqa: F403, F405 -project = "ctrl_bps" -html_theme_options["logotext"] = project # noqa: F405, unknown name -html_title = project -html_short_title = project -doxylink = {} -exclude_patterns = ["changes/*"] +from documenteer.conf.guide import * -# Try to pull in links for butler and pipe_base. -intersphinx_mapping["lsst"] = ("https://pipelines.lsst.io/v/daily/", None) # noqa -intersphinx_mapping["networkx"] = ("https://networkx.org/documentation/stable/", None) # noqa: F405 - -# As a temporary hack until we move to documenteer 2 delete scipy -# (since it no longer works) -try: - del intersphinx_mapping["scipy"] # noqa: F405 -except KeyError: - pass +exclude_patterns.append("changes/*") diff --git a/doc/documenteer.toml b/doc/documenteer.toml new file mode 100644 index 00000000..bfc8ded1 --- /dev/null +++ b/doc/documenteer.toml @@ -0,0 +1,20 @@ +[project] +title = "lsst-ctrl-bps" + +[project.python] +package = "lsst-ctrl-bps" + +[build] +clean = true + +[sphinx] +extensions = [ + "sphinx_click" +] + +[sphinx.intersphinx.projects] +astropy = "https://docs.astropy.org/en/stable" +python = "https://docs.python.org/3" +lsst = "https://pipelines.lsst.io/v/daily/" +click = "https://click.palletsprojects.com/en/stable" +networkx = "https://networkx.org/documentation/stable/" diff --git a/doc/lsst.ctrl.bps/quickstart.rst b/doc/lsst.ctrl.bps/quickstart.rst index 422f0de2..f83365b7 100644 --- a/doc/lsst.ctrl.bps/quickstart.rst +++ b/doc/lsst.ctrl.bps/quickstart.rst @@ -1,3 +1,6 @@ +User Guide +========== + Overview -------- diff --git a/doc/requirements.txt b/doc/requirements.txt new file mode 100644 index 00000000..c0d0d542 --- /dev/null +++ b/doc/requirements.txt @@ -0,0 +1,3 @@ +documenteer[guide] > 2.0, <3.0 +lsst-sphinxutils @ git+https://github.com/lsst/sphinxutils@main +sphinx-click diff --git a/pyproject.toml b/pyproject.toml index 3b548db1..49a014ad 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -37,8 +37,9 @@ dynamic = ["version"] [project.urls] "Homepage" = "https://github.com/lsst/ctrl_bps" -[project.optional-dependencies] +"Source" = "https://github.com/lsst/ctrl_bps" +[project.optional-dependencies] test = [ "pytest >= 3.2", "pytest-openfiles >= 0.5.0" @@ -190,6 +191,7 @@ checks = [ "RT01", # Unfortunately our @property trigger this. "RT02", # Does not want named return value. DM style says we do. "SS05", # pydocstyle is better at finding infinitive verb. + "RT03", # Temporarily disable for sphinx empty returns. ] exclude = [ '^test_.*', # Do not test docstrings in test code. diff --git a/python/lsst/ctrl/bps/bps_config.py b/python/lsst/ctrl/bps/bps_config.py index 9ada3504..24d18bc9 100644 --- a/python/lsst/ctrl/bps/bps_config.py +++ b/python/lsst/ctrl/bps/bps_config.py @@ -197,7 +197,7 @@ def get(self, key, default=""): ---------- key : `str` Key to look for in config. - default : Any, optional + default : `~typing.Any`, optional Default value to return if the key is not in the config. Returns diff --git a/python/lsst/ctrl/bps/generic_workflow.py b/python/lsst/ctrl/bps/generic_workflow.py index f5aedd31..4feaed05 100644 --- a/python/lsst/ctrl/bps/generic_workflow.py +++ b/python/lsst/ctrl/bps/generic_workflow.py @@ -490,7 +490,7 @@ def add_node(self, node_for_adding: GenericWorkflowNode, **attr: Any) -> None: ---------- node_for_adding : `lsst.ctrl.bps.GenericWorkflowJob` Job to be added to generic workflow. - **attr + **attr : `~typing.Any` Needed to match original networkx function, but not used. """ self.add_job(node_for_adding) @@ -524,7 +524,7 @@ def add_edges_from(self, ebunch_to_add: Iterable[tuple[str, str]], **attr: Any) ebunch_to_add : Iterable [`tuple` [`str`, `str`]] Iterable of job name pairs between which a dependency should be saved. - **attr : keyword arguments, optional + **attr : `~typing.Any` Data can be assigned using keyword arguments (not currently used). """ for edge_to_add in ebunch_to_add: @@ -539,7 +539,7 @@ def add_edge(self, u_of_edge: str, v_of_edge: str, **attr: Any) -> None: Name of parent job. v_of_edge : `str` Name of child job. - **attr : keyword arguments, optional + **attr Attributes to save with edge. """ if u_of_edge not in self: