Explorar o código

fix: update the refman for export()

trgiangdo hai 1 ano
pai
achega
af07836456
Modificáronse 2 ficheiros con 8 adicións e 1 borrados
  1. 4 0
      taipy/core/scenario/scenario.py
  2. 4 1
      taipy/core/taipy.py

+ 4 - 0
taipy/core/scenario/scenario.py

@@ -592,11 +592,15 @@ class Scenario(_Entity, Submittable, _Labeled):
 
         Parameters:
             folder_path (Union[str, pathlib.Path]): The folder path to export the scenario to.
+                If the path exists and the override parameter is False, an exception is raised.
             override (bool): If True, the existing folder will be overridden. Default is False.
             include_data (bool): If True, the file-based data nodes are exported as well.
                 This includes Pickle, CSV, Excel, Parquet, and JSON data nodes.
                 If the scenario has a data node that is not file-based, a warning will be logged, and the data node
                 will not be exported. The default value is False.
+
+        Raises:
+            ExportFolderAlreadyExist^: If the `folder_path` already exists and the override parameter is False.
         """
         from ... import core as tp
 

+ 4 - 1
taipy/core/taipy.py

@@ -955,13 +955,16 @@ def export_scenario(
     Parameters:
         scenario_id (ScenarioId): The ID of the scenario to export.
         folder_path (Union[str, pathlib.Path]): The folder path to export the scenario to.
+            If the path exists and the override parameter is False, an exception is raised.
         override (bool): If True, the existing folder will be overridden. Default is False.
         include_data (bool): If True, the file-based data nodes are exported as well.
             This includes Pickle, CSV, Excel, Parquet, and JSON data nodes.
             If the scenario has a data node that is not file-based, a warning will be logged, and the data node
             will not be exported. The default value is False.
-    """
 
+    Raises:
+        ExportFolderAlreadyExist^: If the `folder_path` already exists and the override parameter is False.
+    """
     manager = _ScenarioManagerFactory._build_manager()
     scenario = manager._get(scenario_id)
     entity_ids = manager._get_children_entity_ids(scenario)