fmu-manipulation-toolbox 1.9rc1__tar.gz → 1.9rc2__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.
- {fmu_manipulation_toolbox-1.9rc1 → fmu_manipulation_toolbox-1.9rc2}/PKG-INFO +1 -1
- fmu_manipulation_toolbox-1.9rc2/fmu_manipulation_toolbox/__init__.py +0 -0
- {fmu_manipulation_toolbox-1.9rc1 → fmu_manipulation_toolbox-1.9rc2}/fmu_manipulation_toolbox/__main__.py +1 -1
- fmu_manipulation_toolbox-1.9rc2/fmu_manipulation_toolbox/__version__.py +1 -0
- {fmu_manipulation_toolbox-1.9rc1 → fmu_manipulation_toolbox-1.9rc2}/fmu_manipulation_toolbox/assembly.py +1 -1
- {fmu_manipulation_toolbox-1.9rc1 → fmu_manipulation_toolbox-1.9rc2}/fmu_manipulation_toolbox/checker.py +11 -8
- {fmu_manipulation_toolbox-1.9rc1 → fmu_manipulation_toolbox-1.9rc2}/fmu_manipulation_toolbox/container.py +225 -140
- {fmu_manipulation_toolbox-1.9rc1 → fmu_manipulation_toolbox-1.9rc2}/fmu_manipulation_toolbox/gui.py +45 -55
- {fmu_manipulation_toolbox-1.9rc1 → fmu_manipulation_toolbox-1.9rc2}/fmu_manipulation_toolbox/gui_style.py +8 -0
- {fmu_manipulation_toolbox-1.9rc1 → fmu_manipulation_toolbox-1.9rc2}/fmu_manipulation_toolbox/operations.py +68 -41
- fmu_manipulation_toolbox-1.9rc2/fmu_manipulation_toolbox/resources/darwin64/container.dylib +0 -0
- fmu_manipulation_toolbox-1.9rc2/fmu_manipulation_toolbox/resources/linux64/container.so +0 -0
- {fmu_manipulation_toolbox-1.9rc1 → fmu_manipulation_toolbox-1.9rc2}/fmu_manipulation_toolbox/resources/win32/client_sm.dll +0 -0
- {fmu_manipulation_toolbox-1.9rc1 → fmu_manipulation_toolbox-1.9rc2}/fmu_manipulation_toolbox/resources/win32/server_sm.exe +0 -0
- {fmu_manipulation_toolbox-1.9rc1 → fmu_manipulation_toolbox-1.9rc2}/fmu_manipulation_toolbox/resources/win64/client_sm.dll +0 -0
- fmu_manipulation_toolbox-1.9rc2/fmu_manipulation_toolbox/resources/win64/container.dll +0 -0
- {fmu_manipulation_toolbox-1.9rc1 → fmu_manipulation_toolbox-1.9rc2}/fmu_manipulation_toolbox/resources/win64/server_sm.exe +0 -0
- {fmu_manipulation_toolbox-1.9rc1 → fmu_manipulation_toolbox-1.9rc2}/fmu_manipulation_toolbox.egg-info/PKG-INFO +1 -1
- fmu_manipulation_toolbox-1.9rc1/fmu_manipulation_toolbox/__init__.py +0 -1
- fmu_manipulation_toolbox-1.9rc1/fmu_manipulation_toolbox/__version__.py +0 -1
- fmu_manipulation_toolbox-1.9rc1/fmu_manipulation_toolbox/resources/darwin64/container.dylib +0 -0
- fmu_manipulation_toolbox-1.9rc1/fmu_manipulation_toolbox/resources/linux64/container.so +0 -0
- fmu_manipulation_toolbox-1.9rc1/fmu_manipulation_toolbox/resources/win64/container.dll +0 -0
- {fmu_manipulation_toolbox-1.9rc1 → fmu_manipulation_toolbox-1.9rc2}/LICENSE.txt +0 -0
- {fmu_manipulation_toolbox-1.9rc1 → fmu_manipulation_toolbox-1.9rc2}/README.md +0 -0
- {fmu_manipulation_toolbox-1.9rc1 → fmu_manipulation_toolbox-1.9rc2}/fmu_manipulation_toolbox/help.py +0 -0
- {fmu_manipulation_toolbox-1.9rc1 → fmu_manipulation_toolbox-1.9rc2}/fmu_manipulation_toolbox/resources/checkbox-checked-disabled.png +0 -0
- {fmu_manipulation_toolbox-1.9rc1 → fmu_manipulation_toolbox-1.9rc2}/fmu_manipulation_toolbox/resources/checkbox-checked-hover.png +0 -0
- {fmu_manipulation_toolbox-1.9rc1 → fmu_manipulation_toolbox-1.9rc2}/fmu_manipulation_toolbox/resources/checkbox-checked.png +0 -0
- {fmu_manipulation_toolbox-1.9rc1 → fmu_manipulation_toolbox-1.9rc2}/fmu_manipulation_toolbox/resources/checkbox-unchecked-disabled.png +0 -0
- {fmu_manipulation_toolbox-1.9rc1 → fmu_manipulation_toolbox-1.9rc2}/fmu_manipulation_toolbox/resources/checkbox-unchecked-hover.png +0 -0
- {fmu_manipulation_toolbox-1.9rc1 → fmu_manipulation_toolbox-1.9rc2}/fmu_manipulation_toolbox/resources/checkbox-unchecked.png +0 -0
- {fmu_manipulation_toolbox-1.9rc1 → fmu_manipulation_toolbox-1.9rc2}/fmu_manipulation_toolbox/resources/container.png +0 -0
- {fmu_manipulation_toolbox-1.9rc1 → fmu_manipulation_toolbox-1.9rc2}/fmu_manipulation_toolbox/resources/drop_fmu.png +0 -0
- {fmu_manipulation_toolbox-1.9rc1 → fmu_manipulation_toolbox-1.9rc2}/fmu_manipulation_toolbox/resources/fmi-2.0/fmi2Annotation.xsd +0 -0
- {fmu_manipulation_toolbox-1.9rc1 → fmu_manipulation_toolbox-1.9rc2}/fmu_manipulation_toolbox/resources/fmi-2.0/fmi2AttributeGroups.xsd +0 -0
- {fmu_manipulation_toolbox-1.9rc1 → fmu_manipulation_toolbox-1.9rc2}/fmu_manipulation_toolbox/resources/fmi-2.0/fmi2ModelDescription.xsd +0 -0
- {fmu_manipulation_toolbox-1.9rc1 → fmu_manipulation_toolbox-1.9rc2}/fmu_manipulation_toolbox/resources/fmi-2.0/fmi2ScalarVariable.xsd +0 -0
- {fmu_manipulation_toolbox-1.9rc1 → fmu_manipulation_toolbox-1.9rc2}/fmu_manipulation_toolbox/resources/fmi-2.0/fmi2Type.xsd +0 -0
- {fmu_manipulation_toolbox-1.9rc1 → fmu_manipulation_toolbox-1.9rc2}/fmu_manipulation_toolbox/resources/fmi-2.0/fmi2Unit.xsd +0 -0
- {fmu_manipulation_toolbox-1.9rc1 → fmu_manipulation_toolbox-1.9rc2}/fmu_manipulation_toolbox/resources/fmi-2.0/fmi2VariableDependency.xsd +0 -0
- {fmu_manipulation_toolbox-1.9rc1 → fmu_manipulation_toolbox-1.9rc2}/fmu_manipulation_toolbox/resources/fmi-3.0/fmi3Annotation.xsd +0 -0
- {fmu_manipulation_toolbox-1.9rc1 → fmu_manipulation_toolbox-1.9rc2}/fmu_manipulation_toolbox/resources/fmi-3.0/fmi3AttributeGroups.xsd +0 -0
- {fmu_manipulation_toolbox-1.9rc1 → fmu_manipulation_toolbox-1.9rc2}/fmu_manipulation_toolbox/resources/fmi-3.0/fmi3BuildDescription.xsd +0 -0
- {fmu_manipulation_toolbox-1.9rc1 → fmu_manipulation_toolbox-1.9rc2}/fmu_manipulation_toolbox/resources/fmi-3.0/fmi3InterfaceType.xsd +0 -0
- {fmu_manipulation_toolbox-1.9rc1 → fmu_manipulation_toolbox-1.9rc2}/fmu_manipulation_toolbox/resources/fmi-3.0/fmi3LayeredStandardManifest.xsd +0 -0
- {fmu_manipulation_toolbox-1.9rc1 → fmu_manipulation_toolbox-1.9rc2}/fmu_manipulation_toolbox/resources/fmi-3.0/fmi3ModelDescription.xsd +0 -0
- {fmu_manipulation_toolbox-1.9rc1 → fmu_manipulation_toolbox-1.9rc2}/fmu_manipulation_toolbox/resources/fmi-3.0/fmi3Terminal.xsd +0 -0
- {fmu_manipulation_toolbox-1.9rc1 → fmu_manipulation_toolbox-1.9rc2}/fmu_manipulation_toolbox/resources/fmi-3.0/fmi3TerminalsAndIcons.xsd +0 -0
- {fmu_manipulation_toolbox-1.9rc1 → fmu_manipulation_toolbox-1.9rc2}/fmu_manipulation_toolbox/resources/fmi-3.0/fmi3Type.xsd +0 -0
- {fmu_manipulation_toolbox-1.9rc1 → fmu_manipulation_toolbox-1.9rc2}/fmu_manipulation_toolbox/resources/fmi-3.0/fmi3Unit.xsd +0 -0
- {fmu_manipulation_toolbox-1.9rc1 → fmu_manipulation_toolbox-1.9rc2}/fmu_manipulation_toolbox/resources/fmi-3.0/fmi3Variable.xsd +0 -0
- {fmu_manipulation_toolbox-1.9rc1 → fmu_manipulation_toolbox-1.9rc2}/fmu_manipulation_toolbox/resources/fmi-3.0/fmi3VariableDependency.xsd +0 -0
- {fmu_manipulation_toolbox-1.9rc1 → fmu_manipulation_toolbox-1.9rc2}/fmu_manipulation_toolbox/resources/fmu.png +0 -0
- {fmu_manipulation_toolbox-1.9rc1 → fmu_manipulation_toolbox-1.9rc2}/fmu_manipulation_toolbox/resources/fmu_manipulation_toolbox.png +0 -0
- {fmu_manipulation_toolbox-1.9rc1 → fmu_manipulation_toolbox-1.9rc2}/fmu_manipulation_toolbox/resources/help.png +0 -0
- {fmu_manipulation_toolbox-1.9rc1 → fmu_manipulation_toolbox-1.9rc2}/fmu_manipulation_toolbox/resources/icon-round.png +0 -0
- {fmu_manipulation_toolbox-1.9rc1 → fmu_manipulation_toolbox-1.9rc2}/fmu_manipulation_toolbox/resources/icon.png +0 -0
- {fmu_manipulation_toolbox-1.9rc1 → fmu_manipulation_toolbox-1.9rc2}/fmu_manipulation_toolbox/resources/icon_fmu.png +0 -0
- {fmu_manipulation_toolbox-1.9rc1 → fmu_manipulation_toolbox-1.9rc2}/fmu_manipulation_toolbox/resources/license.txt +0 -0
- {fmu_manipulation_toolbox-1.9rc1 → fmu_manipulation_toolbox-1.9rc2}/fmu_manipulation_toolbox/resources/linux32/client_sm.so +0 -0
- {fmu_manipulation_toolbox-1.9rc1 → fmu_manipulation_toolbox-1.9rc2}/fmu_manipulation_toolbox/resources/linux32/server_sm +0 -0
- {fmu_manipulation_toolbox-1.9rc1 → fmu_manipulation_toolbox-1.9rc2}/fmu_manipulation_toolbox/resources/linux64/client_sm.so +0 -0
- {fmu_manipulation_toolbox-1.9rc1 → fmu_manipulation_toolbox-1.9rc2}/fmu_manipulation_toolbox/resources/linux64/server_sm +0 -0
- {fmu_manipulation_toolbox-1.9rc1 → fmu_manipulation_toolbox-1.9rc2}/fmu_manipulation_toolbox/resources/mask.png +0 -0
- {fmu_manipulation_toolbox-1.9rc1 → fmu_manipulation_toolbox-1.9rc2}/fmu_manipulation_toolbox/resources/model.png +0 -0
- {fmu_manipulation_toolbox-1.9rc1 → fmu_manipulation_toolbox-1.9rc2}/fmu_manipulation_toolbox/split.py +0 -0
- {fmu_manipulation_toolbox-1.9rc1 → fmu_manipulation_toolbox-1.9rc2}/fmu_manipulation_toolbox/version.py +0 -0
- {fmu_manipulation_toolbox-1.9rc1 → fmu_manipulation_toolbox-1.9rc2}/fmu_manipulation_toolbox.egg-info/SOURCES.txt +0 -0
- {fmu_manipulation_toolbox-1.9rc1 → fmu_manipulation_toolbox-1.9rc2}/fmu_manipulation_toolbox.egg-info/dependency_links.txt +0 -0
- {fmu_manipulation_toolbox-1.9rc1 → fmu_manipulation_toolbox-1.9rc2}/fmu_manipulation_toolbox.egg-info/entry_points.txt +0 -0
- {fmu_manipulation_toolbox-1.9rc1 → fmu_manipulation_toolbox-1.9rc2}/fmu_manipulation_toolbox.egg-info/requires.txt +0 -0
- {fmu_manipulation_toolbox-1.9rc1 → fmu_manipulation_toolbox-1.9rc2}/fmu_manipulation_toolbox.egg-info/top_level.txt +0 -0
- {fmu_manipulation_toolbox-1.9rc1 → fmu_manipulation_toolbox-1.9rc2}/setup.cfg +0 -0
- {fmu_manipulation_toolbox-1.9rc1 → fmu_manipulation_toolbox-1.9rc2}/setup.py +0 -0
- {fmu_manipulation_toolbox-1.9rc1 → fmu_manipulation_toolbox-1.9rc2}/tests/test_suite.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: fmu_manipulation_toolbox
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.9rc2
|
|
4
4
|
Summary: FMU Manipulation Toolbox is a python application for modifying Functional Mock-up Units (FMUs) without recompilation or bundling them into FMU Containers
|
|
5
5
|
Home-page: https://github.com/grouperenault/fmu_manipulation_toolbox/
|
|
6
6
|
Author: Nicolas.LAURENT@Renault.com
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'V1.9-rc2'
|
|
@@ -103,7 +103,7 @@ class AssemblyNode:
|
|
|
103
103
|
|
|
104
104
|
def make_fmu(self, fmu_directory: Path, debug=False, description_pathname=None, fmi_version=2):
|
|
105
105
|
for node in self.children.values():
|
|
106
|
-
node.make_fmu(fmu_directory, debug=debug)
|
|
106
|
+
node.make_fmu(fmu_directory, debug=debug, fmi_version=fmi_version)
|
|
107
107
|
|
|
108
108
|
identifier = str(Path(self.name).stem)
|
|
109
109
|
container = FMUContainer(identifier, fmu_directory, description_pathname=description_pathname,
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import importlib.util
|
|
2
2
|
import inspect
|
|
3
|
+
import logging
|
|
3
4
|
import os
|
|
4
5
|
import xmlschema
|
|
5
6
|
from xmlschema.validators.exceptions import XMLSchemaValidationError
|
|
6
7
|
from .operations import OperationAbstract
|
|
7
8
|
|
|
9
|
+
logger = logging.getLogger("fmu_manipulation_toolbox")
|
|
10
|
+
|
|
8
11
|
|
|
9
12
|
class OperationGenericCheck(OperationAbstract):
|
|
10
13
|
SUPPORTED_FMI_VERSIONS = ('2.0', '3.0')
|
|
@@ -17,7 +20,7 @@ class OperationGenericCheck(OperationAbstract):
|
|
|
17
20
|
|
|
18
21
|
def fmi_attrs(self, attrs):
|
|
19
22
|
if attrs['fmiVersion'] not in self.SUPPORTED_FMI_VERSIONS:
|
|
20
|
-
|
|
23
|
+
logger.error(f"Expected FMI {','.join(self.SUPPORTED_FMI_VERSIONS)} versions.")
|
|
21
24
|
return
|
|
22
25
|
|
|
23
26
|
fmi_name = f"fmi{attrs['fmiVersion'][0]}"
|
|
@@ -27,15 +30,15 @@ class OperationGenericCheck(OperationAbstract):
|
|
|
27
30
|
try:
|
|
28
31
|
xmlschema.validate(self.fmu.descriptor_filename, schema=xsd_filename)
|
|
29
32
|
except XMLSchemaValidationError as error:
|
|
30
|
-
|
|
33
|
+
logger.error(error.reason, error.msg)
|
|
31
34
|
else:
|
|
32
35
|
self.compliant_with_version = attrs['fmiVersion']
|
|
33
36
|
|
|
34
37
|
def closure(self):
|
|
35
38
|
if self.compliant_with_version:
|
|
36
|
-
|
|
39
|
+
logger.info(f"This FMU seems to be compliant with FMI-{self.compliant_with_version}.")
|
|
37
40
|
else:
|
|
38
|
-
|
|
41
|
+
logger.error(f"This FMU does not validate with FMI standard.")
|
|
39
42
|
|
|
40
43
|
|
|
41
44
|
checker_list = [OperationGenericCheck]
|
|
@@ -44,20 +47,20 @@ checker_list = [OperationGenericCheck]
|
|
|
44
47
|
def add_from_file(checker_filename: str):
|
|
45
48
|
spec = importlib.util.spec_from_file_location(checker_filename, checker_filename)
|
|
46
49
|
if not spec:
|
|
47
|
-
|
|
50
|
+
logger.error(f"Cannot load '{checker_filename}'. Is this a python file?")
|
|
48
51
|
return
|
|
49
52
|
try:
|
|
50
53
|
checker_module = importlib.util.module_from_spec(spec)
|
|
51
54
|
try:
|
|
52
55
|
spec.loader.exec_module(checker_module)
|
|
53
56
|
except (ModuleNotFoundError, SyntaxError) as error:
|
|
54
|
-
|
|
57
|
+
logger.error(f"Cannot load '{checker_filename}': {error})")
|
|
55
58
|
return
|
|
56
59
|
|
|
57
60
|
for checker_name, checker_class in inspect.getmembers(checker_module, inspect.isclass):
|
|
58
61
|
if OperationAbstract in checker_class.__bases__:
|
|
59
62
|
checker_list.append(checker_class)
|
|
60
|
-
|
|
63
|
+
logger.info(f"Adding checker: {checker_filename}|{checker_name}")
|
|
61
64
|
|
|
62
65
|
except AttributeError:
|
|
63
|
-
|
|
66
|
+
logger.error(f"'{checker_filename}' should implement class 'OperationCheck'")
|