nextmv 0.35.0.dev0__py3-none-any.whl → 0.35.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- nextmv/__about__.py +1 -1
- nextmv/__init__.py +1 -0
- nextmv/_serialization.py +3 -3
- nextmv/base_model.py +2 -2
- nextmv/cloud/acceptance_test.py +4 -5
- nextmv/cloud/application.py +116 -109
- nextmv/cloud/batch_experiment.py +17 -17
- nextmv/cloud/client.py +13 -13
- nextmv/cloud/ensemble.py +2 -3
- nextmv/cloud/input_set.py +7 -8
- nextmv/cloud/instance.py +3 -4
- nextmv/cloud/package.py +18 -12
- nextmv/cloud/scenario.py +6 -10
- nextmv/default_app/README.md +2 -2
- nextmv/input.py +38 -44
- nextmv/local/application.py +39 -39
- nextmv/local/executor.py +47 -17
- nextmv/local/runner.py +10 -10
- nextmv/manifest.py +69 -79
- nextmv/model.py +6 -6
- nextmv/options.py +12 -12
- nextmv/output.py +46 -61
- nextmv/polling.py +2 -2
- nextmv/run.py +58 -58
- {nextmv-0.35.0.dev0.dist-info → nextmv-0.35.1.dist-info}/METADATA +3 -4
- nextmv-0.35.1.dist-info/RECORD +49 -0
- nextmv/default_app/src/main.py +0 -37
- nextmv-0.35.0.dev0.dist-info/RECORD +0 -50
- {nextmv-0.35.0.dev0.dist-info → nextmv-0.35.1.dist-info}/WHEEL +0 -0
- {nextmv-0.35.0.dev0.dist-info → nextmv-0.35.1.dist-info}/licenses/LICENSE +0 -0
nextmv/manifest.py
CHANGED
|
@@ -53,7 +53,7 @@ MANIFEST_FILE_NAME
|
|
|
53
53
|
|
|
54
54
|
import os
|
|
55
55
|
from enum import Enum
|
|
56
|
-
from typing import Any
|
|
56
|
+
from typing import Any
|
|
57
57
|
|
|
58
58
|
import yaml
|
|
59
59
|
from pydantic import AliasChoices, Field, field_validator
|
|
@@ -244,14 +244,14 @@ class ManifestBuild(BaseModel):
|
|
|
244
244
|
'make build'
|
|
245
245
|
"""
|
|
246
246
|
|
|
247
|
-
command:
|
|
247
|
+
command: str | None = None
|
|
248
248
|
"""The command to run to build the app.
|
|
249
249
|
|
|
250
250
|
This command will be executed without a shell, i.e., directly. The command
|
|
251
251
|
must exit with a status of 0 to continue the push process of the app to
|
|
252
252
|
Nextmv Cloud. This command is executed prior to the pre-push command.
|
|
253
253
|
"""
|
|
254
|
-
environment:
|
|
254
|
+
environment: dict[str, Any] | None = None
|
|
255
255
|
"""Environment variables to set when running the build command.
|
|
256
256
|
|
|
257
257
|
Given as key-value pairs.
|
|
@@ -317,7 +317,7 @@ class ManifestPythonModel(BaseModel):
|
|
|
317
317
|
|
|
318
318
|
name: str
|
|
319
319
|
"""The name of the decision model."""
|
|
320
|
-
options:
|
|
320
|
+
options: list[dict[str, Any]] | None = None
|
|
321
321
|
"""
|
|
322
322
|
Options for the decision model. This is a data representation of the
|
|
323
323
|
`nextmv.Options` class. It consists of a list of dicts. Each dict
|
|
@@ -359,7 +359,7 @@ class ManifestPython(BaseModel):
|
|
|
359
359
|
'requirements.txt'
|
|
360
360
|
"""
|
|
361
361
|
|
|
362
|
-
pip_requirements:
|
|
362
|
+
pip_requirements: str | list[str] | None = Field(
|
|
363
363
|
serialization_alias="pip-requirements",
|
|
364
364
|
validation_alias=AliasChoices("pip-requirements", "pip_requirements"),
|
|
365
365
|
default=None,
|
|
@@ -371,16 +371,16 @@ class ManifestPython(BaseModel):
|
|
|
371
371
|
app. Can be either a string path to a requirements.txt file or a list
|
|
372
372
|
of package specifications.
|
|
373
373
|
"""
|
|
374
|
-
arch:
|
|
374
|
+
arch: ManifestPythonArch | None = None
|
|
375
375
|
"""
|
|
376
376
|
The architecture this model is meant to run on. One of "arm64" or "amd64". Uses
|
|
377
377
|
"arm64" if not specified.
|
|
378
378
|
"""
|
|
379
|
-
version:
|
|
379
|
+
version: str | float | None = None
|
|
380
380
|
"""
|
|
381
381
|
The Python version this model is meant to run with. Uses "3.11" if not specified.
|
|
382
382
|
"""
|
|
383
|
-
model:
|
|
383
|
+
model: ManifestPythonModel | None = None
|
|
384
384
|
"""
|
|
385
385
|
Information about an encoded decision model.
|
|
386
386
|
|
|
@@ -390,7 +390,7 @@ class ManifestPython(BaseModel):
|
|
|
390
390
|
|
|
391
391
|
@field_validator("version", mode="before")
|
|
392
392
|
@classmethod
|
|
393
|
-
def validate_version(cls, v:
|
|
393
|
+
def validate_version(cls, v: str | float | None) -> str | None:
|
|
394
394
|
"""
|
|
395
395
|
Validate and convert the Python version field to a string.
|
|
396
396
|
|
|
@@ -461,11 +461,11 @@ class ManifestOptionUI(BaseModel):
|
|
|
461
461
|
'input'
|
|
462
462
|
"""
|
|
463
463
|
|
|
464
|
-
control_type:
|
|
464
|
+
control_type: str | None = None
|
|
465
465
|
"""The type of control to use for the option in the Nextmv Cloud UI."""
|
|
466
|
-
hidden_from:
|
|
466
|
+
hidden_from: list[str] | None = None
|
|
467
467
|
"""A list of team roles for which this option will be hidden in the UI."""
|
|
468
|
-
display_name:
|
|
468
|
+
display_name: str | None = None
|
|
469
469
|
"""An optional display name for the option. This is useful for making
|
|
470
470
|
the option more user-friendly in the UI.
|
|
471
471
|
"""
|
|
@@ -529,15 +529,15 @@ class ManifestOption(BaseModel):
|
|
|
529
529
|
)
|
|
530
530
|
"""The type of the option (e.g., "string", "int", "bool", "float)."""
|
|
531
531
|
|
|
532
|
-
default:
|
|
532
|
+
default: Any | None = None
|
|
533
533
|
"""The default value of the option"""
|
|
534
|
-
description:
|
|
534
|
+
description: str | None = ""
|
|
535
535
|
"""The description of the option"""
|
|
536
536
|
required: bool = False
|
|
537
537
|
"""Whether the option is required or not"""
|
|
538
|
-
additional_attributes:
|
|
538
|
+
additional_attributes: dict[str, Any] | None = None
|
|
539
539
|
"""Optional additional attributes for the option."""
|
|
540
|
-
ui:
|
|
540
|
+
ui: ManifestOptionUI | None = None
|
|
541
541
|
"""Optional UI attributes for the option."""
|
|
542
542
|
|
|
543
543
|
@classmethod
|
|
@@ -727,16 +727,16 @@ class ManifestOptions(BaseModel):
|
|
|
727
727
|
2
|
|
728
728
|
"""
|
|
729
729
|
|
|
730
|
-
strict:
|
|
730
|
+
strict: bool | None = False
|
|
731
731
|
"""If strict is set to `True`, only the listed options will be allowed."""
|
|
732
|
-
validation:
|
|
732
|
+
validation: ManifestValidation | None = None
|
|
733
733
|
"""Optional validation rules for all options."""
|
|
734
|
-
items:
|
|
734
|
+
items: list[ManifestOption] | None = None
|
|
735
735
|
"""The actual list of options for the decision model.
|
|
736
736
|
|
|
737
737
|
An option is a parameter that configures the decision model.
|
|
738
738
|
"""
|
|
739
|
-
format:
|
|
739
|
+
format: list[str] | None = None
|
|
740
740
|
"""A list of strings that define how options are transformed into command line arguments.
|
|
741
741
|
|
|
742
742
|
Use `{{name}}` to refer to the option name and `{{value}}` to refer to the option value.
|
|
@@ -749,7 +749,7 @@ class ManifestOptions(BaseModel):
|
|
|
749
749
|
cls,
|
|
750
750
|
options: Options,
|
|
751
751
|
validation: OptionsEnforcement = None,
|
|
752
|
-
format:
|
|
752
|
+
format: list[str] | None = None,
|
|
753
753
|
) -> "ManifestOptions":
|
|
754
754
|
"""
|
|
755
755
|
Create a `ManifestOptions` from a `nextmv.Options`.
|
|
@@ -853,11 +853,11 @@ class ManifestContentMultiFileOutput(BaseModel):
|
|
|
853
853
|
'my-outputs/statistics.json'
|
|
854
854
|
"""
|
|
855
855
|
|
|
856
|
-
statistics:
|
|
856
|
+
statistics: str | None = ""
|
|
857
857
|
"""The path to the statistics file."""
|
|
858
|
-
assets:
|
|
858
|
+
assets: str | None = ""
|
|
859
859
|
"""The path to the assets file."""
|
|
860
|
-
solutions:
|
|
860
|
+
solutions: str | None = ""
|
|
861
861
|
"""The path to the solutions directory."""
|
|
862
862
|
|
|
863
863
|
|
|
@@ -942,7 +942,7 @@ class ManifestContent(BaseModel):
|
|
|
942
942
|
The format of the content. Can only be `InputFormat.JSON`,
|
|
943
943
|
`InputFormat.MULTI_FILE`, or `InputFormat.CSV_ARCHIVE`.
|
|
944
944
|
"""
|
|
945
|
-
multi_file:
|
|
945
|
+
multi_file: ManifestContentMultiFile | None = Field(
|
|
946
946
|
serialization_alias="multi-file",
|
|
947
947
|
validation_alias=AliasChoices("multi-file", "multi_file"),
|
|
948
948
|
default=None,
|
|
@@ -1001,12 +1001,46 @@ class ManifestConfiguration(BaseModel):
|
|
|
1001
1001
|
'debug_mode'
|
|
1002
1002
|
"""
|
|
1003
1003
|
|
|
1004
|
-
options:
|
|
1004
|
+
options: ManifestOptions | None = None
|
|
1005
1005
|
"""Options for the decision model."""
|
|
1006
|
-
content:
|
|
1006
|
+
content: ManifestContent | None = None
|
|
1007
1007
|
"""Content configuration for specifying how the app input/output is handled."""
|
|
1008
1008
|
|
|
1009
1009
|
|
|
1010
|
+
class ManifestExecution(BaseModel):
|
|
1011
|
+
"""
|
|
1012
|
+
Execution configuration for the decision model.
|
|
1013
|
+
|
|
1014
|
+
You can import the `ManifestExecution` class directly from `nextmv`:
|
|
1015
|
+
|
|
1016
|
+
```python
|
|
1017
|
+
from nextmv import ManifestExecution
|
|
1018
|
+
```
|
|
1019
|
+
|
|
1020
|
+
Parameters
|
|
1021
|
+
----------
|
|
1022
|
+
entrypoint : Optional[str], default=None
|
|
1023
|
+
The entrypoint for the decision model, e.g.: `./app.py`.
|
|
1024
|
+
cwd : Optional[str], default=None
|
|
1025
|
+
The working directory to set when running the app, e.g.: `./src/`.
|
|
1026
|
+
|
|
1027
|
+
Examples
|
|
1028
|
+
--------
|
|
1029
|
+
>>> from nextmv import ManifestExecution
|
|
1030
|
+
>>> exec_config = ManifestExecution(
|
|
1031
|
+
... entrypoint="./app.py",
|
|
1032
|
+
... cwd="./src/"
|
|
1033
|
+
... )
|
|
1034
|
+
>>> exec_config.entrypoint
|
|
1035
|
+
'./app.py'
|
|
1036
|
+
"""
|
|
1037
|
+
|
|
1038
|
+
entrypoint: str | None = None
|
|
1039
|
+
"""The entrypoint for the decision model, e.g.: `./app.py`."""
|
|
1040
|
+
cwd: str | None = None
|
|
1041
|
+
"""The working directory to set when running the app, e.g.: `./src/`."""
|
|
1042
|
+
|
|
1043
|
+
|
|
1010
1044
|
class Manifest(BaseModel):
|
|
1011
1045
|
"""
|
|
1012
1046
|
Represents an app manifest (`app.yaml`) for Nextmv Cloud.
|
|
@@ -1084,7 +1118,7 @@ class Manifest(BaseModel):
|
|
|
1084
1118
|
The runtime to use for the app. It provides the environment in which the
|
|
1085
1119
|
app runs. This is mandatory.
|
|
1086
1120
|
"""
|
|
1087
|
-
python:
|
|
1121
|
+
python: ManifestPython | None = None
|
|
1088
1122
|
"""
|
|
1089
1123
|
Python-specific attributes. Only for Python apps. Contains further
|
|
1090
1124
|
Python-specific attributes.
|
|
@@ -1093,12 +1127,12 @@ class Manifest(BaseModel):
|
|
|
1093
1127
|
default_factory=list,
|
|
1094
1128
|
)
|
|
1095
1129
|
"""The files to include (or exclude) in the app. This is mandatory."""
|
|
1096
|
-
configuration:
|
|
1130
|
+
configuration: ManifestConfiguration | None = None
|
|
1097
1131
|
"""
|
|
1098
1132
|
Configuration for the decision model. A list of options for the decision
|
|
1099
1133
|
model. An option is a parameter that configures the decision model.
|
|
1100
1134
|
"""
|
|
1101
|
-
build:
|
|
1135
|
+
build: ManifestBuild | None = None
|
|
1102
1136
|
"""
|
|
1103
1137
|
Build-specific attributes.
|
|
1104
1138
|
|
|
@@ -1109,7 +1143,7 @@ class Manifest(BaseModel):
|
|
|
1109
1143
|
set environment variables when running the build command given as key-value
|
|
1110
1144
|
pairs.
|
|
1111
1145
|
"""
|
|
1112
|
-
pre_push:
|
|
1146
|
+
pre_push: str | None = Field(
|
|
1113
1147
|
serialization_alias="pre-push",
|
|
1114
1148
|
validation_alias=AliasChoices("pre-push", "pre_push"),
|
|
1115
1149
|
default=None,
|
|
@@ -1124,55 +1158,12 @@ class Manifest(BaseModel):
|
|
|
1124
1158
|
process. This command is executed just before the app gets bundled and
|
|
1125
1159
|
pushed (after the build command).
|
|
1126
1160
|
"""
|
|
1127
|
-
|
|
1161
|
+
execution: ManifestExecution | None = None
|
|
1128
1162
|
"""
|
|
1129
|
-
Optional
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
- `ManifestRuntime.PYTHON`, `ManifestRuntime.HEXALY`, `ManifestRuntime.PYOMO`: `./main.py`
|
|
1133
|
-
- `ManifestRuntime.DEFAULT`: `./main`
|
|
1134
|
-
- Java: `./main.jar`
|
|
1163
|
+
Optional execution configuration for the decision model. Allows configuration of
|
|
1164
|
+
entrypoint and more.
|
|
1135
1165
|
"""
|
|
1136
1166
|
|
|
1137
|
-
def model_post_init(self, __context) -> None:
|
|
1138
|
-
"""
|
|
1139
|
-
Post-initialization to set default entrypoint based on runtime if not specified.
|
|
1140
|
-
|
|
1141
|
-
This method is automatically called by Pydantic after the model is initialized.
|
|
1142
|
-
If no entrypoint is provided, it sets a default entrypoint based on the runtime:
|
|
1143
|
-
- Python runtimes (PYTHON, HEXALY, PYOMO, CUOPT): "./main.py"
|
|
1144
|
-
- DEFAULT runtime: "./main"
|
|
1145
|
-
- JAVA runtime: "./main.jar"
|
|
1146
|
-
|
|
1147
|
-
Parameters
|
|
1148
|
-
----------
|
|
1149
|
-
__context : Any
|
|
1150
|
-
Pydantic context (unused in this implementation).
|
|
1151
|
-
|
|
1152
|
-
Raises
|
|
1153
|
-
------
|
|
1154
|
-
ValueError
|
|
1155
|
-
If no entrypoint is provided and the runtime cannot be resolved to
|
|
1156
|
-
establish a default entrypoint.
|
|
1157
|
-
"""
|
|
1158
|
-
if self.entrypoint is None:
|
|
1159
|
-
if self.runtime in (
|
|
1160
|
-
ManifestRuntime.PYTHON,
|
|
1161
|
-
ManifestRuntime.HEXALY,
|
|
1162
|
-
ManifestRuntime.PYOMO,
|
|
1163
|
-
ManifestRuntime.CUOPT,
|
|
1164
|
-
):
|
|
1165
|
-
self.entrypoint = "./main.py"
|
|
1166
|
-
elif self.runtime == ManifestRuntime.DEFAULT:
|
|
1167
|
-
self.entrypoint = "./main"
|
|
1168
|
-
elif self.runtime == ManifestRuntime.JAVA:
|
|
1169
|
-
self.entrypoint = "./main.jar"
|
|
1170
|
-
else:
|
|
1171
|
-
raise ValueError(
|
|
1172
|
-
f'entrypoint is not provided but the runtime "{self.runtime}" could not '
|
|
1173
|
-
"be resolved to establish a default entrypoint"
|
|
1174
|
-
)
|
|
1175
|
-
|
|
1176
1167
|
@classmethod
|
|
1177
1168
|
def from_yaml(cls, dirpath: str) -> "Manifest":
|
|
1178
1169
|
"""
|
|
@@ -1256,7 +1247,7 @@ class Manifest(BaseModel):
|
|
|
1256
1247
|
width=120,
|
|
1257
1248
|
)
|
|
1258
1249
|
|
|
1259
|
-
def extract_options(self, should_parse: bool = True) ->
|
|
1250
|
+
def extract_options(self, should_parse: bool = True) -> Options | None:
|
|
1260
1251
|
"""
|
|
1261
1252
|
Convert the manifest options to a `nextmv.Options` object.
|
|
1262
1253
|
|
|
@@ -1477,6 +1468,5 @@ def default_python_manifest() -> Manifest:
|
|
|
1477
1468
|
type=ManifestType.PYTHON,
|
|
1478
1469
|
python=ManifestPython(pip_requirements="requirements.txt"),
|
|
1479
1470
|
)
|
|
1480
|
-
m.entrypoint = None # TODO: change this when we are ready for the entrypoint.
|
|
1481
1471
|
|
|
1482
1472
|
return m
|
nextmv/model.py
CHANGED
|
@@ -20,7 +20,7 @@ import os
|
|
|
20
20
|
import shutil
|
|
21
21
|
import warnings
|
|
22
22
|
from dataclasses import dataclass
|
|
23
|
-
from typing import Any
|
|
23
|
+
from typing import Any
|
|
24
24
|
|
|
25
25
|
from nextmv.input import Input
|
|
26
26
|
from nextmv.logger import log
|
|
@@ -152,11 +152,11 @@ class ModelConfiguration:
|
|
|
152
152
|
|
|
153
153
|
name: str
|
|
154
154
|
"""The name of the decision model."""
|
|
155
|
-
requirements:
|
|
155
|
+
requirements: list[str] | None = None
|
|
156
156
|
"""A list of Python dependencies that the decision model requires."""
|
|
157
|
-
options:
|
|
157
|
+
options: Options | None = None
|
|
158
158
|
"""Options that the decision model requires."""
|
|
159
|
-
options_enforcement:
|
|
159
|
+
options_enforcement: OptionsEnforcement | None = None
|
|
160
160
|
"""Enforcement of options for the model."""
|
|
161
161
|
|
|
162
162
|
|
|
@@ -308,7 +308,7 @@ class Model:
|
|
|
308
308
|
self,
|
|
309
309
|
context,
|
|
310
310
|
model_input,
|
|
311
|
-
params:
|
|
311
|
+
params: dict[str, Any] | None = None,
|
|
312
312
|
) -> Any:
|
|
313
313
|
"""
|
|
314
314
|
MLflow-compliant prediction method that calls the Nextmv model's solve method.
|
|
@@ -376,7 +376,7 @@ class Model:
|
|
|
376
376
|
|
|
377
377
|
def _cleanup_python_model(
|
|
378
378
|
model_dir: str,
|
|
379
|
-
model_configuration:
|
|
379
|
+
model_configuration: ModelConfiguration | None = None,
|
|
380
380
|
verbose: bool = False,
|
|
381
381
|
) -> None:
|
|
382
382
|
"""
|
nextmv/options.py
CHANGED
|
@@ -21,7 +21,7 @@ import copy
|
|
|
21
21
|
import json
|
|
22
22
|
import os
|
|
23
23
|
from dataclasses import dataclass
|
|
24
|
-
from typing import Any
|
|
24
|
+
from typing import Any
|
|
25
25
|
|
|
26
26
|
from nextmv.base_model import BaseModel
|
|
27
27
|
from nextmv.deprecated import deprecated
|
|
@@ -74,17 +74,17 @@ class Parameter:
|
|
|
74
74
|
param_type: type
|
|
75
75
|
"""The type of the parameter."""
|
|
76
76
|
|
|
77
|
-
default:
|
|
77
|
+
default: Any | None = None
|
|
78
78
|
"""The default value of the parameter. Even though this is optional, it is
|
|
79
79
|
recommended to provide a default value for all parameters."""
|
|
80
|
-
description:
|
|
80
|
+
description: str | None = None
|
|
81
81
|
"""An optional description of the parameter. This is useful for generating
|
|
82
82
|
help messages for the configuration."""
|
|
83
83
|
required: bool = False
|
|
84
84
|
"""Whether the parameter is required. If a parameter is required, it will
|
|
85
85
|
be an error to not provide a value for it, either trough a command-line
|
|
86
86
|
argument, an environment variable or a default value."""
|
|
87
|
-
choices: list[
|
|
87
|
+
choices: list[Any | None] = None
|
|
88
88
|
"""Limits values to a specific set of choices."""
|
|
89
89
|
|
|
90
90
|
def __post_init__(self):
|
|
@@ -246,12 +246,12 @@ class Option:
|
|
|
246
246
|
option_type: type
|
|
247
247
|
"""The type of the option."""
|
|
248
248
|
|
|
249
|
-
default:
|
|
249
|
+
default: Any | None = None
|
|
250
250
|
"""
|
|
251
251
|
The default value of the option. Even though this is optional, it is
|
|
252
252
|
recommended to provide a default value for all options.
|
|
253
253
|
"""
|
|
254
|
-
description:
|
|
254
|
+
description: str | None = None
|
|
255
255
|
"""
|
|
256
256
|
An optional description of the option. This is useful for generating help
|
|
257
257
|
messages for the `Options`.
|
|
@@ -262,16 +262,16 @@ class Option:
|
|
|
262
262
|
error to not provide a value for it, either trough a command-line argument,
|
|
263
263
|
an environment variable or a default value.
|
|
264
264
|
"""
|
|
265
|
-
choices:
|
|
265
|
+
choices: list[Any] | None = None
|
|
266
266
|
"""Limits values to a specific set of choices."""
|
|
267
|
-
additional_attributes:
|
|
267
|
+
additional_attributes: dict[str, Any] | None = None
|
|
268
268
|
"""
|
|
269
269
|
Optional additional attributes for the option. The Nextmv Cloud may
|
|
270
270
|
perform validation on these attributes. For example, the maximum length of
|
|
271
271
|
a string or the maximum value of an integer. These additional attributes
|
|
272
272
|
will be shown in the help message of the `Options`.
|
|
273
273
|
"""
|
|
274
|
-
control_type:
|
|
274
|
+
control_type: str | None = None
|
|
275
275
|
"""
|
|
276
276
|
The type of control to use for the option in the Nextmv Cloud UI. This is
|
|
277
277
|
useful for defining how the option should be presented in the Nextmv
|
|
@@ -281,13 +281,13 @@ class Option:
|
|
|
281
281
|
the option. This will be validated by the Nextmv Cloud, and availability
|
|
282
282
|
is based on options_type.
|
|
283
283
|
"""
|
|
284
|
-
hidden_from:
|
|
284
|
+
hidden_from: list[str] | None = None
|
|
285
285
|
"""
|
|
286
286
|
A list of team roles for which this option will be hidden in the UI. For
|
|
287
287
|
example, if you want to hide an option from the "operator" role, you can
|
|
288
288
|
pass `hidden_from=["operator"]`.
|
|
289
289
|
"""
|
|
290
|
-
display_name:
|
|
290
|
+
display_name: str | None = None
|
|
291
291
|
"""
|
|
292
292
|
An optional display name for the option. This is useful for making
|
|
293
293
|
the option more user-friendly in the UI.
|
|
@@ -1032,7 +1032,7 @@ class Options:
|
|
|
1032
1032
|
return False
|
|
1033
1033
|
|
|
1034
1034
|
@staticmethod
|
|
1035
|
-
def _option_type(option:
|
|
1035
|
+
def _option_type(option: Option | Parameter) -> type:
|
|
1036
1036
|
"""
|
|
1037
1037
|
Get the type of an option.
|
|
1038
1038
|
|