Skip to content

Commit

Permalink
Merge branch 'develop' into bug/#1911-current-page-menu
Browse files Browse the repository at this point in the history
  • Loading branch information
namnguyen20999 committed Oct 20, 2024
2 parents 4d77679 + 1aa13d9 commit 249be26
Show file tree
Hide file tree
Showing 41 changed files with 175 additions and 175 deletions.
2 changes: 1 addition & 1 deletion taipy/_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def _run(*services: _AppType, **kwargs) -> t.Optional[Flask]:
A Taipy service is an instance of a class that runs code as a Web application.
Parameters:
Arguments:
*services (Union[`Gui^`, `Rest^`, `Orchestrator^`]): Services to run, as separate arguments.<br/>
If several services are provided, all the services run simultaneously.<br/>
If this is empty or set to None, this method does nothing.
Expand Down
2 changes: 1 addition & 1 deletion taipy/common/config/_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def __point_nested_section_to_self(self, section) -> None:
"""Loop through attributes of a Section to find if any attribute has a list of Section as value.
If there is, update each nested Section by the corresponding instance in self.
Args:
Arguments:
section (Section): The Section to search for nested sections.
"""
for _, attr_value in vars(section).items():
Expand Down
4 changes: 2 additions & 2 deletions taipy/common/config/_config_comparator/_config_comparator.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def _find_conflict_config(
):
"""Compare between 2 _Config object to check for compatibility.
Args:
Arguments:
old_config (_Config): The old _Config.
new_config (_Config): The new _Config.
old_version_number (str, optional): The old version number for logging. Defaults to None.
Expand Down Expand Up @@ -79,7 +79,7 @@ def _compare(
):
"""Compare between 2 _Config object to check for compatibility.
Args:
Arguments:
config_1 (_Config): The old _Config.
config_2 (_Config): The new _Config.
version_number_1 (str): The old version number for logging.
Expand Down
12 changes: 6 additions & 6 deletions taipy/common/config/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ def load(cls, filename: str) -> None:
The current Python configuration is replaced and the Config compilation is triggered.
Parameters:
Arguments:
filename (Union[str, Path]): The path of the toml configuration file to load.
"""
cls.__logger.info(f"Loading configuration. Filename: '{filename}'")
Expand All @@ -157,7 +157,7 @@ def export(cls, filename: str) -> None:
Note:
If *filename* already exists, it is overwritten.
Parameters:
Arguments:
filename (Union[str, Path]): The path of the file to export.
"""
cls._serializer._write(cls._python_config, filename)
Expand All @@ -175,7 +175,7 @@ def backup(cls, filename: str) -> None:
Note:
If *filename* already exists, it is overwritten.
Parameters:
Arguments:
filename (Union[str, Path]): The path of the file to export.
"""
cls._serializer._write(cls._applied_config, filename)
Expand All @@ -185,7 +185,7 @@ def backup(cls, filename: str) -> None:
def restore(cls, filename: str) -> None:
"""Restore a configuration file and replace the current applied configuration.
Parameters:
Arguments:
filename (Union[str, Path]): The path of the toml configuration file to load.
"""
cls.__logger.info(f"Restoring configuration. Filename: '{filename}'")
Expand All @@ -197,7 +197,7 @@ def restore(cls, filename: str) -> None:
def override(cls, filename: str) -> None:
"""Load a configuration from a file and overrides the current config.
Parameters:
Arguments:
filename (Union[str, Path]): The path of the toml configuration file to load.
"""
cls.__logger.info(f"Loading configuration. Filename: '{filename}'")
Expand All @@ -221,7 +221,7 @@ def unblock_update(cls) -> None:
def configure_global_app(cls, **properties) -> GlobalAppConfig:
"""Configure the global application.
Parameters:
Arguments:
**properties (Dict[str, Any]): A dictionary of additional properties.
Returns:
Expand Down
56 changes: 28 additions & 28 deletions taipy/common/config/config.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ class Config:
The current Python configuration is replaced and the Config compilation is triggered.
Parameters:
Arguments:
filename (Union[str, Path]): The path of the toml configuration file to load.
"""

Expand All @@ -135,7 +135,7 @@ class Config:
Note:
If *filename* already exists, it is overwritten.
Parameters:
Arguments:
filename (Union[str, Path]): The path of the file to export.
"""

