fmu-manipulation-toolbox 1.8.2.dev3__py3-none-any.whl → 1.8.2rc1__py3-none-any.whl
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.
- fmu_manipulation_toolbox/__version__.py +1 -1
- fmu_manipulation_toolbox/assembly.py +13 -6
- fmu_manipulation_toolbox/cli.py +5 -1
- fmu_manipulation_toolbox/fmu_container.py +13 -6
- fmu_manipulation_toolbox/resources/linux64/container.so +0 -0
- fmu_manipulation_toolbox/resources/win32/client_sm.dll +0 -0
- fmu_manipulation_toolbox/resources/win32/server_sm.exe +0 -0
- fmu_manipulation_toolbox/resources/win64/client_sm.dll +0 -0
- fmu_manipulation_toolbox/resources/win64/container.dll +0 -0
- fmu_manipulation_toolbox/resources/win64/server_sm.exe +0 -0
- {fmu_manipulation_toolbox-1.8.2.dev3.dist-info → fmu_manipulation_toolbox-1.8.2rc1.dist-info}/METADATA +1 -1
- {fmu_manipulation_toolbox-1.8.2.dev3.dist-info → fmu_manipulation_toolbox-1.8.2rc1.dist-info}/RECORD +16 -16
- {fmu_manipulation_toolbox-1.8.2.dev3.dist-info → fmu_manipulation_toolbox-1.8.2rc1.dist-info}/WHEEL +1 -1
- {fmu_manipulation_toolbox-1.8.2.dev3.dist-info → fmu_manipulation_toolbox-1.8.2rc1.dist-info}/LICENSE.txt +0 -0
- {fmu_manipulation_toolbox-1.8.2.dev3.dist-info → fmu_manipulation_toolbox-1.8.2rc1.dist-info}/entry_points.txt +0 -0
- {fmu_manipulation_toolbox-1.8.2.dev3.dist-info → fmu_manipulation_toolbox-1.8.2rc1.dist-info}/top_level.txt +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
'V1.8.2-
|
|
1
|
+
'V1.8.2-rc1'
|
|
@@ -38,7 +38,7 @@ class Connection:
|
|
|
38
38
|
|
|
39
39
|
class AssemblyNode:
|
|
40
40
|
def __init__(self, name: Optional[str], step_size: float = None, mt=False, profiling=False,
|
|
41
|
-
auto_link=True, auto_input=True, auto_output=True, auto_parameter=False):
|
|
41
|
+
auto_link=True, auto_input=True, auto_output=True, auto_parameter=False, auto_local=False):
|
|
42
42
|
self.name = name
|
|
43
43
|
if step_size:
|
|
44
44
|
try:
|
|
@@ -54,6 +54,7 @@ class AssemblyNode:
|
|
|
54
54
|
self.auto_input = auto_input
|
|
55
55
|
self.auto_output = auto_output
|
|
56
56
|
self.auto_parameter = auto_parameter
|
|
57
|
+
self.auto_local = auto_local
|
|
57
58
|
|
|
58
59
|
self.parent: Optional[AssemblyNode] = None
|
|
59
60
|
self.children: Dict[str, AssemblyNode] = {} # sub-containers
|
|
@@ -128,7 +129,8 @@ class AssemblyNode:
|
|
|
128
129
|
container.add_implicit_rule(auto_input=self.auto_input,
|
|
129
130
|
auto_output=self.auto_output,
|
|
130
131
|
auto_link=self.auto_link,
|
|
131
|
-
auto_parameter=self.auto_parameter
|
|
132
|
+
auto_parameter=self.auto_parameter,
|
|
133
|
+
auto_local=self.auto_local)
|
|
132
134
|
|
|
133
135
|
container.make_fmu(self.name, self.step_size, mt=self.mt, profiling=self.profiling, debug=debug)
|
|
134
136
|
|
|
@@ -209,7 +211,8 @@ class AssemblyError(Exception):
|
|
|
209
211
|
|
|
210
212
|
class Assembly:
|
|
211
213
|
def __init__(self, filename: str, step_size=None, auto_link=True, auto_input=True, debug=False,
|
|
212
|
-
auto_output=True, mt=False, profiling=False, fmu_directory: Path = Path("."), auto_parameter=False
|
|
214
|
+
auto_output=True, mt=False, profiling=False, fmu_directory: Path = Path("."), auto_parameter=False,
|
|
215
|
+
auto_local=False):
|
|
213
216
|
self.filename = Path(filename)
|
|
214
217
|
self.default_auto_input = auto_input
|
|
215
218
|
self.debug = debug
|
|
@@ -217,6 +220,7 @@ class Assembly:
|
|
|
217
220
|
self.default_step_size = step_size
|
|
218
221
|
self.default_auto_link = auto_link
|
|
219
222
|
self.default_auto_parameter = auto_parameter
|
|
223
|
+
self.default_auto_local = auto_local
|
|
220
224
|
self.default_mt = mt
|
|
221
225
|
self.default_profiling = profiling
|
|
222
226
|
self.fmu_directory = fmu_directory
|
|
@@ -274,7 +278,7 @@ class Assembly:
|
|
|
274
278
|
self.root = AssemblyNode(name, step_size=self.default_step_size, auto_link=self.default_auto_link,
|
|
275
279
|
mt=self.default_mt, profiling=self.default_profiling,
|
|
276
280
|
auto_input=self.default_auto_input, auto_output=self.default_auto_output,
|
|
277
|
-
auto_parameter=self.default_auto_parameter)
|
|
281
|
+
auto_parameter=self.default_auto_parameter, auto_local=self.default_auto_local)
|
|
278
282
|
|
|
279
283
|
with open(self.input_pathname) as file:
|
|
280
284
|
reader = csv.reader(file, delimiter=';')
|
|
@@ -379,14 +383,16 @@ class Assembly:
|
|
|
379
383
|
auto_input = data.get("auto_input", self.default_auto_input) # 5
|
|
380
384
|
auto_output = data.get("auto_output", self.default_auto_output) # 6
|
|
381
385
|
auto_parameter = data.get("auto_parameter", self.default_auto_parameter) # 6b
|
|
386
|
+
auto_local = data.get("auto_local", self.default_auto_local) # 6c
|
|
382
387
|
step_size = data.get("step_size", self.default_step_size) # 7
|
|
383
388
|
|
|
384
389
|
node = AssemblyNode(name, step_size=step_size, auto_link=auto_link, mt=mt, profiling=profiling,
|
|
385
|
-
auto_input=auto_input, auto_output=auto_output, auto_parameter=auto_parameter
|
|
390
|
+
auto_input=auto_input, auto_output=auto_output, auto_parameter=auto_parameter,
|
|
391
|
+
auto_local=auto_local)
|
|
386
392
|
|
|
387
393
|
for key, value in data.items():
|
|
388
394
|
if key in ('name', 'step_size', 'auto_link', 'auto_input', 'auto_output', 'mt', 'profiling',
|
|
389
|
-
'auto_parameter'):
|
|
395
|
+
'auto_parameter', 'auto_local'):
|
|
390
396
|
continue # Already read
|
|
391
397
|
|
|
392
398
|
elif key == "container": # 8
|
|
@@ -447,6 +453,7 @@ class Assembly:
|
|
|
447
453
|
json_node["auto_input"] = node.auto_input # 5
|
|
448
454
|
json_node["auto_output"] = node.auto_output # 6
|
|
449
455
|
json_node["auto_parameter"] = node.auto_parameter # 6b
|
|
456
|
+
json_node["auto_local"] = node.auto_local # 6c
|
|
450
457
|
|
|
451
458
|
if node.step_size:
|
|
452
459
|
json_node["step_size"] = node.step_size # 7
|
fmu_manipulation_toolbox/cli.py
CHANGED
|
@@ -179,6 +179,9 @@ def fmucontainer():
|
|
|
179
179
|
parser.add_argument("-auto-parameter", action="store_true", dest="auto_parameter", default=False,
|
|
180
180
|
help="Expose parameters of the embedded fmu's.")
|
|
181
181
|
|
|
182
|
+
parser.add_argument("-auto-local", action="store_true", dest="auto_local", default=False,
|
|
183
|
+
help="Expose local variables of the embedded fmu's.")
|
|
184
|
+
|
|
182
185
|
parser.add_argument("-no-auto-link", action="store_false", dest="auto_link", default=True,
|
|
183
186
|
help="Create ONLY explicit links.")
|
|
184
187
|
|
|
@@ -208,7 +211,8 @@ def fmucontainer():
|
|
|
208
211
|
filename = description
|
|
209
212
|
try:
|
|
210
213
|
assembly = Assembly(filename, step_size=step_size, auto_link=config.auto_link,
|
|
211
|
-
auto_input=config.auto_input, auto_output=config.auto_output,
|
|
214
|
+
auto_input=config.auto_input, auto_output=config.auto_output,
|
|
215
|
+
auto_local=config.auto_local, mt=config.mt,
|
|
212
216
|
profiling=config.profiling, fmu_directory=fmu_directory, debug=config.debug,
|
|
213
217
|
auto_parameter=config.auto_parameter)
|
|
214
218
|
except FileNotFoundError as e:
|
|
@@ -308,7 +308,8 @@ class FMUContainer:
|
|
|
308
308
|
return ContainerPort(fmu, port.name)
|
|
309
309
|
return None
|
|
310
310
|
|
|
311
|
-
def add_implicit_rule(self, auto_input=True, auto_output=True, auto_link=True, auto_parameter=False
|
|
311
|
+
def add_implicit_rule(self, auto_input=True, auto_output=True, auto_link=True, auto_parameter=False,
|
|
312
|
+
auto_local=False):
|
|
312
313
|
# Auto Link outputs
|
|
313
314
|
for fmu in self.execution_order:
|
|
314
315
|
for port_name in fmu.ports:
|
|
@@ -332,11 +333,17 @@ class FMUContainer:
|
|
|
332
333
|
self.mark_ruled(cport, 'OUTPUT')
|
|
333
334
|
self.outputs[port_name] = cport
|
|
334
335
|
logger.info(f"AUTO OUTPUT: Expose {cport}")
|
|
335
|
-
elif cport.port.causality == 'local'
|
|
336
|
-
local_portname =
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
336
|
+
elif cport.port.causality == 'local':
|
|
337
|
+
local_portname = None
|
|
338
|
+
if port_name.startswith("container."):
|
|
339
|
+
local_portname = "container." + cport.fmu.id + "." + port_name[10:]
|
|
340
|
+
logger.info(f"PROFILING: Expose {cport}")
|
|
341
|
+
elif auto_local:
|
|
342
|
+
local_portname = cport.fmu.id + "." + port_name
|
|
343
|
+
logger.info(f"AUTO LOCAL: Expose {cport}")
|
|
344
|
+
if local_portname:
|
|
345
|
+
self.mark_ruled(cport, 'OUTPUT')
|
|
346
|
+
self.outputs[local_portname] = cport
|
|
340
347
|
|
|
341
348
|
if auto_input:
|
|
342
349
|
# Auto link inputs
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: fmu_manipulation_toolbox
|
|
3
|
-
Version: 1.8.
|
|
3
|
+
Version: 1.8.2rc1
|
|
4
4
|
Summary: FMU Manipulation Toobox is a python application which help to modify a Functional Mock-up Units (FMUs) without recompilation or to group them into FMU Containers
|
|
5
5
|
Home-page: https://github.com/grouperenault/fmu_manipulation_toolbox/
|
|
6
6
|
Author: Nicolas.LAURENT@Renault.com
|
{fmu_manipulation_toolbox-1.8.2.dev3.dist-info → fmu_manipulation_toolbox-1.8.2rc1.dist-info}/RECORD
RENAMED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
fmu_manipulation_toolbox/__init__.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
|
2
2
|
fmu_manipulation_toolbox/__main__.py,sha256=mAzrtkil506DS0F3g3CEbHdtZsZotzntcNhIn_lNJkw,344
|
|
3
|
-
fmu_manipulation_toolbox/__version__.py,sha256=
|
|
4
|
-
fmu_manipulation_toolbox/assembly.py,sha256=
|
|
3
|
+
fmu_manipulation_toolbox/__version__.py,sha256=wJPeucftT1ak3W8Yt1ymlW2Yn5pYKmWaC-XTiYwvpSk,13
|
|
4
|
+
fmu_manipulation_toolbox/assembly.py,sha256=pAAE_eWPfD-8BzZ7gvaHARhQt4-IV2jVvsMnJXeAtLI,25541
|
|
5
5
|
fmu_manipulation_toolbox/checker.py,sha256=lE2MpH4BAKCDjUvbr06N56u7ao8hWXaJgMKaLvmhFTQ,2272
|
|
6
|
-
fmu_manipulation_toolbox/cli.py,sha256=
|
|
7
|
-
fmu_manipulation_toolbox/fmu_container.py,sha256=
|
|
6
|
+
fmu_manipulation_toolbox/cli.py,sha256=PVdz2eg-D7bnkPXjke7t9_mAuT77gBJWib558HB2-p8,10582
|
|
7
|
+
fmu_manipulation_toolbox/fmu_container.py,sha256=VTZlRTXAYcaYLijgN4ReuG6hLQ2XRgxctPJdEYRfOcc,28755
|
|
8
8
|
fmu_manipulation_toolbox/fmu_operations.py,sha256=WE-lCNNOYr3pakMkwzpsp_lBhb2P4s7Ez5HnxQLbVdk,15814
|
|
9
9
|
fmu_manipulation_toolbox/gui.py,sha256=bGG4iPddGsT4tLBv1zjSpbIkyctHVfbRt0kGxdTTrTc,29219
|
|
10
10
|
fmu_manipulation_toolbox/gui_style.py,sha256=jjDhzSw5hu_6-bOOhsvI_MxQZOqt9SjpKK6T83Gubr4,2926
|
|
@@ -37,16 +37,16 @@ fmu_manipulation_toolbox/resources/fmi-2.0/fmi2VariableDependency.xsd,sha256=Tc9
|
|
|
37
37
|
fmu_manipulation_toolbox/resources/linux32/client_sm.so,sha256=xVdY2zy13pa2DcvFiweSNpp7E6DiONqeoBdlcJHrW_k,35940
|
|
38
38
|
fmu_manipulation_toolbox/resources/linux32/server_sm,sha256=1TLGqNPyM5UVOrCfzNqWyF6ClLksY3EiY3CSsrnp6c0,22836
|
|
39
39
|
fmu_manipulation_toolbox/resources/linux64/client_sm.so,sha256=EhY1XHo1YcQn6yqZ7wk5okqtZyp0MrcCsGcudqE-aIM,37000
|
|
40
|
-
fmu_manipulation_toolbox/resources/linux64/container.so,sha256=
|
|
40
|
+
fmu_manipulation_toolbox/resources/linux64/container.so,sha256=vT6W-xb6sdybEFnujZEO5lvl2zwf_0VCEtsn0PL28Cs,45984
|
|
41
41
|
fmu_manipulation_toolbox/resources/linux64/server_sm,sha256=ulfoPvmaYe9nInYcVEyj7mD9zDzGk56OUoWx1mPKLiE,22768
|
|
42
|
-
fmu_manipulation_toolbox/resources/win32/client_sm.dll,sha256=
|
|
43
|
-
fmu_manipulation_toolbox/resources/win32/server_sm.exe,sha256=
|
|
44
|
-
fmu_manipulation_toolbox/resources/win64/client_sm.dll,sha256=
|
|
45
|
-
fmu_manipulation_toolbox/resources/win64/container.dll,sha256=
|
|
46
|
-
fmu_manipulation_toolbox/resources/win64/server_sm.exe,sha256=
|
|
47
|
-
fmu_manipulation_toolbox-1.8.
|
|
48
|
-
fmu_manipulation_toolbox-1.8.
|
|
49
|
-
fmu_manipulation_toolbox-1.8.
|
|
50
|
-
fmu_manipulation_toolbox-1.8.
|
|
51
|
-
fmu_manipulation_toolbox-1.8.
|
|
52
|
-
fmu_manipulation_toolbox-1.8.
|
|
42
|
+
fmu_manipulation_toolbox/resources/win32/client_sm.dll,sha256=aPpx4ix2hrS5v8bj-jY99thtFsoQAtdZPjtedFY7I_M,17920
|
|
43
|
+
fmu_manipulation_toolbox/resources/win32/server_sm.exe,sha256=8uBDPlO3ayhuM_POrO-7FHWtwml2l5gms6SK9uyMY6Q,15872
|
|
44
|
+
fmu_manipulation_toolbox/resources/win64/client_sm.dll,sha256=dVc0HH3gHfAlVc0TAg6qg1s7g2v-0GUgIYuPczM96j8,22016
|
|
45
|
+
fmu_manipulation_toolbox/resources/win64/container.dll,sha256=IT4QEx32UOpj0tkzyb_B_ihGTS6Gbt8wxmrE_PmTc3g,36864
|
|
46
|
+
fmu_manipulation_toolbox/resources/win64/server_sm.exe,sha256=SC_RZU96-fjFTz_AjocNRBU0agOfZzn_VFKeSsWAn5o,19456
|
|
47
|
+
fmu_manipulation_toolbox-1.8.2rc1.dist-info/LICENSE.txt,sha256=c_862mzyk6ownO3Gt6cVs0-53IXLi_-ZEQFNDVabESw,1285
|
|
48
|
+
fmu_manipulation_toolbox-1.8.2rc1.dist-info/METADATA,sha256=1mtIdoVthyAN-gVuBS0KL21zmMyb1PdbcfstXFdKofg,1066
|
|
49
|
+
fmu_manipulation_toolbox-1.8.2rc1.dist-info/WHEEL,sha256=jB7zZ3N9hIM9adW7qlTAyycLYW9npaWKLRzaoVcLKcM,91
|
|
50
|
+
fmu_manipulation_toolbox-1.8.2rc1.dist-info/entry_points.txt,sha256=jCPLMBdS-eOvmRfDv7n0wHZSbJHccHviW03mz5vwO-Q,124
|
|
51
|
+
fmu_manipulation_toolbox-1.8.2rc1.dist-info/top_level.txt,sha256=9D_h-5BMjSqf9z-XFkbJL_bMppR2XNYW3WNuPkXou0k,25
|
|
52
|
+
fmu_manipulation_toolbox-1.8.2rc1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|