|
@@ -16,7 +16,7 @@ from taipy.config import Config
|
|
|
from taipy.config._serializer._json_serializer import _JsonSerializer
|
|
|
from taipy.config.common.frequency import Frequency
|
|
|
from taipy.config.common.scope import Scope
|
|
|
-from taipy.core.config import CoreSection, DataNodeConfig, JobConfig, MigrationConfig, ScenarioConfig, TaskConfig
|
|
|
+from taipy.core.config import CoreSection, DataNodeConfig, JobConfig, ScenarioConfig, TaskConfig
|
|
|
from tests.core.utils.named_temporary_file import NamedTemporaryFile
|
|
|
|
|
|
|
|
@@ -102,8 +102,6 @@ def config_test_scenario():
|
|
|
)
|
|
|
test_scenario_cfg.add_sequences({"sequence1": [test_task_cfg]})
|
|
|
|
|
|
- Config.add_migration_function("1.0", test_csv_dn_cfg, migrate_csv_path)
|
|
|
-
|
|
|
return test_scenario_cfg
|
|
|
|
|
|
|
|
@@ -172,9 +170,6 @@ tasks = [ "test_task:SECTION",]
|
|
|
additional_data_nodes = [ "test_pickle_dn:SECTION",]
|
|
|
frequency = "DAILY:FREQUENCY"
|
|
|
|
|
|
-[VERSION_MIGRATION.migration_fcts."1.0"]
|
|
|
-test_csv_dn = "tests.core.config.test_config_serialization.migrate_csv_path:function"
|
|
|
-
|
|
|
[SCENARIO.default.comparators]
|
|
|
|
|
|
[SCENARIO.default.sequences]
|
|
@@ -201,13 +196,11 @@ sequence1 = [ "test_task:SECTION",]
|
|
|
assert actual_config_2 == expected_toml_config
|
|
|
|
|
|
assert Config.unique_sections is not None
|
|
|
- assert len(Config.unique_sections) == 3
|
|
|
+ assert len(Config.unique_sections) == 2
|
|
|
|
|
|
assert Config.unique_sections[JobConfig.name].mode == "development"
|
|
|
assert Config.unique_sections[JobConfig.name].max_nb_of_workers is None
|
|
|
|
|
|
- assert Config.unique_sections[MigrationConfig.name].migration_fcts["1.0"] == {"test_csv_dn": migrate_csv_path}
|
|
|
-
|
|
|
assert Config.sections is not None
|
|
|
assert len(Config.sections) == 3
|
|
|
|
|
@@ -300,13 +293,6 @@ def test_read_write_json_configuration_file():
|
|
|
"""
|
|
|
+ """
|
|
|
},
|
|
|
-"VERSION_MIGRATION": {
|
|
|
-"migration_fcts": {
|
|
|
-"1.0": {
|
|
|
-"test_csv_dn": "tests.core.config.test_config_serialization.migrate_csv_path:function"
|
|
|
-}
|
|
|
-}
|
|
|
-},
|
|
|
"DATA_NODE": {
|
|
|
"default": {
|
|
|
"storage_type": "pickle",
|
|
@@ -402,13 +388,11 @@ def test_read_write_json_configuration_file():
|
|
|
assert actual_config_2 == expected_json_config
|
|
|
|
|
|
assert Config.unique_sections is not None
|
|
|
- assert len(Config.unique_sections) == 3
|
|
|
+ assert len(Config.unique_sections) == 2
|
|
|
|
|
|
assert Config.unique_sections[JobConfig.name].mode == "development"
|
|
|
assert Config.unique_sections[JobConfig.name].max_nb_of_workers is None
|
|
|
|
|
|
- assert Config.unique_sections[MigrationConfig.name].migration_fcts["1.0"] == {"test_csv_dn": migrate_csv_path}
|
|
|
-
|
|
|
assert Config.sections is not None
|
|
|
assert len(Config.sections) == 3
|
|
|
|
|
@@ -531,9 +515,6 @@ tasks = [ "test_task:SECTION",]
|
|
|
sequences.test_sequence = [ "test_task:SECTION",]
|
|
|
frequency = "DAILY:FREQUENCY"
|
|
|
|
|
|
-[VERSION_MIGRATION.migration_fcts."1.0"]
|
|
|
-test_csv_dn = "tests.core.config.test_config_serialization.migrate_csv_path:function"
|
|
|
-
|
|
|
[SCENARIO.default.comparators]
|
|
|
|
|
|
[SCENARIO.test_scenario.comparators]
|
|
@@ -548,7 +529,7 @@ test_json_dn = [ "tests.core.config.test_config_serialization.compare_function:f
|
|
|
Config.restore(tf.filename)
|
|
|
|
|
|
assert Config.unique_sections is not None
|
|
|
- assert len(Config.unique_sections) == 3
|
|
|
+ assert len(Config.unique_sections) == 2
|
|
|
|
|
|
assert Config.unique_sections[CoreSection.name].root_folder == "./taipy/"
|
|
|
assert Config.unique_sections[CoreSection.name].storage_folder == ".data/"
|
|
@@ -561,8 +542,6 @@ test_json_dn = [ "tests.core.config.test_config_serialization.compare_function:f
|
|
|
assert Config.unique_sections[JobConfig.name].mode == "development"
|
|
|
assert Config.unique_sections[JobConfig.name].max_nb_of_workers == 1
|
|
|
|
|
|
- assert Config.unique_sections[MigrationConfig.name].migration_fcts["1.0"] == {"test_csv_dn": migrate_csv_path}
|
|
|
-
|
|
|
assert Config.sections is not None
|
|
|
assert len(Config.sections) == 3
|
|
|
|
|
@@ -643,13 +622,6 @@ def test_read_write_json_configuration_file_migrate_sequence_in_scenario():
|
|
|
"version_number": "",
|
|
|
"force": "False:bool"
|
|
|
},
|
|
|
-"VERSION_MIGRATION": {
|
|
|
-"migration_fcts": {
|
|
|
-"1.0": {
|
|
|
-"test_csv_dn": "tests.core.config.test_config_serialization.migrate_csv_path:function"
|
|
|
-}
|
|
|
-}
|
|
|
-},
|
|
|
"DATA_NODE": {
|
|
|
"default": {
|
|
|
"storage_type": "pickle",
|
|
@@ -724,7 +696,7 @@ def test_read_write_json_configuration_file_migrate_sequence_in_scenario():
|
|
|
Config.restore(tf.filename)
|
|
|
|
|
|
assert Config.unique_sections is not None
|
|
|
- assert len(Config.unique_sections) == 3
|
|
|
+ assert len(Config.unique_sections) == 2
|
|
|
|
|
|
assert Config.unique_sections[CoreSection.name].root_folder == "./taipy/"
|
|
|
assert Config.unique_sections[CoreSection.name].storage_folder == ".data/"
|
|
@@ -737,8 +709,6 @@ def test_read_write_json_configuration_file_migrate_sequence_in_scenario():
|
|
|
assert Config.unique_sections[JobConfig.name].mode == "development"
|
|
|
assert Config.unique_sections[JobConfig.name].max_nb_of_workers == 1
|
|
|
|
|
|
- assert Config.unique_sections[MigrationConfig.name].migration_fcts["1.0"] == {"test_csv_dn": migrate_csv_path}
|
|
|
-
|
|
|
assert Config.sections is not None
|
|
|
assert len(Config.sections) == 3
|
|
|
|