Skip to content

Commit ad1f576

Browse files
committed
fix(bps)
- Add "final_job" field to BPS manifest and template. - Add "aux_sections" field to BPS manifest and template. - Add additional descriptions to BPS
1 parent 15ef35f commit ad1f576

File tree

2 files changed

+62
-5
lines changed

2 files changed

+62
-5
lines changed

src/lsst/cmservice/models/manifests/bps.py

Lines changed: 47 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,38 @@ class BpsSpec(ManifestSpec):
1818
"""
1919

2020
pipeline_yaml: str | None = Field(default=None)
21-
variables: dict[str, str] | None = Field(default=None)
21+
variables: dict[str, str] | None = Field(
22+
default=None,
23+
description=(
24+
"A mapping of name-value string pairs used to define addtional "
25+
"top-level BPS variables. Note that the values are quoted in the "
26+
"output."
27+
),
28+
)
2229
include_files: list[str] | None = Field(default=None)
23-
literals: dict[str, str] | None = Field(default=None)
24-
environment: dict[str, str] | None = Field(default=None)
25-
payload: dict[str, str] | None = Field(default=None)
30+
literals: dict[str, str] | None = Field(
31+
default=None,
32+
description=(
33+
"A mapping of name-value string pairs used to define addtional "
34+
"top-level BPS literals. Note that the values are not quoted in the "
35+
"output."
36+
),
37+
)
38+
environment: dict[str, str] | None = Field(
39+
default=None,
40+
description=(
41+
"A mapping of name-value string pairs used to defined additional "
42+
"values under the `environment` heading."
43+
),
44+
)
45+
payload: dict[str, str] | None = Field(
46+
default=None,
47+
description=(
48+
"A mapping of name-value string pairs used to define BPS payload "
49+
"options. Note that these values are generated from other configuration "
50+
"sources at runtime."
51+
),
52+
)
2653
extra_init_options: str | None = Field(
2754
default=None, description="Options added to the end of pipetaskinit"
2855
)
@@ -33,7 +60,22 @@ class BpsSpec(ManifestSpec):
3360
default=None, description="Options added to the end of pipetask command to run a quantum"
3461
)
3562
extra_update_qgraph_options: str | None = Field(default=None)
36-
clustering: dict[str, Any] | None = Field(default=None)
63+
clustering: dict[str, Any] | None = Field(
64+
default=None,
65+
description=(
66+
"A mapping of clustering directives, added as literal YAML under the `clustering` heading."
67+
),
68+
)
69+
final_job: dict[str, Any] | None = Field(
70+
default=None,
71+
description=("A mapping of finalJob directives, added as literal YAML under the `finalJob` heading."),
72+
)
73+
aux_sections: dict[str, dict[str, Any]] | None = Field(
74+
default=None,
75+
description=(
76+
"A mapping of arbitrary top-level mapping sections to be added as additional literal YAML."
77+
),
78+
)
3779

3880

3981
class BpsManifest(LibraryManifest[BpsSpec]): ...

src/lsst/cmservice/templates/bps_submit_yaml.j2

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,21 @@ clustering:
8585
{{ bps.clustering | toyaml | indent(2) -}}
8686
{# BLANK LINE #}
8787
{%- endif%}
88+
{%- if bps.final_job %}
89+
########################################
90+
# FINALJOB CONFIGURATION
91+
########################################
92+
finalJob:
93+
{{ bps.final_job | toyaml | indent(2) -}}
94+
{# BLANK LINE #}
95+
{%- endif%}
96+
{%- if bps.aux_sections %}
97+
########################################
98+
# AUXILIARY CONFIGURATION
99+
########################################
100+
{{ bps.aux_sections | toyaml -}}
101+
{# BLANK LINE #}
102+
{%- endif%}
88103
########################################
89104
# SITE WMS CONFIGURATION
90105
########################################

0 commit comments

Comments
 (0)