Coverage for /usr/local/lib/python3.12/site-packages/prefect/settings/models/server/flow_run_graph.py: 100%

8 statements  

« prev     ^ index     » next       coverage.py v7.10.6, created at 2025-12-05 10:48 +0000

1from typing import ClassVar 1a

2 

3from pydantic import AliasChoices, AliasPath, Field 1a

4from pydantic_settings import SettingsConfigDict 1a

5 

6from prefect.settings.base import PrefectBaseSettings, build_settings_config 1a

7 

8 

9class ServerFlowRunGraphSettings(PrefectBaseSettings): 1a

10 """ 

11 Settings for controlling behavior of the flow run graph 

12 """ 

13 

14 model_config: ClassVar[SettingsConfigDict] = build_settings_config( 1a

15 ("server", "flow_run_graph") 

16 ) 

17 

18 max_nodes: int = Field( 1a

19 default=10000, 

20 description="The maximum size of a flow run graph on the v2 API", 

21 validation_alias=AliasChoices( 

22 AliasPath("max_nodes"), 

23 "prefect_server_flow_run_graph_max_nodes", 

24 "prefect_api_max_flow_run_graph_nodes", 

25 ), 

26 ) 

27 

28 max_artifacts: int = Field( 1a

29 default=10000, 

30 description="The maximum number of artifacts to show on a flow run graph on the v2 API", 

31 validation_alias=AliasChoices( 

32 AliasPath("max_artifacts"), 

33 "prefect_server_flow_run_graph_max_artifacts", 

34 "prefect_api_max_flow_run_graph_artifacts", 

35 ), 

36 )