Repository: Avaiga/taipy
File: taipy/config/config.py (Python)

Code before:
# Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
# an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
# specific language governing permissions and limitations under the License.

import os
from typing import Dict

from ..logger._taipy_logger import _TaipyLogger
from ._config import _Config
from ._config_comparator._config_comparator import _ConfigComparator
from ._serializer._json_serializer import _JsonSerializer
from ._serializer._toml_serializer import _TomlSerializer
from .checker._checker import _Checker
from .checker.issue_collector import IssueCollector
from .common._classproperty import _Classproperty
from .common._config_blocker import _ConfigBlocker
from .global_app.global_app_config import GlobalAppConfig
from .section import Section
from .unique_section import UniqueSection


class Config:
    """Singleton class that manages the configuration of a Taipy application.

    The `Config` singleton is the main entry point for configuring a Taipy application.
    In particular, the class provides:

    1. Various methods to configure the application's behavior

        The Config class provides various methods to configure the application. Each method adds
        a specific section to the configuration and returns it.

        Here is a non-exhaustive list of configuration method examples:

        - `configure_data_node`: Configure a data node adding and returning a `DataNodeConfig^`.
        - `configure_task`: Configure a task adding and returning a `TaskConfig^`.
        - `configure_scenario`: Configure a scenario adding and returning a `ScenarioConfig^`.
        - `load`: Load a TOML configuration file. (This overrides the Python configuration)
        - more...

        !!! example "Most frequently used configuration methods"

            ```python
            from taipy import Config

            def by_two(x: int):
                return x * 2

            input_cfg = Config.configure_data_node("my_input")
            result_cfg = Config.configure_data_node("my_result")
            task_cfg = Config.configure_task("my_double", function=by_two, input=input_cfg, output=result_cfg)

Review comment (suggestion):
```suggestion
    In particular, this class provides:
```

Code after:
# Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
# an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
# specific language governing permissions and limitations under the License.

import os
from typing import Dict

from ..logger._taipy_logger import _TaipyLogger
from ._config import _Config
from ._config_comparator._config_comparator import _ConfigComparator
from ._serializer._json_serializer import _JsonSerializer
from ._serializer._toml_serializer import _TomlSerializer
from .checker._checker import _Checker
from .checker.issue_collector import IssueCollector
from .common._classproperty import _Classproperty
from .common._config_blocker import _ConfigBlocker
from .global_app.global_app_config import GlobalAppConfig
from .section import Section
from .unique_section import UniqueSection


class Config:
    """Singleton class that manages the configuration of a Taipy application.

    The `Config` singleton is the main class to use for configuring a Taipy application.
    In particular, this class provides:

    1. Various methods to configure the application's behavior

        The Config class provides various methods to configure the application. Each method adds
        a specific section to the configuration and returns it.

        Here is a non-exhaustive list of configuration method examples:

        - `configure_data_node()^`: Configure a data node adding and returning a `DataNodeConfig^`.
        - `configure_task()^`: Configure a task adding and returning a `TaskConfig^`.
        - `configure_scenario()^`: Configure a scenario adding and returning a `ScenarioConfig^`.
        - `load()^`: Load a TOML configuration file. (This overrides the Python configuration)
        - more...

        !!! example "Most frequently used configuration methods"

            ```python
            from taipy import Config

            def by_two(x: int):
                return x * 2

            input_cfg = Config.configure_data_node("my_input")
            result_cfg = Config.configure_data_node("my_result")
            task_cfg = Config.configure_task("my_double", function=by_two, input=input_cfg, output=result_cfg)