Skip to content

Commit

Permalink
Update config.pyi
Browse files Browse the repository at this point in the history
  • Loading branch information
jrobinAV authored and github-actions[bot] committed Oct 3, 2024
1 parent cd0f701 commit 6e95b06
Showing 1 changed file with 37 additions and 31 deletions.
68 changes: 37 additions & 31 deletions taipy/common/config/config.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ class Config:

@classmethod
@_ConfigBlocker._check()
def load(cls, filename):
def load(cls, filename: str) -> None:
"""Load a configuration file.
The current Python configuration is replaced and the Config compilation is triggered.
Expand All @@ -126,21 +126,21 @@ class Config:
"""

@classmethod
def export(cls, filename):
def export(cls, filename: str) -> None:
"""Export a configuration.
The export is done in a toml file.
The export is done in a toml file. The exported configuration is taken
from the Python code configuration.
The exported configuration is taken from the Python code configuration.
Note:
If *filename* already exists, it is overwritten.
Parameters:
filename (Union[str, Path]): The path of the file to export.
Note:
If *filename* already exists, it is overwritten.
"""

@classmethod
def backup(cls, filename):
def backup(cls, filename: str) -> None:
"""Backup a configuration.
The backup is done in a toml file.
Expand All @@ -149,15 +149,16 @@ class Config:
the application: the Python code configuration, the file configuration and the environment
configuration.
Parameters:
filename (Union[str, Path]): The path of the file to export.
Note:
If *filename* already exists, it is overwritten.
Parameters:
filename (Union[str, Path]): The path of the file to export.
"""

