math-spec-mapping 0.3.4__tar.gz → 0.3.5__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {math_spec_mapping-0.3.4/src/math_spec_mapping.egg-info → math_spec_mapping-0.3.5}/PKG-INFO +1 -1
- {math_spec_mapping-0.3.4 → math_spec_mapping-0.3.5}/pyproject.toml +1 -1
- {math_spec_mapping-0.3.4 → math_spec_mapping-0.3.5}/src/math_spec_mapping/Classes/MathSpec.py +31 -3
- {math_spec_mapping-0.3.4 → math_spec_mapping-0.3.5}/src/math_spec_mapping/Reports/html.py +8 -2
- {math_spec_mapping-0.3.4 → math_spec_mapping-0.3.5/src/math_spec_mapping.egg-info}/PKG-INFO +1 -1
- {math_spec_mapping-0.3.4 → math_spec_mapping-0.3.5}/LICENSE +0 -0
- {math_spec_mapping-0.3.4 → math_spec_mapping-0.3.5}/README.md +0 -0
- {math_spec_mapping-0.3.4 → math_spec_mapping-0.3.5}/setup.cfg +0 -0
- {math_spec_mapping-0.3.4 → math_spec_mapping-0.3.5}/src/math_spec_mapping/Classes/ActionTransmissionChannel.py +0 -0
- {math_spec_mapping-0.3.4 → math_spec_mapping-0.3.5}/src/math_spec_mapping/Classes/Block.py +0 -0
- {math_spec_mapping-0.3.4 → math_spec_mapping-0.3.5}/src/math_spec_mapping/Classes/BoundaryAction.py +0 -0
- {math_spec_mapping-0.3.4 → math_spec_mapping-0.3.5}/src/math_spec_mapping/Classes/ControlAction.py +0 -0
- {math_spec_mapping-0.3.4 → math_spec_mapping-0.3.5}/src/math_spec_mapping/Classes/Entity.py +0 -0
- {math_spec_mapping-0.3.4 → math_spec_mapping-0.3.5}/src/math_spec_mapping/Classes/Mechanism.py +0 -0
- {math_spec_mapping-0.3.4 → math_spec_mapping-0.3.5}/src/math_spec_mapping/Classes/Metric.py +0 -0
- {math_spec_mapping-0.3.4 → math_spec_mapping-0.3.5}/src/math_spec_mapping/Classes/Parameter.py +0 -0
- {math_spec_mapping-0.3.4 → math_spec_mapping-0.3.5}/src/math_spec_mapping/Classes/Policy.py +0 -0
- {math_spec_mapping-0.3.4 → math_spec_mapping-0.3.5}/src/math_spec_mapping/Classes/Space.py +0 -0
- {math_spec_mapping-0.3.4 → math_spec_mapping-0.3.5}/src/math_spec_mapping/Classes/State.py +0 -0
- {math_spec_mapping-0.3.4 → math_spec_mapping-0.3.5}/src/math_spec_mapping/Classes/StateUpdateTransmissionChannel.py +0 -0
- {math_spec_mapping-0.3.4 → math_spec_mapping-0.3.5}/src/math_spec_mapping/Classes/StatefulMetric.py +0 -0
- {math_spec_mapping-0.3.4 → math_spec_mapping-0.3.5}/src/math_spec_mapping/Classes/Type.py +0 -0
- {math_spec_mapping-0.3.4 → math_spec_mapping-0.3.5}/src/math_spec_mapping/Classes/__init__.py +0 -0
- {math_spec_mapping-0.3.4 → math_spec_mapping-0.3.5}/src/math_spec_mapping/Convenience/__init__.py +0 -0
- {math_spec_mapping-0.3.4 → math_spec_mapping-0.3.5}/src/math_spec_mapping/Convenience/documentation.py +0 -0
- {math_spec_mapping-0.3.4 → math_spec_mapping-0.3.5}/src/math_spec_mapping/Convenience/starter.py +0 -0
- {math_spec_mapping-0.3.4 → math_spec_mapping-0.3.5}/src/math_spec_mapping/Load/__init__.py +0 -0
- {math_spec_mapping-0.3.4 → math_spec_mapping-0.3.5}/src/math_spec_mapping/Load/action_transmission_channel.py +0 -0
- {math_spec_mapping-0.3.4 → math_spec_mapping-0.3.5}/src/math_spec_mapping/Load/boundary_actions.py +0 -0
- {math_spec_mapping-0.3.4 → math_spec_mapping-0.3.5}/src/math_spec_mapping/Load/control_actions.py +0 -0
- {math_spec_mapping-0.3.4 → math_spec_mapping-0.3.5}/src/math_spec_mapping/Load/displays.py +0 -0
- {math_spec_mapping-0.3.4 → math_spec_mapping-0.3.5}/src/math_spec_mapping/Load/entities.py +0 -0
- {math_spec_mapping-0.3.4 → math_spec_mapping-0.3.5}/src/math_spec_mapping/Load/general.py +0 -0
- {math_spec_mapping-0.3.4 → math_spec_mapping-0.3.5}/src/math_spec_mapping/Load/implementations.py +0 -0
- {math_spec_mapping-0.3.4 → math_spec_mapping-0.3.5}/src/math_spec_mapping/Load/load.py +0 -0
- {math_spec_mapping-0.3.4 → math_spec_mapping-0.3.5}/src/math_spec_mapping/Load/mechanism.py +0 -0
- {math_spec_mapping-0.3.4 → math_spec_mapping-0.3.5}/src/math_spec_mapping/Load/metrics.py +0 -0
- {math_spec_mapping-0.3.4 → math_spec_mapping-0.3.5}/src/math_spec_mapping/Load/parameters.py +0 -0
- {math_spec_mapping-0.3.4 → math_spec_mapping-0.3.5}/src/math_spec_mapping/Load/policy.py +0 -0
- {math_spec_mapping-0.3.4 → math_spec_mapping-0.3.5}/src/math_spec_mapping/Load/spaces.py +0 -0
- {math_spec_mapping-0.3.4 → math_spec_mapping-0.3.5}/src/math_spec_mapping/Load/state_update_transmission_channels.py +0 -0
- {math_spec_mapping-0.3.4 → math_spec_mapping-0.3.5}/src/math_spec_mapping/Load/stateful_metrics.py +0 -0
- {math_spec_mapping-0.3.4 → math_spec_mapping-0.3.5}/src/math_spec_mapping/Load/states.py +0 -0
- {math_spec_mapping-0.3.4 → math_spec_mapping-0.3.5}/src/math_spec_mapping/Load/type.py +0 -0
- {math_spec_mapping-0.3.4 → math_spec_mapping-0.3.5}/src/math_spec_mapping/Load/wiring.py +0 -0
- {math_spec_mapping-0.3.4 → math_spec_mapping-0.3.5}/src/math_spec_mapping/Reports/__init__.py +0 -0
- {math_spec_mapping-0.3.4 → math_spec_mapping-0.3.5}/src/math_spec_mapping/Reports/boundary_actions.py +0 -0
- {math_spec_mapping-0.3.4 → math_spec_mapping-0.3.5}/src/math_spec_mapping/Reports/control_actions.py +0 -0
- {math_spec_mapping-0.3.4 → math_spec_mapping-0.3.5}/src/math_spec_mapping/Reports/general.py +0 -0
- {math_spec_mapping-0.3.4 → math_spec_mapping-0.3.5}/src/math_spec_mapping/Reports/markdown.py +0 -0
- {math_spec_mapping-0.3.4 → math_spec_mapping-0.3.5}/src/math_spec_mapping/Reports/mechanisms.py +0 -0
- {math_spec_mapping-0.3.4 → math_spec_mapping-0.3.5}/src/math_spec_mapping/Reports/node_map.py +0 -0
- {math_spec_mapping-0.3.4 → math_spec_mapping-0.3.5}/src/math_spec_mapping/Reports/parameters.py +0 -0
- {math_spec_mapping-0.3.4 → math_spec_mapping-0.3.5}/src/math_spec_mapping/Reports/policies.py +0 -0
- {math_spec_mapping-0.3.4 → math_spec_mapping-0.3.5}/src/math_spec_mapping/Reports/spaces.py +0 -0
- {math_spec_mapping-0.3.4 → math_spec_mapping-0.3.5}/src/math_spec_mapping/Reports/state.py +0 -0
- {math_spec_mapping-0.3.4 → math_spec_mapping-0.3.5}/src/math_spec_mapping/Reports/tables.py +0 -0
- {math_spec_mapping-0.3.4 → math_spec_mapping-0.3.5}/src/math_spec_mapping/Reports/wiring.py +0 -0
- {math_spec_mapping-0.3.4 → math_spec_mapping-0.3.5}/src/math_spec_mapping/__init__.py +0 -0
- {math_spec_mapping-0.3.4 → math_spec_mapping-0.3.5}/src/math_spec_mapping/schema.py +0 -0
- {math_spec_mapping-0.3.4 → math_spec_mapping-0.3.5}/src/math_spec_mapping/schema.schema.json +0 -0
- {math_spec_mapping-0.3.4 → math_spec_mapping-0.3.5}/src/math_spec_mapping.egg-info/SOURCES.txt +0 -0
- {math_spec_mapping-0.3.4 → math_spec_mapping-0.3.5}/src/math_spec_mapping.egg-info/dependency_links.txt +0 -0
- {math_spec_mapping-0.3.4 → math_spec_mapping-0.3.5}/src/math_spec_mapping.egg-info/requires.txt +0 -0
- {math_spec_mapping-0.3.4 → math_spec_mapping-0.3.5}/src/math_spec_mapping.egg-info/top_level.txt +0 -0
{math_spec_mapping-0.3.4 → math_spec_mapping-0.3.5}/src/math_spec_mapping/Classes/MathSpec.py
RENAMED
@@ -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():
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{math_spec_mapping-0.3.4 → math_spec_mapping-0.3.5}/src/math_spec_mapping/Classes/BoundaryAction.py
RENAMED
File without changes
|
{math_spec_mapping-0.3.4 → math_spec_mapping-0.3.5}/src/math_spec_mapping/Classes/ControlAction.py
RENAMED
File without changes
|
File without changes
|
{math_spec_mapping-0.3.4 → math_spec_mapping-0.3.5}/src/math_spec_mapping/Classes/Mechanism.py
RENAMED
File without changes
|
File without changes
|
{math_spec_mapping-0.3.4 → math_spec_mapping-0.3.5}/src/math_spec_mapping/Classes/Parameter.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{math_spec_mapping-0.3.4 → math_spec_mapping-0.3.5}/src/math_spec_mapping/Classes/StatefulMetric.py
RENAMED
File without changes
|
File without changes
|
{math_spec_mapping-0.3.4 → math_spec_mapping-0.3.5}/src/math_spec_mapping/Classes/__init__.py
RENAMED
File without changes
|
{math_spec_mapping-0.3.4 → math_spec_mapping-0.3.5}/src/math_spec_mapping/Convenience/__init__.py
RENAMED
File without changes
|
File without changes
|
{math_spec_mapping-0.3.4 → math_spec_mapping-0.3.5}/src/math_spec_mapping/Convenience/starter.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
{math_spec_mapping-0.3.4 → math_spec_mapping-0.3.5}/src/math_spec_mapping/Load/boundary_actions.py
RENAMED
File without changes
|
{math_spec_mapping-0.3.4 → math_spec_mapping-0.3.5}/src/math_spec_mapping/Load/control_actions.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{math_spec_mapping-0.3.4 → math_spec_mapping-0.3.5}/src/math_spec_mapping/Load/implementations.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{math_spec_mapping-0.3.4 → math_spec_mapping-0.3.5}/src/math_spec_mapping/Load/parameters.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{math_spec_mapping-0.3.4 → math_spec_mapping-0.3.5}/src/math_spec_mapping/Load/stateful_metrics.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{math_spec_mapping-0.3.4 → math_spec_mapping-0.3.5}/src/math_spec_mapping/Reports/__init__.py
RENAMED
File without changes
|
File without changes
|
{math_spec_mapping-0.3.4 → math_spec_mapping-0.3.5}/src/math_spec_mapping/Reports/control_actions.py
RENAMED
File without changes
|
{math_spec_mapping-0.3.4 → math_spec_mapping-0.3.5}/src/math_spec_mapping/Reports/general.py
RENAMED
File without changes
|
{math_spec_mapping-0.3.4 → math_spec_mapping-0.3.5}/src/math_spec_mapping/Reports/markdown.py
RENAMED
File without changes
|
{math_spec_mapping-0.3.4 → math_spec_mapping-0.3.5}/src/math_spec_mapping/Reports/mechanisms.py
RENAMED
File without changes
|
{math_spec_mapping-0.3.4 → math_spec_mapping-0.3.5}/src/math_spec_mapping/Reports/node_map.py
RENAMED
File without changes
|
{math_spec_mapping-0.3.4 → math_spec_mapping-0.3.5}/src/math_spec_mapping/Reports/parameters.py
RENAMED
File without changes
|
{math_spec_mapping-0.3.4 → math_spec_mapping-0.3.5}/src/math_spec_mapping/Reports/policies.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{math_spec_mapping-0.3.4 → math_spec_mapping-0.3.5}/src/math_spec_mapping/schema.schema.json
RENAMED
File without changes
|
{math_spec_mapping-0.3.4 → math_spec_mapping-0.3.5}/src/math_spec_mapping.egg-info/SOURCES.txt
RENAMED
File without changes
|
File without changes
|
{math_spec_mapping-0.3.4 → math_spec_mapping-0.3.5}/src/math_spec_mapping.egg-info/requires.txt
RENAMED
File without changes
|
{math_spec_mapping-0.3.4 → math_spec_mapping-0.3.5}/src/math_spec_mapping.egg-info/top_level.txt
RENAMED
File without changes
|