math-spec-mapping 0.3.4__py3-none-any.whl → 0.3.5__py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- math_spec_mapping/Classes/MathSpec.py +31 -3
- math_spec_mapping/Reports/html.py +8 -2
- {math_spec_mapping-0.3.4.dist-info → math_spec_mapping-0.3.5.dist-info}/METADATA +1 -1
- {math_spec_mapping-0.3.4.dist-info → math_spec_mapping-0.3.5.dist-info}/RECORD +7 -7
- {math_spec_mapping-0.3.4.dist-info → math_spec_mapping-0.3.5.dist-info}/LICENSE +0 -0
- {math_spec_mapping-0.3.4.dist-info → math_spec_mapping-0.3.5.dist-info}/WHEEL +0 -0
- {math_spec_mapping-0.3.4.dist-info → math_spec_mapping-0.3.5.dist-info}/top_level.txt +0 -0
@@ -371,7 +371,7 @@ class MathSpec:
|
|
371
371
|
)
|
372
372
|
opts.extend(
|
373
373
|
[
|
374
|
-
(x, x.
|
374
|
+
(x, x.control_action_options)
|
375
375
|
for x in self.control_actions.values()
|
376
376
|
if len(x.control_action_options) > 1
|
377
377
|
]
|
@@ -729,7 +729,7 @@ class MathSpecImplementation:
|
|
729
729
|
assert (
|
730
730
|
"FP {}".format(ba.name) in self.params
|
731
731
|
), "No functional parameterization for {}. To fix this error, add {} to the parameters passed to ms.build_implementation. Option can be: {}".format(
|
732
|
-
ba.name, ba.name, [x.name for x in opts]
|
732
|
+
ba.name, "FP " + ba.name, [x.name for x in opts]
|
733
733
|
)
|
734
734
|
|
735
735
|
opt = self.ms.functional_parameters["FP {}".format(ba.name)][
|
@@ -806,7 +806,7 @@ class MathSpecImplementation:
|
|
806
806
|
assert (
|
807
807
|
"FP {}".format(p.name) in self.params
|
808
808
|
), "No functional parameterization for {}. To fix this error, add {} to the parameters passed to ms.build_implementation. Option can be: {}".format(
|
809
|
-
p.name, p.name, [x.name for x in opts]
|
809
|
+
p.name, "FP " + p.name, [x.name for x in opts]
|
810
810
|
)
|
811
811
|
opt = self.ms.functional_parameters["FP {}".format(p.name)][
|
812
812
|
self.params["FP {}".format(p.name)]
|
@@ -857,3 +857,31 @@ class MathSpecImplementation:
|
|
857
857
|
if len(wiring) > 0:
|
858
858
|
wiring = [x.name for x in wiring]
|
859
859
|
print("The following wirings were not loading: {}".format(wiring))
|
860
|
+
|
861
|
+
def validate_state_and_params(self, state, parameters):
|
862
|
+
|
863
|
+
k1 = state.keys()
|
864
|
+
k2 = [x.name for x in self.ms.state["Global State"].variables]
|
865
|
+
|
866
|
+
not_in_state = [x for x in k2 if x not in k1]
|
867
|
+
shouldnt_be_in_state = [x for x in k1 if x not in k2]
|
868
|
+
assert (
|
869
|
+
len(not_in_state) == 0
|
870
|
+
), "The following state variables are missing: {}".format(not_in_state)
|
871
|
+
assert (
|
872
|
+
len(shouldnt_be_in_state) == 0
|
873
|
+
), "The following state variables are extra: {}".format(shouldnt_be_in_state)
|
874
|
+
|
875
|
+
k1 = parameters.keys()
|
876
|
+
k2 = self.ms.parameters.all_parameters + list(
|
877
|
+
self.ms.functional_parameters.keys()
|
878
|
+
)
|
879
|
+
|
880
|
+
not_in_params = [x for x in k2 if x not in k1]
|
881
|
+
shouldnt_be_in_params = [x for x in k1 if x not in k2]
|
882
|
+
assert (
|
883
|
+
len(not_in_params) == 0
|
884
|
+
), "The following parameters are missing: {}".format(not_in_params)
|
885
|
+
assert (
|
886
|
+
len(shouldnt_be_in_params) == 0
|
887
|
+
), "The following parameters are extra: {}".format(shouldnt_be_in_params)
|
@@ -164,7 +164,10 @@ cssclasses:
|
|
164
164
|
else:
|
165
165
|
out += symbol2 + name + "\n"
|
166
166
|
for var in ms.stateful_metrics[name].metrics:
|
167
|
-
|
167
|
+
if linking:
|
168
|
+
out += symbol3 + "[[{}]]".format(var.name) + "\n"
|
169
|
+
else:
|
170
|
+
out += symbol3 + "{}".format(var.name) + "\n"
|
168
171
|
|
169
172
|
out += symbol1 + "**Types**\n"
|
170
173
|
for name in ms.types.keys():
|
@@ -186,7 +189,10 @@ cssclasses:
|
|
186
189
|
else:
|
187
190
|
out += symbol2 + name + "\n"
|
188
191
|
for param in [x.name for x in ms.parameters.data[name].parameters]:
|
189
|
-
|
192
|
+
if linking:
|
193
|
+
out += symbol3 + "[[{}]]".format(param) + "\n"
|
194
|
+
else:
|
195
|
+
out += symbol3 + "{}".format(param) + "\n"
|
190
196
|
|
191
197
|
out += symbol1 + "**Boundary Actions**\n"
|
192
198
|
for name in ms.boundary_actions.keys():
|
@@ -6,7 +6,7 @@ math_spec_mapping/Classes/Block.py,sha256=OsWM1ZAi6ZvavDhMFJi_H7w8ZF9LqJIKR3ZLTX
|
|
6
6
|
math_spec_mapping/Classes/BoundaryAction.py,sha256=KuZqtvZwSHWDP7gFQXGnG-r3EuYJU_oU9wMCuqvRkzk,593
|
7
7
|
math_spec_mapping/Classes/ControlAction.py,sha256=ysqpgANwdizVdwqtgZmnxXMpCqrzmVEF_6YT0M3l4Ho,526
|
8
8
|
math_spec_mapping/Classes/Entity.py,sha256=fA0-b128_OHHxfCg4pzqyQV083EYev1HlVpy86S5igg,1226
|
9
|
-
math_spec_mapping/Classes/MathSpec.py,sha256=
|
9
|
+
math_spec_mapping/Classes/MathSpec.py,sha256=f0S-52Gh-LjZtOldXZTXPTTwqCWAz-ULsckzmNGxcSg,33257
|
10
10
|
math_spec_mapping/Classes/Mechanism.py,sha256=2sLm3wYBIeTQaMBcsJ9btqIWsbS895Ra8NY6Y9_G_Dg,379
|
11
11
|
math_spec_mapping/Classes/Metric.py,sha256=AhPgYppOP6q49xvR8S9STxQsXUKJlTWx7wI1LfZEtww,581
|
12
12
|
math_spec_mapping/Classes/Parameter.py,sha256=ZuJ_w0sChvRElJ4sOnXZ2EV4Ell2xXFulKLjVOpgz2E,1237
|
@@ -43,7 +43,7 @@ math_spec_mapping/Reports/__init__.py,sha256=W27I6S9Ro1hWeHmnxIokCA06awB__eYey7P
|
|
43
43
|
math_spec_mapping/Reports/boundary_actions.py,sha256=45BPp4QjWdD-3E9ZWwqgj_nI2-YdcI2ZZ19_Qv_K7Qk,1410
|
44
44
|
math_spec_mapping/Reports/control_actions.py,sha256=NksekZKIPFSIkubttFstKFthc5AU9B9PWRLSl9j1wWs,1216
|
45
45
|
math_spec_mapping/Reports/general.py,sha256=WOOn6Wlb8M4fsdN49FlKLwOka6vJPQ9aCUy88TL2ki0,1610
|
46
|
-
math_spec_mapping/Reports/html.py,sha256=
|
46
|
+
math_spec_mapping/Reports/html.py,sha256=uUXxMgGoL2yQelSg7CmJjIsU84SbZarqPg2d9x7Z13k,9220
|
47
47
|
math_spec_mapping/Reports/markdown.py,sha256=t6C2D6pk3Y9K9vOR0IC6rLe18tBm3JFgJ3rC9tnvt_Q,22871
|
48
48
|
math_spec_mapping/Reports/mechanisms.py,sha256=d2Rxt3JBYvqAOAYUynl0buYVoXEHrO8EGq7GK6hK8NA,1322
|
49
49
|
math_spec_mapping/Reports/node_map.py,sha256=FdSMDQG16NX6n9sZcH-T5xwsvgjrV9OqBHc9J_VlNK0,3129
|
@@ -53,8 +53,8 @@ math_spec_mapping/Reports/spaces.py,sha256=-76hR5wQBv4lsG000ypBJ-OprjsNjI-rNRMYd
|
|
53
53
|
math_spec_mapping/Reports/state.py,sha256=RkqfSonar74KVC8PpA9GgI2xaHX6BrkNdAuWMZlYQfI,2321
|
54
54
|
math_spec_mapping/Reports/tables.py,sha256=O0CNuqh3LMECq5uLjBOoxMUk5hUvkUK660FNnwWUxDY,1505
|
55
55
|
math_spec_mapping/Reports/wiring.py,sha256=u9SvKWy6T-WJUEgFI6-zgZanoOaTTs_2YwmEceDLsV8,1618
|
56
|
-
math_spec_mapping-0.3.
|
57
|
-
math_spec_mapping-0.3.
|
58
|
-
math_spec_mapping-0.3.
|
59
|
-
math_spec_mapping-0.3.
|
60
|
-
math_spec_mapping-0.3.
|
56
|
+
math_spec_mapping-0.3.5.dist-info/LICENSE,sha256=ObyEzSw8kgCaFbEfpu1zP4TrcAKLA0xhqHMZZfyh7N0,1069
|
57
|
+
math_spec_mapping-0.3.5.dist-info/METADATA,sha256=5V-r7KxzjQ0TpSTcMx9o0kmdi6L9xwqtZ2VQGDE081w,6012
|
58
|
+
math_spec_mapping-0.3.5.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
59
|
+
math_spec_mapping-0.3.5.dist-info/top_level.txt,sha256=AImhn9wgazkdV0a9vfiphtQR8uGe2nq-ZIOp-6yUk9o,18
|
60
|
+
math_spec_mapping-0.3.5.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|