diff --git a/schemas/settings.schema.json b/schemas/settings.schema.json index b0f08a4a1983..240067ee1d25 100644 --- a/schemas/settings.schema.json +++ b/schemas/settings.schema.json @@ -245,6 +245,12 @@ "title": "DeploymentsSettings", "type": "object" }, + "ExperimentsSettings": { + "description": "Settings for configuring experimental features", + "properties": {}, + "title": "ExperimentsSettings", + "type": "object" + }, "FlowsSettings": { "description": "Settings for controlling flow behavior", "properties": { @@ -1571,6 +1577,10 @@ "deployments": { "$ref": "#/$defs/DeploymentsSettings" }, + "experiments": { + "$ref": "#/$defs/ExperimentsSettings", + "description": "Settings for controlling experimental features" + }, "flows": { "$ref": "#/$defs/FlowsSettings" }, diff --git a/src/prefect/settings/models/experiments.py b/src/prefect/settings/models/experiments.py new file mode 100644 index 000000000000..59dfdd85a9b9 --- /dev/null +++ b/src/prefect/settings/models/experiments.py @@ -0,0 +1,15 @@ +from prefect.settings.base import PrefectBaseSettings, PrefectSettingsConfigDict + + +class ExperimentsSettings(PrefectBaseSettings): + """ + Settings for configuring experimental features + """ + + model_config = PrefectSettingsConfigDict( + env_prefix="PREFECT_EXPERIMENTS_", + env_file=".env", + extra="ignore", + toml_file="prefect.toml", + prefect_toml_table_header=("experiments",), + ) diff --git a/src/prefect/settings/models/root.py b/src/prefect/settings/models/root.py index f424b1d6a630..6ae1be2f245a 100644 --- a/src/prefect/settings/models/root.py +++ b/src/prefect/settings/models/root.py @@ -24,6 +24,7 @@ from .client import ClientSettings from .cloud import CloudSettings from .deployments import DeploymentsSettings +from .experiments import ExperimentsSettings from .flows import FlowsSettings from .internal import InternalSettings from .logging import LoggingSettings @@ -89,6 +90,11 @@ class Settings(PrefectBaseSettings): description="Settings for configuring deployments defaults", ) + experiments: ExperimentsSettings = Field( + default_factory=ExperimentsSettings, + description="Settings for controlling experimental features", + ) + flows: FlowsSettings = Field( default_factory=FlowsSettings, description="Settings for controlling flow behavior",