PySimultan 0.7.0__tar.gz → 0.7.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pysimultan-0.7.0 → pysimultan-0.7.2}/.gitignore +1 -0
- {pysimultan-0.7.0 → pysimultan-0.7.2}/PKG-INFO +4 -3
- {pysimultan-0.7.0 → pysimultan-0.7.2}/README.md +3 -0
- {pysimultan-0.7.0 → pysimultan-0.7.2}/pyproject.toml +0 -2
- pysimultan-0.7.2/src/PySimultan2/__about__.py +1 -0
- {pysimultan-0.7.0 → pysimultan-0.7.2}/src/PySimultan2/data_model.py +47 -11
- {pysimultan-0.7.0 → pysimultan-0.7.2}/src/PySimultan2/object_mapper.py +3 -3
- pysimultan-0.7.2/tests/resources/new_test_file.txt +1 -0
- pysimultan-0.7.2/tests/resources/new_test_file2.txt +1 -0
- {pysimultan-0.7.0 → pysimultan-0.7.2}/tests/test_files.py +1 -2
- pysimultan-0.7.0/src/PySimultan2/__about__.py +0 -1
- pysimultan-0.7.0/src/PySimultan2/resources/AssimpNet.dll +0 -0
- pysimultan-0.7.0/src/PySimultan2/resources/AvalonDock.dll +0 -0
- pysimultan-0.7.0/src/PySimultan2/resources/BruTile.dll +0 -0
- pysimultan-0.7.0/src/PySimultan2/resources/Cyotek.Drawing.BitmapFont.dll +0 -0
- pysimultan-0.7.0/src/PySimultan2/resources/HelixToolkit.Core.Wpf.dll +0 -0
- pysimultan-0.7.0/src/PySimultan2/resources/HelixToolkit.SharpDX.Core.Wpf.dll +0 -0
- pysimultan-0.7.0/src/PySimultan2/resources/HelixToolkit.SharpDX.Core.dll +0 -0
- pysimultan-0.7.0/src/PySimultan2/resources/HelixToolkit.dll +0 -0
- pysimultan-0.7.0/src/PySimultan2/resources/Python.Runtime.dll +0 -0
- pysimultan-0.7.0/src/PySimultan2/resources/SIMULTAN.UI.dll +0 -0
- pysimultan-0.7.0/src/PySimultan2/resources/SIMULTAN.UI.xml +0 -16226
- pysimultan-0.7.0/src/PySimultan2/resources/SharpDX.D3DCompiler.dll +0 -0
- pysimultan-0.7.0/src/PySimultan2/resources/SharpDX.DXGI.dll +0 -0
- pysimultan-0.7.0/src/PySimultan2/resources/SharpDX.Direct2D1.dll +0 -0
- pysimultan-0.7.0/src/PySimultan2/resources/SharpDX.Direct3D11.dll +0 -0
- pysimultan-0.7.0/src/PySimultan2/resources/SharpDX.Direct3D9.dll +0 -0
- pysimultan-0.7.0/src/PySimultan2/resources/SharpDX.dll +0 -0
- pysimultan-0.7.0/src/PySimultan2/resources/System.Collections.Immutable.dll +0 -0
- pysimultan-0.7.0/src/PySimultan2/resources/System.Reflection.Metadata.dll +0 -0
- pysimultan-0.7.0/src/PySimultan2/resources/XAMLMarkupExtensions.dll +0 -0
- pysimultan-0.7.0/src/PySimultan2/resources/assimp.dll +0 -0
- pysimultan-0.7.0/src/PySimultan2/resources/componentmanager.user +0 -0
- pysimultan-0.7.0/src/PySimultan2/resources/defaultsettings.xml +0 -0
- pysimultan-0.7.0/src/PySimultan2/resources/setup.bat +0 -1
- pysimultan-0.7.0/tests/resources/new_test_file.txt +0 -1
- pysimultan-0.7.0/tests/resources/new_test_file2.txt +0 -1
- {pysimultan-0.7.0 → pysimultan-0.7.2}/LICENSE.txt +0 -0
- {pysimultan-0.7.0 → pysimultan-0.7.2}/src/PySimultan2/CHANGELOG.md +0 -0
- {pysimultan-0.7.0 → pysimultan-0.7.2}/src/PySimultan2/__init__.py +0 -0
- {pysimultan-0.7.0 → pysimultan-0.7.2}/src/PySimultan2/default_types.py +0 -0
- {pysimultan-0.7.0 → pysimultan-0.7.2}/src/PySimultan2/files.py +0 -0
- {pysimultan-0.7.0 → pysimultan-0.7.2}/src/PySimultan2/geometry/__init__.py +0 -0
- {pysimultan-0.7.0 → pysimultan-0.7.2}/src/PySimultan2/geometry/geometry_base.py +0 -0
- {pysimultan-0.7.0 → pysimultan-0.7.2}/src/PySimultan2/geometry/utils.py +0 -0
- {pysimultan-0.7.0 → pysimultan-0.7.2}/src/PySimultan2/multi_values.py +0 -0
- {pysimultan-0.7.0 → pysimultan-0.7.2}/src/PySimultan2/resources/ClosedXML.dll +0 -0
- {pysimultan-0.7.0 → pysimultan-0.7.2}/src/PySimultan2/resources/ControlzEx.dll +0 -0
- {pysimultan-0.7.0 → pysimultan-0.7.2}/src/PySimultan2/resources/DocumentFormat.OpenXml.dll +0 -0
- {pysimultan-0.7.0 → pysimultan-0.7.2}/src/PySimultan2/resources/DotSpatial.Projections.dll +0 -0
- {pysimultan-0.7.0 → pysimultan-0.7.2}/src/PySimultan2/resources/ExcelNumberFormat.dll +0 -0
- {pysimultan-0.7.0 → pysimultan-0.7.2}/src/PySimultan2/resources/Fluent.dll +0 -0
- {pysimultan-0.7.0 → pysimultan-0.7.2}/src/PySimultan2/resources/MathNet.Numerics.dll +0 -0
- {pysimultan-0.7.0 → pysimultan-0.7.2}/src/PySimultan2/resources/Microsoft.AspNetCore.Authorization.dll +0 -0
- {pysimultan-0.7.0 → pysimultan-0.7.2}/src/PySimultan2/resources/Microsoft.AspNetCore.Metadata.dll +0 -0
- {pysimultan-0.7.0 → pysimultan-0.7.2}/src/PySimultan2/resources/Microsoft.Extensions.DependencyInjection.Abstractions.dll +0 -0
- {pysimultan-0.7.0 → pysimultan-0.7.2}/src/PySimultan2/resources/Microsoft.Extensions.Logging.Abstractions.dll +0 -0
- {pysimultan-0.7.0 → pysimultan-0.7.2}/src/PySimultan2/resources/Microsoft.Extensions.Options.dll +0 -0
- {pysimultan-0.7.0 → pysimultan-0.7.2}/src/PySimultan2/resources/Microsoft.Extensions.Primitives.dll +0 -0
- {pysimultan-0.7.0 → pysimultan-0.7.2}/src/PySimultan2/resources/Microsoft.WindowsAPICodePack.Shell.dll +0 -0
- {pysimultan-0.7.0 → pysimultan-0.7.2}/src/PySimultan2/resources/Microsoft.WindowsAPICodePack.dll +0 -0
- {pysimultan-0.7.0 → pysimultan-0.7.2}/src/PySimultan2/resources/Microsoft.Xaml.Behaviors.dll +0 -0
- {pysimultan-0.7.0 → pysimultan-0.7.2}/src/PySimultan2/resources/Newtonsoft.Json.Bson.dll +0 -0
- {pysimultan-0.7.0 → pysimultan-0.7.2}/src/PySimultan2/resources/Newtonsoft.Json.dll +0 -0
- {pysimultan-0.7.0 → pysimultan-0.7.2}/src/PySimultan2/resources/SIMULTAN.Lang.dll +0 -0
- {pysimultan-0.7.0 → pysimultan-0.7.2}/src/PySimultan2/resources/SIMULTAN.Lang.xml +0 -0
- {pysimultan-0.7.0 → pysimultan-0.7.2}/src/PySimultan2/resources/SIMULTAN.Plugins.dll +0 -0
- {pysimultan-0.7.0 → pysimultan-0.7.2}/src/PySimultan2/resources/SIMULTAN.Plugins.xml +0 -0
- {pysimultan-0.7.0 → pysimultan-0.7.2}/src/PySimultan2/resources/SIMULTAN.dll +0 -0
- {pysimultan-0.7.0 → pysimultan-0.7.2}/src/PySimultan2/resources/SIMULTAN.xml +0 -0
- {pysimultan-0.7.0 → pysimultan-0.7.2}/src/PySimultan2/resources/SharpDX.Mathematics.dll +0 -0
- {pysimultan-0.7.0 → pysimultan-0.7.2}/src/PySimultan2/resources/Sprache.Calc.dll +0 -0
- {pysimultan-0.7.0 → pysimultan-0.7.2}/src/PySimultan2/resources/Sprache.dll +0 -0
- {pysimultan-0.7.0 → pysimultan-0.7.2}/src/PySimultan2/resources/System.Data.OleDb.dll +0 -0
- {pysimultan-0.7.0 → pysimultan-0.7.2}/src/PySimultan2/resources/System.Net.Http.Formatting.dll +0 -0
- {pysimultan-0.7.0 → pysimultan-0.7.2}/src/PySimultan2/resources/System.Reflection.MetadataLoadContext.dll +0 -0
- {pysimultan-0.7.0 → pysimultan-0.7.2}/src/PySimultan2/resources/__init__.py +0 -0
- {pysimultan-0.7.0 → pysimultan-0.7.2}/src/PySimultan2/simultan_object.py +0 -0
- {pysimultan-0.7.0 → pysimultan-0.7.2}/src/PySimultan2/taxonomy_maps.py +0 -0
- {pysimultan-0.7.0 → pysimultan-0.7.2}/src/PySimultan2/type_setter_lookup.py +0 -0
- {pysimultan-0.7.0 → pysimultan-0.7.2}/src/PySimultan2/utils.py +0 -0
- {pysimultan-0.7.0 → pysimultan-0.7.2}/tests/RoomAcoustics_V02.py +0 -0
- {pysimultan-0.7.0 → pysimultan-0.7.2}/tests/__init__.py +0 -0
- {pysimultan-0.7.0 → pysimultan-0.7.2}/tests/readme_examples/__init__.py +0 -0
- {pysimultan-0.7.0 → pysimultan-0.7.2}/tests/readme_examples/create_component.py +0 -0
- {pysimultan-0.7.0 → pysimultan-0.7.2}/tests/readme_examples/create_component_with_taxonomy_slot.py +0 -0
- {pysimultan-0.7.0 → pysimultan-0.7.2}/tests/readme_examples/create_referenced_component.py +0 -0
- {pysimultan-0.7.0 → pysimultan-0.7.2}/tests/readme_examples/create_taxonomies.py +0 -0
- {pysimultan-0.7.0 → pysimultan-0.7.2}/tests/readme_examples/resources/__init__.py +0 -0
- {pysimultan-0.7.0 → pysimultan-0.7.2}/tests/readme_examples/resources/empty_test_excel.xlsx +0 -0
- {pysimultan-0.7.0 → pysimultan-0.7.2}/tests/readme_examples/resources/template_example3.yml +0 -0
- {pysimultan-0.7.0 → pysimultan-0.7.2}/tests/readme_examples/resources/template_example4.yml +0 -0
- {pysimultan-0.7.0 → pysimultan-0.7.2}/tests/readme_examples/resources/template_example_create_typed_component.yml +0 -0
- {pysimultan-0.7.0 → pysimultan-0.7.2}/tests/readme_examples/resources/template_example_create_typed_component_with_slots.yml +0 -0
- {pysimultan-0.7.0 → pysimultan-0.7.2}/tests/readme_examples/resources/template_example_extend.yml +0 -0
- {pysimultan-0.7.0 → pysimultan-0.7.2}/tests/readme_examples/resources/template_example_update_references.yml +0 -0
- {pysimultan-0.7.0 → pysimultan-0.7.2}/tests/readme_examples/resources/template_reference_list.yml +0 -0
- {pysimultan-0.7.0 → pysimultan-0.7.2}/tests/resources/__init__.py +0 -0
- {pysimultan-0.7.0 → pysimultan-0.7.2}/tests/test_calc_static_zone_temperature.py +0 -0
- {pysimultan-0.7.0 → pysimultan-0.7.2}/tests/test_calculate_steady_state_temperature.py +0 -0
- {pysimultan-0.7.0 → pysimultan-0.7.2}/tests/test_circular_references.py +0 -0
- {pysimultan-0.7.0 → pysimultan-0.7.2}/tests/test_create_geometry.py +0 -0
- {pysimultan-0.7.0 → pysimultan-0.7.2}/tests/test_default_component.py +0 -0
- {pysimultan-0.7.0 → pysimultan-0.7.2}/tests/test_directory_and_files.py +0 -0
- {pysimultan-0.7.0 → pysimultan-0.7.2}/tests/test_files_load.py +0 -0
- {pysimultan-0.7.0 → pysimultan-0.7.2}/tests/test_load_geometry.py +0 -0
- {pysimultan-0.7.0 → pysimultan-0.7.2}/tests/test_load_multi_values.py +0 -0
- {pysimultan-0.7.0 → pysimultan-0.7.2}/tests/test_new_dll.py +0 -0
- {pysimultan-0.7.0 → pysimultan-0.7.2}/tests/test_new_project_creation.py +0 -0
- {pysimultan-0.7.0 → pysimultan-0.7.2}/tests/test_numeric_map.py +0 -0
- {pysimultan-0.7.0 → pysimultan-0.7.2}/tests/test_numpy.py +0 -0
- {pysimultan-0.7.0 → pysimultan-0.7.2}/tests/test_parameter_reference.py +0 -0
- {pysimultan-0.7.0 → pysimultan-0.7.2}/tests/test_pythonnet.py +0 -0
- {pysimultan-0.7.0 → pysimultan-0.7.2}/tests/test_register_class.py +0 -0
- {pysimultan-0.7.0 → pysimultan-0.7.2}/tests/test_register_decorator.py +0 -0
- {pysimultan-0.7.0 → pysimultan-0.7.2}/tests/test_set_attr_property.py +0 -0
- {pysimultan-0.7.0 → pysimultan-0.7.2}/tests/test_set_dictionary.py +0 -0
- {pysimultan-0.7.0 → pysimultan-0.7.2}/tests/test_set_properties.py +0 -0
- {pysimultan-0.7.0 → pysimultan-0.7.2}/tests/test_taxonomie_maps.py +0 -0
- {pysimultan-0.7.0 → pysimultan-0.7.2}/tests/test_taxonomies.py +0 -0
- {pysimultan-0.7.0 → pysimultan-0.7.2}/tests/test_ui.py +0 -0
- {pysimultan-0.7.0 → pysimultan-0.7.2}/tests/ui_minimal_example.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: PySimultan
|
3
|
-
Version: 0.7.
|
3
|
+
Version: 0.7.2
|
4
4
|
Project-URL: Documentation, https://github.com/Bühler Maximilian/PySimultan2#readme
|
5
5
|
Project-URL: Issues, https://github.com/Bühler Maximilian/PySimultan2/issues
|
6
6
|
Project-URL: Source, https://github.com/Bühler Maximilian/PySimultan2
|
@@ -14,8 +14,6 @@ Classifier: Programming Language :: Python :: 3.9
|
|
14
14
|
Classifier: Programming Language :: Python :: 3.10
|
15
15
|
Classifier: Programming Language :: Python :: 3.11
|
16
16
|
Classifier: Programming Language :: Python :: 3.12
|
17
|
-
Classifier: Programming Language :: Python :: 3.13
|
18
|
-
Classifier: Programming Language :: Python :: 3.14
|
19
17
|
Classifier: Programming Language :: Python :: Implementation :: CPython
|
20
18
|
Classifier: Programming Language :: Python :: Implementation :: PyPy
|
21
19
|
Requires-Python: >=3.8
|
@@ -168,6 +166,9 @@ print(instances[0].param_1)
|
|
168
166
|
|
169
167
|
|
170
168
|
# Change Log
|
169
|
+
## [0.6.4] - 2025-06-06
|
170
|
+
Updated SIMULTAN version to 0.7.18
|
171
|
+
|
171
172
|
## [0.5.9.7] - 2025-01-09
|
172
173
|
- Added default component support to Mapper: if a default component is not present in the datamodel, it is automatically added
|
173
174
|
- Fixed content naming bug: Content.name is now used for the name of the TaxonomyEntry in SIMULTAN
|
@@ -137,6 +137,9 @@ print(instances[0].param_1)
|
|
137
137
|
|
138
138
|
|
139
139
|
# Change Log
|
140
|
+
## [0.6.4] - 2025-06-06
|
141
|
+
Updated SIMULTAN version to 0.7.18
|
142
|
+
|
140
143
|
## [0.5.9.7] - 2025-01-09
|
141
144
|
- Added default component support to Mapper: if a default component is not present in the datamodel, it is automatically added
|
142
145
|
- Fixed content naming bug: Content.name is now used for the name of the TaxonomyEntry in SIMULTAN
|
@@ -21,8 +21,6 @@ classifiers = [
|
|
21
21
|
"Programming Language :: Python :: 3.10",
|
22
22
|
"Programming Language :: Python :: 3.11",
|
23
23
|
"Programming Language :: Python :: 3.12",
|
24
|
-
"Programming Language :: Python :: 3.13",
|
25
|
-
"Programming Language :: Python :: 3.14",
|
26
24
|
"Programming Language :: Python :: Implementation :: CPython",
|
27
25
|
"Programming Language :: Python :: Implementation :: PyPy",
|
28
26
|
]
|
@@ -0,0 +1 @@
|
|
1
|
+
version = '0.7.2'
|
@@ -284,7 +284,7 @@ class DataModel:
|
|
284
284
|
self.data = self.project_data_manager.Components
|
285
285
|
|
286
286
|
self.create_component_dict.cache_clear()
|
287
|
-
self.
|
287
|
+
self.get_component_by_id_cached.cache_clear()
|
288
288
|
|
289
289
|
return self.data
|
290
290
|
|
@@ -357,7 +357,7 @@ class DataModel:
|
|
357
357
|
self.data.RemoveItem(index)
|
358
358
|
|
359
359
|
self.create_component_dict.cache_clear()
|
360
|
-
self.
|
360
|
+
self.get_component_by_id_cached.cache_clear()
|
361
361
|
|
362
362
|
def remove_component(self,
|
363
363
|
component: Union[SimComponent, SimultanObject] = None,
|
@@ -380,7 +380,7 @@ class DataModel:
|
|
380
380
|
self.data.RemoveItem(index)
|
381
381
|
|
382
382
|
self.create_component_dict.cache_clear()
|
383
|
-
self.
|
383
|
+
self.get_component_by_id_cached.cache_clear()
|
384
384
|
|
385
385
|
def save(self):
|
386
386
|
"""
|
@@ -464,7 +464,7 @@ class DataModel:
|
|
464
464
|
self.data.RemoveItem(index)
|
465
465
|
|
466
466
|
self.create_component_dict.cache_clear()
|
467
|
-
self.
|
467
|
+
self.get_component_by_id_cached.cache_clear()
|
468
468
|
|
469
469
|
def add_new_geometry_model(self, file_name: str, model_name: str = None, return_resource=False):
|
470
470
|
"""
|
@@ -474,7 +474,7 @@ class DataModel:
|
|
474
474
|
:param return_resource: return the resource
|
475
475
|
:return: GeometryViewer.Model.GeometryModel, geo_resource
|
476
476
|
"""
|
477
|
-
self.
|
477
|
+
self.get_file_infos_cached.cache_clear()
|
478
478
|
geo_resource = self.add_geometry_resource(file_name)
|
479
479
|
file_info = SystemFileInfo(geo_resource.CurrentFullPath)
|
480
480
|
try:
|
@@ -505,7 +505,7 @@ class DataModel:
|
|
505
505
|
model_name,
|
506
506
|
self.service_provider)
|
507
507
|
|
508
|
-
self.
|
508
|
+
self.get_file_infos_cached.cache_clear()
|
509
509
|
return new_resource
|
510
510
|
|
511
511
|
def add_empty_resource(self,
|
@@ -519,7 +519,7 @@ class DataModel:
|
|
519
519
|
"""
|
520
520
|
# return self.project.AddResourceFile(FileInfo(str(filename)))
|
521
521
|
|
522
|
-
self.
|
522
|
+
self.get_file_infos_cached.cache_clear()
|
523
523
|
if target_dir is None:
|
524
524
|
return self.project.AddEmptyResource(SystemFileInfo(str(filename)))
|
525
525
|
else:
|
@@ -601,7 +601,11 @@ class DataModel:
|
|
601
601
|
|
602
602
|
existing_files = [x.current_full_path for x in self.project_data_manager.AssetManager.Resources]
|
603
603
|
try:
|
604
|
-
|
604
|
+
if isinstance(filename, (PosixPath, WindowsPath)):
|
605
|
+
# convert to SystemFileInfo
|
606
|
+
act_filename = str(filename)
|
607
|
+
else:
|
608
|
+
act_filename = filename.replace('\\', os.sep)
|
605
609
|
except TypeError:
|
606
610
|
act_filename = filename
|
607
611
|
|
@@ -697,7 +701,7 @@ class DataModel:
|
|
697
701
|
logger.info(f'Deleted resource {resource.Name} from project {self.project_path}')
|
698
702
|
else:
|
699
703
|
logger.error(f'Could not delete resource {resource.Name} from project {self.project_path}')
|
700
|
-
self.
|
704
|
+
self.get_file_infos_cached.cache_clear()
|
701
705
|
return success
|
702
706
|
|
703
707
|
def get_existing_resource_directory_entry(self,
|
@@ -970,7 +974,6 @@ class DataModel:
|
|
970
974
|
self.component_dict = {x.Id: x for x in component_list}
|
971
975
|
return self.component_dict
|
972
976
|
|
973
|
-
@lru_cache()
|
974
977
|
def get_component_by_id(self,
|
975
978
|
item_id: SimId,
|
976
979
|
search_subcomponents=False) -> Union[SimComponent, None]:
|
@@ -978,11 +981,29 @@ class DataModel:
|
|
978
981
|
# print(item_id.GlobalId, item_id.LocalId)
|
979
982
|
# _ = [print((x.Id.GlobalId, x.Id.LocalId)) for x in self.data.Items]
|
980
983
|
|
984
|
+
component = self.get_component_by_id_cached(item_id=item_id,
|
985
|
+
search_subcomponents=search_subcomponents)
|
986
|
+
if component is None:
|
987
|
+
self.get_component_by_id_cached.cache_clear()
|
988
|
+
component = self.get_component_by_id_cached(item_id=item_id,
|
989
|
+
search_subcomponents=search_subcomponents)
|
990
|
+
|
991
|
+
return component
|
992
|
+
|
993
|
+
@lru_cache()
|
994
|
+
def get_component_by_id_cached(self,
|
995
|
+
item_id: SimId,
|
996
|
+
search_subcomponents=False) -> Union[SimComponent, None]:
|
997
|
+
|
998
|
+
# print(item_id.GlobalId, item_id.LocalId)
|
999
|
+
# _ = [print((x.Id.GlobalId, x.Id.LocalId)) for x in self.data.Items]
|
1000
|
+
|
981
1001
|
component = next((x for x in self.data.Items if x.Id.Equals(item_id)), None)
|
982
1002
|
|
983
1003
|
if component is None and search_subcomponents:
|
984
1004
|
component = self.component_dict.get(item_id, None)
|
985
1005
|
if component is None:
|
1006
|
+
self.create_component_dict.cache_clear()
|
986
1007
|
self.create_component_dict()
|
987
1008
|
component = self.component_dict.get(item_id, None)
|
988
1009
|
|
@@ -991,8 +1012,23 @@ class DataModel:
|
|
991
1012
|
def get_component_by_name(self, name: str) -> list[SimComponent]:
|
992
1013
|
return [x for x in self.create_component_dict.values() if x.Name == name]
|
993
1014
|
|
994
|
-
@lru_cache()
|
995
1015
|
def get_file_infos(self) -> list[PythonFileInfo]:
|
1016
|
+
"""
|
1017
|
+
Get all file infos from the project
|
1018
|
+
:return: list of PythonFileInfo objects
|
1019
|
+
"""
|
1020
|
+
file_infos = self.get_file_infos_cached()
|
1021
|
+
if file_infos.__len__() != self.assets.__len__():
|
1022
|
+
logger.warning(f'No file infos found in project {self.project_path}. '
|
1023
|
+
f'Please check if the project is loaded correctly.')
|
1024
|
+
# try to reload the file infos
|
1025
|
+
self.get_file_infos_cached.cache_clear()
|
1026
|
+
file_infos = self.get_file_infos_cached()
|
1027
|
+
|
1028
|
+
return self.get_file_infos_cached()
|
1029
|
+
|
1030
|
+
@lru_cache()
|
1031
|
+
def get_file_infos_cached(self) -> list[PythonFileInfo]:
|
996
1032
|
file_infos = []
|
997
1033
|
for asset in self.assets:
|
998
1034
|
if isinstance(asset, ResourceFileEntry):
|
@@ -104,9 +104,9 @@ class PythonMapper(object):
|
|
104
104
|
def register(self,
|
105
105
|
taxonomy: str,
|
106
106
|
cls: Type[Any],
|
107
|
-
|
108
|
-
|
109
|
-
|
107
|
+
taxonomy_map: TaxonomyMap,
|
108
|
+
re_register: bool = True,
|
109
|
+
update_in_other_mappers: bool = False):
|
110
110
|
|
111
111
|
# print(f'Registering {taxonomy} with {cls} {hash(cls)}')
|
112
112
|
|
@@ -0,0 +1 @@
|
|
1
|
+
This is the content of the file.
|
@@ -0,0 +1 @@
|
|
1
|
+
This is the content of the file 2.
|
@@ -118,6 +118,7 @@ def test_add_resource_file():
|
|
118
118
|
f.write('This is the content of the already existing file 2.')
|
119
119
|
|
120
120
|
file = data_model.add_resource_file(file_path)
|
121
|
+
file = data_model.add_resource(file_path)
|
121
122
|
print(file)
|
122
123
|
|
123
124
|
file_path = os.path.join(str(data_model.project.ProjectUnpackFolder), 'already_exising_3.txt')
|
@@ -133,8 +134,6 @@ def test_add_resource_file():
|
|
133
134
|
file_value_2=file_info)
|
134
135
|
|
135
136
|
|
136
|
-
|
137
|
-
|
138
137
|
if __name__ == '__main__':
|
139
138
|
new_resource = test_create_resource()
|
140
139
|
test_create_resource_from_string()
|
@@ -1 +0,0 @@
|
|
1
|
-
version = '0.7.0'
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|