Expand All @@ -152,7 +152,7 @@ class Config:
Note:
If *filename* already exists, it is overwritten.
Parameters:
Arguments:
filename (Union[str, Path]): The path of the file to export.
"""

Expand All @@ -161,7 +161,7 @@ class Config:
def restore(cls, filename: str) -> None:
"""Restore a configuration file and replace the current applied configuration.
Parameters:
Arguments:
filename (Union[str, Path]): The path of the toml configuration file to load.
"""

Expand All @@ -170,7 +170,7 @@ class Config:
def override(cls, filename: str) -> None:
"""Load a configuration from a file and overrides the current config.
Parameters:
Arguments:
filename (Union[str, Path]): The path of the toml configuration file to load.
"""

Expand All @@ -187,7 +187,7 @@ class Config:
def configure_global_app(cls, **properties) -> GlobalAppConfig:
"""Configure the global application.
Parameters:
Arguments:
**properties (Dict[str, Any]): A dictionary of additional properties.
Returns:
Expand Down Expand Up @@ -266,7 +266,7 @@ class Config:
) -> "ScenarioConfig":
"""Configure a new scenario configuration.
Parameters:
Arguments:
id (str): The unique identifier of the new scenario configuration.
task_configs (Optional[List[TaskConfig^]]): The list of task configurations used by this
scenario configuration. The default value is None.
Expand Down Expand Up @@ -306,7 +306,7 @@ class Config:
where all scenario configuration objects will find their default
values when needed.
Parameters:
Arguments:
task_configs (Optional[List[TaskConfig^]]): The list of task configurations used by this
scenario configuration.
additional_data_node_configs (Optional[List[DataNodeConfig^]]): The list of additional data nodes
Expand Down Expand Up @@ -339,7 +339,7 @@ class Config:
where all data node configuration objects will find their default
values when needed.
Parameters:
Arguments:
storage_type (str): The default storage type for all data node configurations.
The possible values are *"pickle"* (the default value), *"csv"*, *"excel"*,
*"sql"*, *"mongo_collection"*, *"in_memory"*, *"json"*, *"parquet"*, *"generic"*,
Expand Down Expand Up @@ -367,7 +367,7 @@ class Config:
) -> "DataNodeConfig":
"""Configure a new data node configuration from an existing one.
Parameters:
Arguments:
source_configuration (DataNodeConfig): The source data node configuration.
id (str): The unique identifier of the new data node configuration.
**properties (dict[str, any]): A keyworded variable length list of additional arguments.<br/>
Expand All @@ -388,7 +388,7 @@ class Config:
) -> "DataNodeConfig":
"""Configure a new data node configuration.
Parameters:
Arguments:
id (str): The unique identifier of the new data node configuration.
storage_type (Optional[str]): The data node configuration storage type. The possible values
are None (which is the default value of *"pickle"*, unless it has been overloaded by the
Expand Down Expand Up @@ -425,7 +425,7 @@ class Config:
) -> "DataNodeConfig":
"""Configure a new CSV data node configuration.
Parameters:
Arguments:
id (str): The unique identifier of the new CSV data node configuration.
default_path (Optional[str]): The default path of the CSV file.
encoding (Optional[str]): The encoding of the CSV file.
Expand Down Expand Up @@ -460,7 +460,7 @@ class Config:
) -> "DataNodeConfig":
"""Configure a new JSON data node configuration.
Parameters:
Arguments:
id (str): The unique identifier of the new JSON data node configuration.
default_path (Optional[str]): The default path of the JSON file.
encoding (Optional[str]): The encoding of the JSON file.
Expand Down Expand Up @@ -496,7 +496,7 @@ class Config:
) -> "DataNodeConfig":
"""Configure a new Parquet data node configuration.
Parameters:
Arguments:
id (str): The unique identifier of the new Parquet data node configuration.
default_path (Optional[str]): The default path of the Parquet file.
engine (Optional[str]): Parquet library to use. Possible values are *"fastparquet"* or
Expand All @@ -508,8 +508,8 @@ class Config:
function.
write_kwargs (Optional[dict]): Additional parameters passed to the
`pandas.DataFrame.write_parquet()` function.<br/>
The parameters in *read_kwargs* and *write_kwargs* have a **higher precedence** than the
top-level parameters which are also passed to Pandas.
The parameters in *read_kwargs* and *write_kwargs* have a **higher precedence**
than the top-level parameters which are also passed to Pandas.
exposed_type (Optional[str]): The exposed type of the data read from Parquet file.<br/>
The default value is `pandas`.
scope (Optional[Scope^]): The scope of the Parquet data node configuration.<br/>
Expand Down Expand Up @@ -540,7 +540,7 @@ class Config:
) -> "DataNodeConfig":
"""Configure a new Excel data node configuration.
Parameters:
Arguments:
id (str): The unique identifier of the new Excel data node configuration.
default_path (Optional[str]): The path of the Excel file.
has_header (Optional[bool]): If True, indicates that the Excel file has a header.
Expand Down Expand Up @@ -576,7 +576,7 @@ class Config:
) -> "DataNodeConfig":
"""Configure a new generic data node configuration.
Parameters:
Arguments:
id (str): The unique identifier of the new generic data node configuration.
read_fct (Optional[Callable]): The Python function called to read the data.
write_fct (Optional[Callable]): The Python function called to write the data.
Expand Down Expand Up @@ -610,7 +610,7 @@ class Config:
) -> "DataNodeConfig":
"""Configure a new *in-memory* data node configuration.
Parameters:
Arguments:
id (str): The unique identifier of the new in_memory data node configuration.
default_data (Optional[any]): The default data of the data nodes instantiated from
this in_memory data node configuration.
Expand Down Expand Up @@ -642,7 +642,7 @@ class Config:
) -> "DataNodeConfig":
"""Configure a new pickle data node configuration.
Parameters:
Arguments:
id (str): The unique identifier of the new pickle data node configuration.
default_path (Optional[str]): The path of the pickle file.
default_data (Optional[any]): The default data of the data nodes instantiated from
Expand Down Expand Up @@ -685,7 +685,7 @@ class Config:
) -> "DataNodeConfig":
"""Configure a new SQL table data node configuration.
Parameters:
Arguments:
id (str): The unique identifier of the new SQL data node configuration.
db_name (str): The database name, or the name of the SQLite database file.
db_engine (str): The database engine. Possible values are *"sqlite"*, *"mssql"*, *"mysql"*,
Expand Down Expand Up @@ -746,7 +746,7 @@ class Config:
) -> "DataNodeConfig":
"""Configure a new SQL data node configuration.
Parameters:
Arguments:
id (str): The unique identifier of the new SQL data node configuration.
db_name (str): The database name, or the name of the SQLite database file.
db_engine (str): The database engine. Possible values are *"sqlite"*, *"mssql"*, *"mysql"*,
Expand Down Expand Up @@ -806,7 +806,7 @@ class Config:
) -> "DataNodeConfig":
"""Configure a new Mongo collection data node configuration.
Parameters:
Arguments:
id (str): The unique identifier of the new Mongo collection data node configuration.
db_name (str): The database name.
collection_name (str): The collection in the database to read from and to write the data to.
Expand Down Expand Up @@ -856,7 +856,7 @@ class Config:
) -> "DataNodeConfig":
"""Configure a new S3 object data node configuration.
Parameters:
Arguments:
id (str): The unique identifier of the new S3 Object data node configuration.
aws_access_key (str): Amazon Web Services (AWS) ID for to identify account.
aws_secret_access_key (str): Amazon Web Services (AWS) access key to authenticate
Expand Down Expand Up @@ -906,7 +906,7 @@ class Config:
) -> "TaskConfig":
"""Configure a new task configuration.
Parameters:
Arguments:
id (str): The unique identifier of this task configuration.
function (Callable): The python function called by Taipy to run the task.
input (Optional[Union[DataNodeConfig^, List[DataNodeConfig^]]]): The list of the
Expand Down Expand Up @@ -938,7 +938,7 @@ class Config:
where all task configuration objects will find their default
values when needed.
Parameters:
Arguments:
function (Callable): The python function called by Taipy to run the task.
input (Optional[Union[DataNodeConfig^, List[DataNodeConfig^]]]): The list of the
input data node configurations. This can be a unique data node
Expand All @@ -962,7 +962,7 @@ class Config:
) -> "JobConfig":
"""Configure job execution.
Parameters:
Arguments:
mode (Optional[str]): The job execution mode.
Possible values are: *"standalone"* or *"development"*.
max_nb_of_workers (Optional[int, str]): Parameter used only in *"standalone"* mode.
Expand Down Expand Up @@ -992,7 +992,7 @@ class Config:
) -> "CoreSection":
"""Configure the Orchestrator service.
Parameters:
Arguments:
root_folder (Optional[str]): Path of the base folder for the taipy application.
The default value is "./taipy/"
storage_folder (str): Folder name used to store user data. The default value is "user_data/". It is used in
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def run(self):
def _dispatch(self, job: Job):
"""Dispatches the given `Job^` on an available worker for execution.
Parameters:
Arguments:
job (Job^): The job to submit on an executor with an available worker.
"""
rs = _TaskFunctionWrapper(job.id, job.task).execute()
Expand Down
6 changes: 3 additions & 3 deletions taipy/core/_orchestrator/_dispatcher/_job_dispatcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def is_running(self) -> bool:
def stop(self, wait: bool = True, timeout: Optional[float] = None):
"""Stop the dispatcher.
Parameters:
Arguments:
wait (bool): If True, the method will wait for the dispatcher to stop.
timeout (Optional[float]): The maximum time to wait. If None, the method will wait indefinitely.
"""
Expand Down Expand Up @@ -117,7 +117,7 @@ def _needs_to_run(task: Task) -> bool:
"""
Returns True if the task has no output or if at least one input was modified since the latest run.
Parameters:
Arguments:
task (Task^): The task to run.
Returns:
Expand All @@ -142,7 +142,7 @@ def _dispatch(self, job: Job):
"""
Dispatches the given `Job^` on an available worker for execution.
Parameters:
Arguments:
job (Job^): The job to submit on an executor with an available worker.
"""
raise NotImplementedError
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def run(self):
def _dispatch(self, job: Job):
"""Dispatches the given `Job^` on an available worker for execution.
Parameters:
Arguments:
job (Job^): The job to submit on an executor with an available worker.
"""
with self._nb_available_workers_lock:
Expand Down
Loading

0 comments on commit 249be26

Please sign in to comment.