Skip to content
Merged
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: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ repos:
- id: check-toml
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.13.0
rev: v0.14.5
hooks:
- id: ruff-check
args: [--fix]
- id: ruff-format
- repo: https://github.com/numpy/numpydoc
rev: "v1.9.0"
rev: "v1.10.0"
hooks:
- id: numpydoc-validation
1 change: 0 additions & 1 deletion doc/changes/DM-54006.misc.rst

This file was deleted.

14 changes: 14 additions & 0 deletions doc/lsst.ctrl.bps/CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
lsst-ctrl-bps v30.0.1 (2026-02-03)
==================================

Dropped Python 3.11.
Tested with Python 3.14.

Other Changes and Additions
---------------------------

- - Bumped minimum Python version to 3.12.
- Dropped ``black`` and ``isort`` sections from ``pyproject.toml``.
- Switched documentation build to use ``sphinxutils``. (`DM-54006 <https://rubinobs.atlassian.net/browse/DM-54006>`_)


lsst-ctrl-bps v30.0.0 (2026-01-16)
==================================

Expand Down
6 changes: 3 additions & 3 deletions python/lsst/ctrl/bps/bps_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ class BpsConfig(Config):
afterwards. WMS settings takes precedence over provided defaults.
wms_service_class_fqn : `str`, optional
Fully qualified name of the WMS service class to use to get plugin's
specific default settings. If ``None`` (default), the WMS service
specific default settings. If `None` (default), the WMS service
class provided by

1. ``other`` config,
Expand Down Expand Up @@ -256,15 +256,15 @@ def search(self, key, opt=None):
----------
key : `str`
Key to look for in config.
opt : `dict` [`str`, `Any`], optional
opt : `dict` [`str`, `~typing.Any`], optional
Options dictionary to use while searching. All are optional.

``"curvals"``
Means to pass in values for search order key
(curr_<sectname>) or variable replacements.
(`dict`, optional)
``"default"``
Value to return if not found. (`Any`, optional)
Value to return if not found. (`~typing.Any`, optional)
``"replaceEnvVars"``
If search result is string, whether to replace environment
variables inside it with special placeholder (<ENV:name>).
Expand Down
13 changes: 7 additions & 6 deletions python/lsst/ctrl/bps/clustered_quantum_graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class QuantaCluster:
be unique within ClusteredQuantumGraph.
label : `str`
Value used to group clusters.
tags : `dict` [`str`, `Any`], optional
tags : `dict` [`str`, `~typing.Any`], optional
Arbitrary key/value pairs for the cluster.

Raises
Expand Down Expand Up @@ -248,7 +248,8 @@ def add_cluster(self, clusters_for_adding):

Parameters
----------
clusters_for_adding : `QuantaCluster` or `Iterable` [`QuantaCluster`]
clusters_for_adding : `QuantaCluster` or \
`~collections.abc.Iterable` [`QuantaCluster`]
The cluster to be added to the ClusteredQuantumGraph.
"""
for cluster in ensure_iterable(clusters_for_adding):
Expand Down Expand Up @@ -311,7 +312,7 @@ def __iter__(self):

Returns
-------
names : `Iterator` [`str`]
names : `~collections.abc.Iterator` [`str`]
Iterator over names of clusters.
"""
return self._cluster_graph.nodes()
Expand All @@ -321,7 +322,7 @@ def clusters(self):

Returns
-------
clusters : `Iterator` [`lsst.ctrl.bps.QuantaCluster`]
clusters : `~collections.abc.Iterator` [`lsst.ctrl.bps.QuantaCluster`]
Iterator over clusters in topological order.
"""
return map(self.get_cluster, topological_sort(self._cluster_graph))
Expand All @@ -337,7 +338,7 @@ def successors(self, name):

Returns
-------
clusters : `Iterator` [`lsst.ctrl.bps.QuantaCluster`]
clusters : `~collections.abc.Iterator` [`lsst.ctrl.bps.QuantaCluster`]
Iterator over successors of given cluster.
"""
return map(self.get_cluster, self._cluster_graph.successors(name))
Expand All @@ -353,7 +354,7 @@ def predecessors(self, name):

