PySimultan 0.5.6__py3-none-any.whl → 0.5.7__py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- PySimultan2/__about__.py +1 -1
- PySimultan2/taxonomy_maps.py +13 -1
- PySimultan2/type_setter_lookup.py +4 -1
- PySimultan2/utils.py +2 -2
- {pysimultan-0.5.6.dist-info → pysimultan-0.5.7.dist-info}/METADATA +1 -1
- {pysimultan-0.5.6.dist-info → pysimultan-0.5.7.dist-info}/RECORD +8 -8
- {pysimultan-0.5.6.dist-info → pysimultan-0.5.7.dist-info}/WHEEL +0 -0
- {pysimultan-0.5.6.dist-info → pysimultan-0.5.7.dist-info}/licenses/LICENSE.txt +0 -0
PySimultan2/__about__.py
CHANGED
@@ -1 +1 @@
|
|
1
|
-
version = '0.5.
|
1
|
+
version = '0.5.7'
|
PySimultan2/taxonomy_maps.py
CHANGED
@@ -46,6 +46,8 @@ class Content(object):
|
|
46
46
|
self._taxonomy_entries = {}
|
47
47
|
self._taxonomy_map = kwargs.get('taxonomy_map', None)
|
48
48
|
|
49
|
+
self.taxonomy_key = kwargs.get('taxonomy_key')
|
50
|
+
|
49
51
|
add_kwargs = kwargs.copy()
|
50
52
|
_ = [add_kwargs.pop(key, None) for key in ['taxonomy_name', 'taxonomy_key', 'taxonomy_entry_name',
|
51
53
|
'taxonomy_entry_key', 'content', 'documentation', 'python_mapper',
|
@@ -54,10 +56,20 @@ class Content(object):
|
|
54
56
|
|
55
57
|
self.additional_attributes = add_kwargs
|
56
58
|
|
59
|
+
self.taxonomy_key = kwargs.get('taxonomy_key')
|
60
|
+
self.taxonomy_name = kwargs.get('taxonomy_name')
|
61
|
+
|
62
|
+
|
57
63
|
def get_taxonomie_entry(self, data_model: 'DataModel'):
|
58
64
|
if self._taxonomy_entries.get(data_model, None) is None:
|
59
65
|
|
60
|
-
|
66
|
+
if self.taxonomy_key is None:
|
67
|
+
taxonomy = self._taxonomy_map.get_or_create_simultan_taxonomy(data_model=data_model, create=True)
|
68
|
+
else:
|
69
|
+
taxonomy = data_model.get_or_create_taxonomy(taxonomy_name=self.taxonomy_name,
|
70
|
+
taxonomy_key=self.taxonomy_key,
|
71
|
+
create=True)
|
72
|
+
|
61
73
|
self._taxonomy_entries[data_model] = data_model.get_or_create_taxonomy_entry(name=self.text_or_key,
|
62
74
|
key=self.text_or_key,
|
63
75
|
description=self.documentation,
|
@@ -20,7 +20,6 @@ from SIMULTAN.Data.Components import (ComponentWalker, SimComponent, SimBoolPara
|
|
20
20
|
|
21
21
|
|
22
22
|
class TypeSetterFcnLookupDict(object):
|
23
|
-
|
24
23
|
lookup_dict = {None: lambda x: None,
|
25
24
|
SimComponent: set_property_to_sim_component,
|
26
25
|
SimultanObject: set_property_to_sim_component,
|
@@ -32,7 +31,11 @@ class TypeSetterFcnLookupDict(object):
|
|
32
31
|
SimMultiValueField3D: set_property_to_value_field,
|
33
32
|
SimMultiValueBigTable: set_property_to_value_field,
|
34
33
|
int: set_property_to_parameter,
|
34
|
+
np.int32: set_property_to_parameter,
|
35
|
+
np.int64: set_property_to_parameter,
|
35
36
|
float: set_property_to_parameter,
|
37
|
+
np.float32: set_property_to_parameter,
|
38
|
+
np.float64: set_property_to_parameter,
|
36
39
|
str: set_property_to_parameter,
|
37
40
|
bool: set_property_to_parameter,
|
38
41
|
FileInfo: set_property_to_file_info,
|
PySimultan2/utils.py
CHANGED
@@ -360,9 +360,9 @@ def create_parameter(value: Union[int, float, str, SimTaxonomyEntry] = 0,
|
|
360
360
|
taxonomy_entry = get_default_slot(SimTaxonomyEntry)
|
361
361
|
|
362
362
|
if parameter_type is None:
|
363
|
-
if type(value)
|
363
|
+
if type(value) in (float, np.float64, np.float32):
|
364
364
|
parameter_type = float
|
365
|
-
elif type(value)
|
365
|
+
elif type(value) in (int, np.int64, np.int32):
|
366
366
|
parameter_type = int
|
367
367
|
elif type(value) is str:
|
368
368
|
parameter_type = str
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.3
|
2
2
|
Name: PySimultan
|
3
|
-
Version: 0.5.
|
3
|
+
Version: 0.5.7
|
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
|
@@ -1,5 +1,5 @@
|
|
1
1
|
PySimultan2/CHANGELOG.md,sha256=LeVHBC6dGDwDwgXipNrwgvgews9QkyjsqtYa_jiLMm0,217
|
2
|
-
PySimultan2/__about__.py,sha256=
|
2
|
+
PySimultan2/__about__.py,sha256=NWLby5oM381mpRW-BF0cOAskZDpkNYAHG1kf2Mr6xZE,19
|
3
3
|
PySimultan2/__init__.py,sha256=PGVR1uhY01dF5tHyad-znURUZ_LVB95vsjId2BT0aJM,3245
|
4
4
|
PySimultan2/data_model.py,sha256=YYtfcR6jvGztng6Be8Vw9FQ02cPkl8ATHTZMoIu1ABQ,34140
|
5
5
|
PySimultan2/default_types.py,sha256=K-Eka5BCKk8DT3HU5761Ym_-ZFmu1_Dro0zW0LVGoHA,27157
|
@@ -7,9 +7,9 @@ PySimultan2/files.py,sha256=BCETl4M8qedw7Bjt8QXvY6Rl3U6Lou36XqPY2ST1o9Q,22447
|
|
7
7
|
PySimultan2/multi_values.py,sha256=ZFXlTLuZo32x7_7diYAp2XEjp5uwgHLgNOzN7v74-5I,13650
|
8
8
|
PySimultan2/object_mapper.py,sha256=_SQye38NmIr4m_-X9CuvUJnVDBmjmUDdPH2bnaxpzKY,18546
|
9
9
|
PySimultan2/simultan_object.py,sha256=akaSUZZWIVfwx1wT5EdOgRR2UeShUthX-LE2Uk6w8CQ,19058
|
10
|
-
PySimultan2/taxonomy_maps.py,sha256=
|
11
|
-
PySimultan2/type_setter_lookup.py,sha256=
|
12
|
-
PySimultan2/utils.py,sha256=
|
10
|
+
PySimultan2/taxonomy_maps.py,sha256=K8lwiBkEnQkx40YZxqSJAHdqwuo6ssvkXLL_GBxVYO0,9271
|
11
|
+
PySimultan2/type_setter_lookup.py,sha256=PGa5_EtV7SM15w3uxy0fA3LiQ0TaS4Ys0LYR5zs8aNk,3748
|
12
|
+
PySimultan2/utils.py,sha256=1e2sYW1ioV0L9NREbBr03Y2tK1Hx9HxQv1pdXnIPIGY,66740
|
13
13
|
PySimultan2/geometry/__init__.py,sha256=nJolTD1i5J8qUkOQa-r3D20aq3Co3sN31Xc0n4wJpJo,248
|
14
14
|
PySimultan2/geometry/geometry_base.py,sha256=nbb9U2W3vFviVLxISLHRi2CVyLEM-3zIKvoZ1uSYs_8,23420
|
15
15
|
PySimultan2/geometry/utils.py,sha256=J25YsK8sso_UL7xRusItQZvyjtvxdOsSPelBQYFABhY,8519
|
@@ -75,7 +75,7 @@ PySimultan2/resources/assimp.dll,sha256=HwfDwXqoPDTFRyoQpA3qmgZoUdFtziJkV5fNtktE
|
|
75
75
|
PySimultan2/resources/componentmanager.user,sha256=hrzr1US4pqkFnLHXcvPkvrgGd7QvlxaV8mhS6fuikEs,760
|
76
76
|
PySimultan2/resources/defaultsettings.xml,sha256=s6Tk1tubLz5UYqXZWpD42EDHzedemRY1nEneoIVcUfg,392
|
77
77
|
PySimultan2/resources/setup.bat,sha256=fjvvYfVM6TalS-QTSiKAbAId5nTsk8kGGo06ba-wWaY,32
|
78
|
-
pysimultan-0.5.
|
79
|
-
pysimultan-0.5.
|
80
|
-
pysimultan-0.5.
|
81
|
-
pysimultan-0.5.
|
78
|
+
pysimultan-0.5.7.dist-info/METADATA,sha256=6I6o-yu_L5IPQxveKqC9hpki0YXFmWdOfiH82iZhIsM,5815
|
79
|
+
pysimultan-0.5.7.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
|
80
|
+
pysimultan-0.5.7.dist-info/licenses/LICENSE.txt,sha256=pmSr98k6N005KMojnZxzLGRuRlDjDx3PUrK1lFj53HA,1126
|
81
|
+
pysimultan-0.5.7.dist-info/RECORD,,
|
File without changes
|
File without changes
|