44
55from __future__ import annotations
66
7- from typing import Any
7+ from typing import Annotated , Any
88
99from pydantic import Field
1010
@@ -19,46 +19,72 @@ class BpsSpec(ManifestSpec):
1919 """
2020
2121 model_config = SPEC_CONFIG
22- pipeline_yaml : str = Field (
23- description = "The absolute path to a Pipeline YAML specification file with optional anchor. "
24- "The path must begin with a `/` or a `${...}` environment variable." ,
25- pattern = "^(/|\\ $\\ {.*\\ })(.*)(\\ .yaml)(#.*)?$" ,
26- )
22+ pipeline_yaml : (
23+ Annotated [
24+ str ,
25+ Field (
26+ title = "Pipeline YAML File" ,
27+ description = "The absolute path to a Pipeline YAML specification file with optional anchor. "
28+ "The path must begin with a `/` or a `${...}` environment variable." ,
29+ pattern = "^(/|\\ $\\ {.*\\ })(.*)(\\ .yaml)(#.*)?$" ,
30+ examples = [
31+ "${DRP_PIPE_DIR}/path/to/pipeline.yaml#anchor" ,
32+ "/absolute/path/to/file.yaml" ,
33+ "${CUSTOM_VAR}/file.yaml#anchor1,anchor2" ,
34+ ],
35+ ),
36+ ]
37+ | Annotated [
38+ None ,
39+ Field (
40+ title = "No Pipeline YAML" ,
41+ description = "A BPS Manifest does not need to specify a pipeline YAML file, but one is "
42+ "mandatory for a Step." ,
43+ ),
44+ ]
45+ ) = None
2746 variables : dict [str , str ] | None = Field (
2847 default = None ,
29- description = "A mapping of name-value string pairs used to define addtional top-level BPS settings "
48+ title = "BPS Variables" ,
49+ description = "A mapping of name-value string pairs used to define additional top-level BPS settings "
3050 "or substitution variables. Note that the values are quoted in the output. For values that should "
3151 "not be quoted or otherwise used literally, see `literals`" ,
3252 examples = [{"operator" : "lsstsvc1" }],
3353 )
3454 include_files : list [str ] | None = Field (
3555 default_factory = list ,
56+ title = "BPS Include Config Files" ,
3657 description = "A list of include files added to the BPS submission file under the `includeConfigs`"
3758 " heading. This list is combined with `include_files` from other manifests." ,
3859 examples = [["${CTRL_BPS_DIR}/python/lsst/ctrl/bps/etc/bps_default.yaml" ]],
3960 )
4061 literals : dict [str , Any ] | None = Field (
4162 default = None ,
63+ title = "BPS Configuration Literals" ,
4264 description = "A mapping of arbitrary key-value sections to be added as additional literal YAML to "
4365 "the BPS submission file. For setting arbitrary BPS substitution variables, use `variables`. " ,
4466 examples = [
4567 {
46- "requestMemory" : 2048 ,
47- "numberOfRetries" : 5 ,
48- "retryUnlessExit" : [1 , 2 ],
49- "finalJob" : {"command1" : "echo HELLO WORLD" },
68+ "literals" : {
69+ "requestMemory" : 2048 ,
70+ "numberOfRetries" : 5 ,
71+ "retryUnlessExit" : [1 , 2 ],
72+ "finalJob" : {"command1" : "echo HELLO WORLD" },
73+ }
5074 }
5175 ],
5276 )
5377 environment : dict [str , str ] | None = Field (
5478 default = None ,
79+ title = "BPS Environment Variables" ,
5580 description = "A mapping of name-value string pairs used to defined additional values under the "
5681 "`environment` heading of the BPS submission file." ,
5782 min_length = 1 ,
58- examples = [{"LSST_S3_USE_THREADS" : 1 }],
83+ examples = [{"environment" : { " LSST_S3_USE_THREADS" : 1 } }],
5984 )
6085 payload : dict [str , str ] | None = Field (
6186 default = None ,
87+ title = "BPS Payload Configuration" ,
6288 description = "A mapping of name-value string pairs used to define BPS payload options. "
6389 "Note that these values are generated from other configuration sources at runtime." ,
6490 )
@@ -76,6 +102,7 @@ class BpsSpec(ManifestSpec):
76102 )
77103 clustering : dict [str , Any ] | None = Field (
78104 default = None ,
105+ title = "BPS Clustering Configuration" ,
79106 description = "A mapping of labeled clustering directives, added as literal YAML under the `cluster` "
80107 "heading. The top-level `clusterAlgorithm` should be added to `literals`." ,
81108 examples = [
@@ -91,6 +118,7 @@ class BpsSpec(ManifestSpec):
91118 )
92119 operator : str = Field (
93120 default = "cmservice" ,
121+ title = "BPS Operator Name" ,
94122 description = "The string name of a pilot or operator to reflect in the BPS configuration." ,
95123 )
96124
0 commit comments