Returns
-------
clusters : `Iterator` [`lsst.ctrl.bps.QuantaCluster`]
clusters : `~collections.abc.Iterator` [`lsst.ctrl.bps.QuantaCluster`]
Iterator over predecessors of given cluster.
"""
return map(self.get_cluster, self._cluster_graph.predecessors(name))
Expand Down
3 changes: 2 additions & 1 deletion python/lsst/ctrl/bps/construct.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,8 @@ def create_job_files(
The mapping between file keys and file paths.
prefix : `str` | `pathlib.Path`
The root directory to which the files will be written.
path_creator : `Callable` [[`Path`, `Path`], `Path`]
path_creator : `~collections.abc.Callable` \
[[`pathlib.Path`, `pathlib.Path`], `pathlib.Path`]
File category that determines actions that need to be taken during
file creation.

Expand Down
2 changes: 1 addition & 1 deletion python/lsst/ctrl/bps/generic_workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ def get_files(
----------
data : `bool`, optional
Whether to return the file data as well as the file object name
(The default is False).
(The default is `False`).
transfer_only : `bool`, optional
Whether to only return files for which a workflow management system
would be responsible for transferring.
Expand Down
3 changes: 2 additions & 1 deletion python/lsst/ctrl/bps/initialize.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ def init_submission(
----------
config_file : `str`
Name of the configuration file.
validators : `Iterable[Callable[[BpsConfig], None]]`, optional
validators : `~collections.abc.Iterable` \
[`~collections.abc.Callable` [[`BpsConfig`], `None`]], optional
A list of functions performing checks on the given configuration.
Each function should take a single argument, a BpsConfig object, and
raise if the check fails. By default, no checks are performed.
Expand Down
2 changes: 1 addition & 1 deletion python/lsst/ctrl/bps/quantum_clustering_funcs.py
Original file line number Diff line number Diff line change
Expand Up @@ -789,7 +789,7 @@ def get_cluster_name_from_info(
-------
cluster_name : `str`
Name of the cluster in which to add the given node.
info : dict [`str`, `Any`]
info : dict [`str`, `~typing.Any`]
Information needed if creating a new node.
"""
# Gather info for cluster name template into a dictionary.
Expand Down
20 changes: 10 additions & 10 deletions python/lsst/ctrl/bps/transform.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ def _enhance_command(config, generic_workflow, gwjob, cached_job_values):
gwjob : `lsst.ctrl.bps.GenericWorkflowJob`
Generic workflow job to which the updated executable, arguments,
and values should be saved.
cached_job_values : `dict` [`str`, dict[`str`, `Any`]]
cached_job_values : `dict` [`str`, dict[`str`, `~typing.Any`]]
Cached values common across jobs with same label. Updated if values
aren't already saved for given gwjob's label.
"""
Expand Down Expand Up @@ -286,7 +286,7 @@ def _fill_arguments(use_shared, generic_workflow, arguments, cmdvals):
Generic workflow containing the job.
arguments : `str`
String containing placeholders.
cmdvals : `dict` [`str`, `Any`]
cmdvals : `dict` [`str`, `~typing.Any`]
Any command line values that can be used to replace placeholders.

Returns
Expand Down Expand Up @@ -365,14 +365,14 @@ def _get_job_values(config, search_opt, cmd_line_key):
----------
config : `lsst.ctrl.bps.BpsConfig`
Bps configuration.
search_opt : `dict` [`str`, `Any`]
search_opt : `dict` [`str`, `~typing.Any`]
Search options to be used when searching config.
cmd_line_key : `str` or None
Which command line key to search for (e.g., "runQuantumCommand").

Returns
-------
job_values : `dict` [ `str`, `Any` ]`
job_values : `dict` [ `str`, `~typing.Any` ]`
A mapping between job attributes and their values.
"""
_LOG.debug("cmd_line_key=%s, search_opt=%s", cmd_line_key, search_opt)
Expand Down Expand Up @@ -443,7 +443,7 @@ def _handle_job_values(quantum_job_values, gwjob, attributes=_ATTRS_ALL):
Job values for running single Quantum.
gwjob : `lsst.ctrl.bps.GenericWorkflowJob`
Generic workflow job in which to store the universal values.
attributes : `Iterable` [`str`], optional
attributes : `~collections.abc.Iterable` [`str`], optional
Job attributes to be set in the job following different rules.
The default value is _ATTRS_ALL.
"""
Expand All @@ -463,7 +463,7 @@ def _handle_job_values_universal(quantum_job_values, gwjob, attributes=_ATTRS_UN
Job values for running single Quantum.
gwjob : `lsst.ctrl.bps.GenericWorkflowJob`
Generic workflow job in which to store the universal values.
attributes : `Iterable` [`str`], optional
attributes : `~collections.abc.Iterable` [`str`], optional
Job attributes to be set in the job following different rules.
The default value is _ATTRS_UNIVERSAL.
"""
Expand Down Expand Up @@ -502,11 +502,11 @@ def _handle_job_values_max(quantum_job_values, gwjob, attributes=_ATTRS_MAX):