@classmethod
@_ConfigBlocker._check()
def restore(cls, filename):
def restore(cls, filename: str) -> None:
"""Restore a configuration file and replace the current applied configuration.
Parameters:
Expand All @@ -166,19 +167,19 @@ class Config:

@classmethod
@_ConfigBlocker._check()
def override(cls, filename):
def override(cls, filename: str) -> None:
"""Load a configuration from a file and overrides the current config.
Parameters:
filename (Union[str, Path]): The path of the toml configuration file to load.
"""

@classmethod
def block_update(cls):
def block_update(cls) -> None:
"""Block update on the configuration signgleton."""

@classmethod
def unblock_update(cls):
def unblock_update(cls) -> None:
"""Unblock update on the configuration signgleton."""

@classmethod
Expand Down Expand Up @@ -209,20 +210,20 @@ class Config:

@classmethod
@_ConfigBlocker._check()
def _register_default(cls, default_section: Section):
def _register_default(cls, default_section: Section) -> None:
""""""

@classmethod
@_ConfigBlocker._check()
def _register(cls, section):
def _register(cls, section) -> None:
""""""

@classmethod
def _override_env_file(cls):
def _override_env_file(cls) -> None:
""""""

@classmethod
def _compile_configs(cls):
def _compile_configs(cls) -> None:
""""""

@classmethod
Expand Down Expand Up @@ -348,7 +349,7 @@ class Config:
validity_period (Optional[timedelta]): The duration since the last edit date for which the data node can be
considered up-to-date. Once the validity period has passed, the data node is considered stale and
relevant tasks will run even if they are skippable (see the Task configuration
[page](../../userman/scenario_features/task-orchestration/scenario-config.md#from-task-configurations)
[page](../../../../../userman/scenario_features/task-orchestration/scenario-config.md#from-task-configurations)
for more details).
If *validity_period* is set to None, the data node is always up-to-date.
**properties (dict[str, any]): A keyworded variable length list of additional arguments.
Expand Down Expand Up @@ -401,7 +402,7 @@ class Config:
validity_period (Optional[timedelta]): The duration since the last edit date for which the data node can be
considered up-to-date. Once the validity period has passed, the data node is considered stale and
relevant tasks will run even if they are skippable (see the Task configuration
[page](../../userman/scenario_features/task-orchestration/scenario-config.md#from-task-configurations)
[page](../../../../../userman/scenario_features/task-orchestration/scenario-config.md#from-task-configurations)
for more details).
If *validity_period* is set to None, the data node is always up-to-date.
**properties (dict[str, any]): A keyworded variable length list of additional arguments.
Expand Down Expand Up @@ -436,7 +437,7 @@ class Config:
validity_period (Optional[timedelta]): The duration since the last edit date for which the data node can be
considered up-to-date. Once the validity period has passed, the data node is considered stale and
relevant tasks will run even if they are skippable (see the Task configuration
[page](../../userman/scenario_features/task-orchestration/scenario-config.md#from-task-configurations)
[page](../../../../../userman/scenario_features/task-orchestration/scenario-config.md#from-task-configurations)
for more details).
If *validity_period* is set to None, the data node is always up-to-date.
**properties (dict[str, any]): A keyworded variable length list of additional arguments.
Expand Down Expand Up @@ -470,10 +471,11 @@ class Config:
validity_period (Optional[timedelta]): The duration since the last edit date for which the data node can be
considered up-to-date. Once the validity period has passed, the data node is considered stale and
relevant tasks will run even if they are skippable (see the Task configuration
[page](../../userman/scenario_features/task-orchestration/scenario-config.md#from-task-configurations)
[page](../../../../../userman/scenario_features/task-orchestration/scenario-config.md#from-task-configurations)
for more details).
If *validity_period* is set to None, the data node is always up-to-date.
**properties (dict[str, any]): A keyworded variable length list of additional arguments.
Returns:
The new JSON data node configuration.
""" # noqa: E501
Expand Down Expand Up @@ -515,7 +517,7 @@ class Config:
validity_period (Optional[timedelta]): The duration since the last edit date for which the data node can be
considered up-to-date. Once the validity period has passed, the data node is considered stale and
relevant tasks will run even if they are skippable (see the Task configuration
[page](../../userman/scenario_features/task-orchestration/scenario-config.md#from-task-configurations)
[page](../../../../../userman/scenario_features/task-orchestration/scenario-config.md#from-task-configurations)
for more details).
If *validity_period* is set to None, the data node is always up-to-date.
**properties (dict[str, any]): A keyworded variable length list of additional arguments.
Expand Down Expand Up @@ -551,7 +553,7 @@ class Config:
validity_period (Optional[timedelta]): The duration since the last edit date for which the data node can be
considered up-to-date. Once the validity period has passed, the data node is considered stale and
relevant tasks will run even if they are skippable (see the Task configuration
[page](../../userman/scenario_features/task-orchestration/scenario-config.md#from-task-configurations)
[page](../../../../../userman/scenario_features/task-orchestration/scenario-config.md#from-task-configurations)
for more details).
If *validity_period* is set to None, the data node is always up-to-date.
**properties (dict[str, any]): A keyworded variable length list of additional arguments.
Expand Down Expand Up @@ -588,10 +590,11 @@ class Config:
validity_period (Optional[timedelta]): The duration since the last edit date for which the data node can be
considered up-to-date. Once the validity period has passed, the data node is considered stale and
relevant tasks will run even if they are skippable (see the Task configuration
[page](../../userman/scenario_features/task-orchestration/scenario-config.md#from-task-configurations)
[page](../../../../../userman/scenario_features/task-orchestration/scenario-config.md#from-task-configurations)
for more details).
If *validity_period* is set to None, the data node is always up-to-date.
**properties (dict[str, any]): A keyworded variable length list of additional arguments.
Returns:
The new Generic data node configuration.
""" # noqa: E501
Expand All @@ -618,7 +621,7 @@ class Config:
validity_period (Optional[timedelta]): The duration since the last edit date for which the data node can be
considered up-to-date. Once the validity period has passed, the data node is considered stale and
relevant tasks will run even if they are skippable (see the Task configuration
[page](../../userman/scenario_features/task-orchestration/scenario-config.md#from-task-configurations)
[page](../../../../../userman/scenario_features/task-orchestration/scenario-config.md#from-task-configurations)
for more details).
If *validity_period* is set to None, the data node is always up-to-date.
**properties (dict[str, any]): A keyworded variable length list of additional arguments.
Expand Down Expand Up @@ -651,7 +654,7 @@ class Config:
validity_period (Optional[timedelta]): The duration since the last edit date for which the data node can be
considered up-to-date. Once the validity period has passed, the data node is considered stale and
relevant tasks will run even if they are skippable (see the Task configuration
[page](../../userman/scenario_features/task-orchestration/scenario-config.md#from-task-configurations)
[page](../../../../../userman/scenario_features/task-orchestration/scenario-config.md#from-task-configurations)
for more details).
If *validity_period* is set to None, the data node is always up-to-date.
**properties (dict[str, any]): A keyworded variable length list of additional arguments.
Expand Down Expand Up @@ -710,7 +713,7 @@ class Config:
validity_period (Optional[timedelta]): The duration since the last edit date for which the data node can be
considered up-to-date. Once the validity period has passed, the data node is considered stale and
relevant tasks will run even if they are skippable (see the Task configuration
[page](../../userman/scenario_features/task-orchestration/scenario-config.md#from-task-configurations)
[page](../../../../../userman/scenario_features/task-orchestration/scenario-config.md#from-task-configurations)
for more details).
If *validity_period* is set to None, the data node is always up-to-date.
**properties (dict[str, any]): A keyworded variable length list of additional arguments.
Expand Down Expand Up @@ -775,10 +778,11 @@ class Config:
validity_period (Optional[timedelta]): The duration since the last edit date for which the data node can be
considered up-to-date. Once the validity period has passed, the data node is considered stale and
relevant tasks will run even if they are skippable (see the Task configuration
[page](../../userman/scenario_features/task-orchestration/scenario-config.md#from-task-configurations)
[page](../../../../../userman/scenario_features/task-orchestration/scenario-config.md#from-task-configurations)
for more details).
If *validity_period* is set to None, the data node is always up-to-date.
**properties (dict[str, any]): A keyworded variable length list of additional arguments.
Returns:
The new SQL data node configuration.
""" # noqa: E501
Expand Down Expand Up @@ -825,7 +829,7 @@ class Config:
validity_period (Optional[timedelta]): The duration since the last edit date for which the data node can be
considered up-to-date. Once the validity period has passed, the data node is considered stale and
relevant tasks will run even if they are skippable (see the Task configuration
[page](../../userman/scenario_features/task-orchestration/scenario-config.md#from-task-configurations)
[page](../../../../../userman/scenario_features/task-orchestration/scenario-config.md#from-task-configurations)
for more details).
If *validity_period* is set to None, the data node is always up-to-date.
**properties (dict[str, any]): A keyworded variable length list of additional arguments.
Expand Down Expand Up @@ -864,7 +868,7 @@ class Config:
validity_period (Optional[timedelta]): The duration since the last edit date for which the data node can be
considered up-to-date. Once the validity period has passed, the data node is considered stale and
relevant tasks will run even if they are skippable (see the Task configuration
[page](../../userman/scenario_features/task-orchestration/scenario-config.md#from-task-configurations)
[page](../../../../../userman/scenario_features/task-orchestration/scenario-config.md#from-task-configurations)
for more details).
If *validity_period* is set to None, the data node is always up-to-date.
**properties (dict[str, any]): A keyworded variable length list of additional arguments.
Expand Down Expand Up @@ -929,6 +933,7 @@ class Config:
The default value is False.
**properties (dict[str, any]): A keyworded variable length list of additional
arguments.
Returns:
The default task configuration.
"""
Expand Down Expand Up @@ -987,14 +992,15 @@ class Config:
mode (Optional[str]): Indicates the mode of the version management system.
Possible values are *"development"* or *"experiment"*. On Enterprise edition of Taipy,
*production* mode is also available. Please refer to the
[Versioning management](../../userman/advanced_features/versioning/index.md)
[Versioning management](../../../../../userman/advanced_features/versioning/index.md)
documentation page for more details.
version_number (Optional[str]): The string identifier of the version.
In development mode, the version number is ignored.
force (Optional[bool]): If True, Taipy will override a version even if the configuration
has changed and run the application.
**properties (Dict[str, Any]): A keyworded variable length list of additional arguments configure the
behavior of the `Orchestrator^` service.
Returns:
The Core configuration.
"""

0 comments on commit 6e95b06

Please sign in to comment.