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
2 changes: 1 addition & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:

- name: Run tests
run: |
pytest -r a -v -n 3 --cov=lsst.ctrl.bps --cov=tests --cov-report=xml --cov-report=term --cov-branch \
pytest -Wd -r a -v -n 3 --cov=lsst.ctrl.bps --cov=tests --cov-report=xml --cov-report=term --cov-branch \
--junitxml=junit.xml -o junit_family=legacy
- name: Upload coverage to codecov
uses: codecov/codecov-action@v5
Expand Down
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
rev: v6.0.0
hooks:
- id: check-yaml
args:
Expand All @@ -10,12 +10,12 @@ repos:
- id: check-toml
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.9.6
rev: v0.13.0
hooks:
- id: ruff
- id: ruff-check
args: [--fix]
- id: ruff-format
- repo: https://github.com/numpy/numpydoc
rev: "v1.8.0"
rev: "v1.9.0"
hooks:
- id: numpydoc-validation
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ dependencies = [
"astropy >=4.0",
"pyyaml >=5.1",
"click >= 7.0",
"networkx",
"networkx <3.6",
"lsst-daf-butler",
"lsst-pipe-base",
"lsst-ctrl-mpexec",
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
click
astropy
networkx
networkx <3.6
pyyaml
lsst-daf-butler @ git+https://github.com/lsst/daf_butler@main
lsst-utils @ git+https://github.com/lsst/utils@main
Expand Down
4 changes: 2 additions & 2 deletions tests/cqg_test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,8 @@ def make_test_clustered_quantum_graph(outdir):
cqg : `lsst.ctrl.bps.ClusteredQuantumGraph`
Clustered quantum graph.
"""
helper = make_test_helper()
qgc = helper.make_quantum_graph_builder(output_run="run").finish(attach_datastore_records=False)
with make_test_helper() as helper:
qgc = helper.make_quantum_graph_builder(output_run="run").finish(attach_datastore_records=False)
qg_filename = f"{outdir}/test_file.qg"
qgc.write(qg_filename)
qgraph = qgc.assemble()
Expand Down
24 changes: 12 additions & 12 deletions tests/qg_test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -334,15 +334,15 @@ def make_test_quantum_graph(run: str = "run", uneven=False):
| | |
T4(1,2) T4(1,4) T4(3,4)
"""
helper = make_test_helper()
qgc = helper.make_quantum_graph_builder(output_run=run).finish(attach_datastore_records=False)
if uneven:
keys_to_drop = {("T1", 1, 2), ("T1", 1, 4), ("T2", 1, 2)}
qgc.quantum_datasets = {
qd.quantum_id: qd
for qd in qgc.quantum_datasets.values()
if (qd.task_label, *qd.data_coordinate) not in keys_to_drop
}
qgc.set_thin_graph()
qgc.set_header_counts()
return qgc.assemble()
with make_test_helper() as helper:
qgc = helper.make_quantum_graph_builder(output_run=run).finish(attach_datastore_records=False)
if uneven:
keys_to_drop = {("T1", 1, 2), ("T1", 1, 4), ("T2", 1, 2)}
qgc.quantum_datasets = {
qd.quantum_id: qd
for qd in qgc.quantum_datasets.values()
if (qd.task_label, *qd.data_coordinate) not in keys_to_drop
}
qgc.set_thin_graph()
qgc.set_header_counts()
return qgc.assemble()
6 changes: 4 additions & 2 deletions tests/test_pre_transform.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,8 @@ def testValidate(self, mock_validate):
"validateClusteredQgraph": True,
}
config = BpsConfig(settings, search_order=[])
qgraph = InMemoryRepo().make_quantum_graph()
with InMemoryRepo() as repo:
qgraph = repo.make_quantum_graph()
with self.assertRaisesRegex(RuntimeError, "Fake error"):
_ = cluster_quanta(config, qgraph, "a_name")

Expand All @@ -208,7 +209,8 @@ def testNoValidate(self, mock_validate):
"validateClusteredQgraph": False,
}
config = BpsConfig(settings, search_order=[])
qgraph = InMemoryRepo().make_quantum_graph()
with InMemoryRepo() as repo:
qgraph = repo.make_quantum_graph()
_ = cluster_quanta(config, qgraph, "a_name")


Expand Down
Loading