Parameters
----------
quantum_job_values : `dict` [`str`, `Any`]
quantum_job_values : `dict` [`str`, `~typing.Any`]
Job values for running single Quantum.
gwjob : `lsst.ctrl.bps.GenericWorkflowJob`
Generic workflow job in which to store the aggregate values.
attributes : `Iterable` [`str`], optional
attributes : `~collections.abc.Iterable` [`str`], optional
Job attributes to be set in the job following different rules.
The default value is _ATTR_MAX.
"""
Expand Down Expand Up @@ -547,11 +547,11 @@ def _handle_job_values_sum(quantum_job_values, gwjob, attributes=_ATTRS_SUM):

Parameters
----------
quantum_job_values : `dict` [`str`, `Any`]
quantum_job_values : `dict` [`str`, `~typing.Any`]
Job values for running single Quantum.
gwjob : `lsst.ctrl.bps.GenericWorkflowJob`
Generic workflow job in which to store the aggregate values.
attributes : `Iterable` [`str`], optional
attributes : `~collections.abc.Iterable` [`str`], optional
Job attributes to be set in the job following different rules.
The default value is _ATTRS_SUM.
"""
Expand Down
10 changes: 5 additions & 5 deletions python/lsst/ctrl/bps/wms_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,14 +121,14 @@ def context(self) -> dict[str, Any]:

Returns
-------
context : `dict` [`str`, `Any`]
context : `dict` [`str`, `~typing.Any`]
A copy of the dictionary representing the mapping between
*every* template variable and its value.

Notes
-----
The property returns a *shallow* copy of the dictionary representing
the context as the intended purpose of the ``WmsSpecificInfo`` is to
the context as the intended purpose of the `WmsSpecificInfo` is to
pass a small number of brief messages from WMS to BPS reporting
subsystem. Hence, it is assumed that the dictionary will only contain
immutable objects (e.g. strings, numbers).
Expand Down Expand Up @@ -157,7 +157,7 @@ def add_message(self, template: str, context: dict[str, Any] | None = None, **kw
----------
template : `str`
A message template.
context : `dict` [`str`, `Any`], optional
context : `dict` [`str`, `~typing.Any`], optional
A mapping between template variables and their values.
**kwargs
Additional keyword arguments.
Expand Down Expand Up @@ -296,7 +296,7 @@ def defaults(self):
-----
This property is currently being used in ``BpsConfig.__init__()``.
As long as that's the case it cannot be changed to return
a ``BpsConfig`` instance.
a `BpsConfig` instance.
"""
return None

Expand Down Expand Up @@ -386,7 +386,7 @@ def list_submitted_jobs(self, wms_id=None, user=None, require_bps=True, pass_thr

Returns
-------
job_ids : `list` [`Any`]
job_ids : `list` [`~typing.Any`]
Only job ids to be used by cancel and other functions. Typically
this means top-level jobs (i.e., not children jobs).
"""
Expand Down
10 changes: 5 additions & 5 deletions tests/cqg_test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def check_cqg(cqg, truth=None):
----------
cqg : `lsst.ctrl.bps.ClusteredQuantumGraph`
ClusteredQuantumGraph to be checked for correctness.
truth : `dict` [`str`, `Any`], optional
truth : `dict` [`str`, `~typing.Any`], optional
Information describing what this cluster should look like.
"""
cqg.validate()
Expand All @@ -62,7 +62,7 @@ def replace_node_name(name, label, dims):
Cluster name.
label : `str`
Cluster label.
dims : `dict` [`str`, `Any`]
dims : `dict` [`str`, `~typing.Any`]
Dimension names and values in order to make new name unique.

Returns
Expand Down Expand Up @@ -92,7 +92,7 @@ def dump_cqg(cqg):

Returns
-------
info : `dict` [`str`, `Any`]
info : `dict` [`str`, `~typing.Any`]
Dictionary represention of ClusteredQuantumGraph.
"""
info = {"name": cqg.name, "nodes": {}}
Expand Down Expand Up @@ -121,9 +121,9 @@ def compare_cqg_dicts(truth, cqg):

Parameters
----------
truth : `dict` [`str`, `Any`]
truth : `dict` [`str`, `~typing.Any`]
Representation of the expected ClusteredQuantumGraph.
cqg : `dict` [`str`, `Any`]
cqg : `dict` [`str`, `~typing.Any`]
Representation of the calculated ClusteredQuantumGraph.

Raises
Expand Down
Loading