fmu-manipulation-toolbox 1.9rc1__tar.gz → 1.9rc3__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.
Files changed (76) hide show
  1. {fmu_manipulation_toolbox-1.9rc1 → fmu_manipulation_toolbox-1.9rc3}/PKG-INFO +1 -1
  2. fmu_manipulation_toolbox-1.9rc3/fmu_manipulation_toolbox/__init__.py +0 -0
  3. {fmu_manipulation_toolbox-1.9rc1 → fmu_manipulation_toolbox-1.9rc3}/fmu_manipulation_toolbox/__main__.py +1 -1
  4. fmu_manipulation_toolbox-1.9rc3/fmu_manipulation_toolbox/__version__.py +1 -0
  5. {fmu_manipulation_toolbox-1.9rc1 → fmu_manipulation_toolbox-1.9rc3}/fmu_manipulation_toolbox/assembly.py +1 -1
  6. {fmu_manipulation_toolbox-1.9rc1 → fmu_manipulation_toolbox-1.9rc3}/fmu_manipulation_toolbox/checker.py +11 -8
  7. {fmu_manipulation_toolbox-1.9rc1 → fmu_manipulation_toolbox-1.9rc3}/fmu_manipulation_toolbox/container.py +225 -140
  8. {fmu_manipulation_toolbox-1.9rc1 → fmu_manipulation_toolbox-1.9rc3}/fmu_manipulation_toolbox/gui.py +45 -55
  9. {fmu_manipulation_toolbox-1.9rc1 → fmu_manipulation_toolbox-1.9rc3}/fmu_manipulation_toolbox/gui_style.py +8 -0
  10. {fmu_manipulation_toolbox-1.9rc1 → fmu_manipulation_toolbox-1.9rc3}/fmu_manipulation_toolbox/operations.py +68 -41
  11. fmu_manipulation_toolbox-1.9rc3/fmu_manipulation_toolbox/resources/darwin64/container.dylib +0 -0
  12. fmu_manipulation_toolbox-1.9rc3/fmu_manipulation_toolbox/resources/linux64/container.so +0 -0
  13. {fmu_manipulation_toolbox-1.9rc1 → fmu_manipulation_toolbox-1.9rc3}/fmu_manipulation_toolbox/resources/win32/client_sm.dll +0 -0
  14. {fmu_manipulation_toolbox-1.9rc1 → fmu_manipulation_toolbox-1.9rc3}/fmu_manipulation_toolbox/resources/win32/server_sm.exe +0 -0
  15. {fmu_manipulation_toolbox-1.9rc1 → fmu_manipulation_toolbox-1.9rc3}/fmu_manipulation_toolbox/resources/win64/client_sm.dll +0 -0
  16. fmu_manipulation_toolbox-1.9rc3/fmu_manipulation_toolbox/resources/win64/container.dll +0 -0
  17. {fmu_manipulation_toolbox-1.9rc1 → fmu_manipulation_toolbox-1.9rc3}/fmu_manipulation_toolbox/resources/win64/server_sm.exe +0 -0
  18. {fmu_manipulation_toolbox-1.9rc1 → fmu_manipulation_toolbox-1.9rc3}/fmu_manipulation_toolbox.egg-info/PKG-INFO +1 -1
  19. {fmu_manipulation_toolbox-1.9rc1 → fmu_manipulation_toolbox-1.9rc3}/tests/test_suite.py +6 -0
  20. fmu_manipulation_toolbox-1.9rc1/fmu_manipulation_toolbox/__init__.py +0 -1
  21. fmu_manipulation_toolbox-1.9rc1/fmu_manipulation_toolbox/__version__.py +0 -1
  22. fmu_manipulation_toolbox-1.9rc1/fmu_manipulation_toolbox/resources/darwin64/container.dylib +0 -0
  23. fmu_manipulation_toolbox-1.9rc1/fmu_manipulation_toolbox/resources/linux64/container.so +0 -0
  24. fmu_manipulation_toolbox-1.9rc1/fmu_manipulation_toolbox/resources/win64/container.dll +0 -0
  25. {fmu_manipulation_toolbox-1.9rc1 → fmu_manipulation_toolbox-1.9rc3}/LICENSE.txt +0 -0
  26. {fmu_manipulation_toolbox-1.9rc1 → fmu_manipulation_toolbox-1.9rc3}/README.md +0 -0
  27. {fmu_manipulation_toolbox-1.9rc1 → fmu_manipulation_toolbox-1.9rc3}/fmu_manipulation_toolbox/help.py +0 -0
  28. {fmu_manipulation_toolbox-1.9rc1 → fmu_manipulation_toolbox-1.9rc3}/fmu_manipulation_toolbox/resources/checkbox-checked-disabled.png +0 -0
  29. {fmu_manipulation_toolbox-1.9rc1 → fmu_manipulation_toolbox-1.9rc3}/fmu_manipulation_toolbox/resources/checkbox-checked-hover.png +0 -0
  30. {fmu_manipulation_toolbox-1.9rc1 → fmu_manipulation_toolbox-1.9rc3}/fmu_manipulation_toolbox/resources/checkbox-checked.png +0 -0
  31. {fmu_manipulation_toolbox-1.9rc1 → fmu_manipulation_toolbox-1.9rc3}/fmu_manipulation_toolbox/resources/checkbox-unchecked-disabled.png +0 -0
  32. {fmu_manipulation_toolbox-1.9rc1 → fmu_manipulation_toolbox-1.9rc3}/fmu_manipulation_toolbox/resources/checkbox-unchecked-hover.png +0 -0
  33. {fmu_manipulation_toolbox-1.9rc1 → fmu_manipulation_toolbox-1.9rc3}/fmu_manipulation_toolbox/resources/checkbox-unchecked.png +0 -0
  34. {fmu_manipulation_toolbox-1.9rc1 → fmu_manipulation_toolbox-1.9rc3}/fmu_manipulation_toolbox/resources/container.png +0 -0
  35. {fmu_manipulation_toolbox-1.9rc1 → fmu_manipulation_toolbox-1.9rc3}/fmu_manipulation_toolbox/resources/drop_fmu.png +0 -0
  36. {fmu_manipulation_toolbox-1.9rc1 → fmu_manipulation_toolbox-1.9rc3}/fmu_manipulation_toolbox/resources/fmi-2.0/fmi2Annotation.xsd +0 -0
  37. {fmu_manipulation_toolbox-1.9rc1 → fmu_manipulation_toolbox-1.9rc3}/fmu_manipulation_toolbox/resources/fmi-2.0/fmi2AttributeGroups.xsd +0 -0
  38. {fmu_manipulation_toolbox-1.9rc1 → fmu_manipulation_toolbox-1.9rc3}/fmu_manipulation_toolbox/resources/fmi-2.0/fmi2ModelDescription.xsd +0 -0
  39. {fmu_manipulation_toolbox-1.9rc1 → fmu_manipulation_toolbox-1.9rc3}/fmu_manipulation_toolbox/resources/fmi-2.0/fmi2ScalarVariable.xsd +0 -0
  40. {fmu_manipulation_toolbox-1.9rc1 → fmu_manipulation_toolbox-1.9rc3}/fmu_manipulation_toolbox/resources/fmi-2.0/fmi2Type.xsd +0 -0
  41. {fmu_manipulation_toolbox-1.9rc1 → fmu_manipulation_toolbox-1.9rc3}/fmu_manipulation_toolbox/resources/fmi-2.0/fmi2Unit.xsd +0 -0
  42. {fmu_manipulation_toolbox-1.9rc1 → fmu_manipulation_toolbox-1.9rc3}/fmu_manipulation_toolbox/resources/fmi-2.0/fmi2VariableDependency.xsd +0 -0
  43. {fmu_manipulation_toolbox-1.9rc1 → fmu_manipulation_toolbox-1.9rc3}/fmu_manipulation_toolbox/resources/fmi-3.0/fmi3Annotation.xsd +0 -0
  44. {fmu_manipulation_toolbox-1.9rc1 → fmu_manipulation_toolbox-1.9rc3}/fmu_manipulation_toolbox/resources/fmi-3.0/fmi3AttributeGroups.xsd +0 -0
  45. {fmu_manipulation_toolbox-1.9rc1 → fmu_manipulation_toolbox-1.9rc3}/fmu_manipulation_toolbox/resources/fmi-3.0/fmi3BuildDescription.xsd +0 -0
  46. {fmu_manipulation_toolbox-1.9rc1 → fmu_manipulation_toolbox-1.9rc3}/fmu_manipulation_toolbox/resources/fmi-3.0/fmi3InterfaceType.xsd +0 -0
  47. {fmu_manipulation_toolbox-1.9rc1 → fmu_manipulation_toolbox-1.9rc3}/fmu_manipulation_toolbox/resources/fmi-3.0/fmi3LayeredStandardManifest.xsd +0 -0
  48. {fmu_manipulation_toolbox-1.9rc1 → fmu_manipulation_toolbox-1.9rc3}/fmu_manipulation_toolbox/resources/fmi-3.0/fmi3ModelDescription.xsd +0 -0
  49. {fmu_manipulation_toolbox-1.9rc1 → fmu_manipulation_toolbox-1.9rc3}/fmu_manipulation_toolbox/resources/fmi-3.0/fmi3Terminal.xsd +0 -0
  50. {fmu_manipulation_toolbox-1.9rc1 → fmu_manipulation_toolbox-1.9rc3}/fmu_manipulation_toolbox/resources/fmi-3.0/fmi3TerminalsAndIcons.xsd +0 -0
  51. {fmu_manipulation_toolbox-1.9rc1 → fmu_manipulation_toolbox-1.9rc3}/fmu_manipulation_toolbox/resources/fmi-3.0/fmi3Type.xsd +0 -0
  52. {fmu_manipulation_toolbox-1.9rc1 → fmu_manipulation_toolbox-1.9rc3}/fmu_manipulation_toolbox/resources/fmi-3.0/fmi3Unit.xsd +0 -0
  53. {fmu_manipulation_toolbox-1.9rc1 → fmu_manipulation_toolbox-1.9rc3}/fmu_manipulation_toolbox/resources/fmi-3.0/fmi3Variable.xsd +0 -0
  54. {fmu_manipulation_toolbox-1.9rc1 → fmu_manipulation_toolbox-1.9rc3}/fmu_manipulation_toolbox/resources/fmi-3.0/fmi3VariableDependency.xsd +0 -0
  55. {fmu_manipulation_toolbox-1.9rc1 → fmu_manipulation_toolbox-1.9rc3}/fmu_manipulation_toolbox/resources/fmu.png +0 -0
  56. {fmu_manipulation_toolbox-1.9rc1 → fmu_manipulation_toolbox-1.9rc3}/fmu_manipulation_toolbox/resources/fmu_manipulation_toolbox.png +0 -0
  57. {fmu_manipulation_toolbox-1.9rc1 → fmu_manipulation_toolbox-1.9rc3}/fmu_manipulation_toolbox/resources/help.png +0 -0
  58. {fmu_manipulation_toolbox-1.9rc1 → fmu_manipulation_toolbox-1.9rc3}/fmu_manipulation_toolbox/resources/icon-round.png +0 -0
  59. {fmu_manipulation_toolbox-1.9rc1 → fmu_manipulation_toolbox-1.9rc3}/fmu_manipulation_toolbox/resources/icon.png +0 -0
  60. {fmu_manipulation_toolbox-1.9rc1 → fmu_manipulation_toolbox-1.9rc3}/fmu_manipulation_toolbox/resources/icon_fmu.png +0 -0
  61. {fmu_manipulation_toolbox-1.9rc1 → fmu_manipulation_toolbox-1.9rc3}/fmu_manipulation_toolbox/resources/license.txt +0 -0
  62. {fmu_manipulation_toolbox-1.9rc1 → fmu_manipulation_toolbox-1.9rc3}/fmu_manipulation_toolbox/resources/linux32/client_sm.so +0 -0
  63. {fmu_manipulation_toolbox-1.9rc1 → fmu_manipulation_toolbox-1.9rc3}/fmu_manipulation_toolbox/resources/linux32/server_sm +0 -0
  64. {fmu_manipulation_toolbox-1.9rc1 → fmu_manipulation_toolbox-1.9rc3}/fmu_manipulation_toolbox/resources/linux64/client_sm.so +0 -0
  65. {fmu_manipulation_toolbox-1.9rc1 → fmu_manipulation_toolbox-1.9rc3}/fmu_manipulation_toolbox/resources/linux64/server_sm +0 -0
  66. {fmu_manipulation_toolbox-1.9rc1 → fmu_manipulation_toolbox-1.9rc3}/fmu_manipulation_toolbox/resources/mask.png +0 -0
  67. {fmu_manipulation_toolbox-1.9rc1 → fmu_manipulation_toolbox-1.9rc3}/fmu_manipulation_toolbox/resources/model.png +0 -0
  68. {fmu_manipulation_toolbox-1.9rc1 → fmu_manipulation_toolbox-1.9rc3}/fmu_manipulation_toolbox/split.py +0 -0
  69. {fmu_manipulation_toolbox-1.9rc1 → fmu_manipulation_toolbox-1.9rc3}/fmu_manipulation_toolbox/version.py +0 -0
  70. {fmu_manipulation_toolbox-1.9rc1 → fmu_manipulation_toolbox-1.9rc3}/fmu_manipulation_toolbox.egg-info/SOURCES.txt +0 -0
  71. {fmu_manipulation_toolbox-1.9rc1 → fmu_manipulation_toolbox-1.9rc3}/fmu_manipulation_toolbox.egg-info/dependency_links.txt +0 -0
  72. {fmu_manipulation_toolbox-1.9rc1 → fmu_manipulation_toolbox-1.9rc3}/fmu_manipulation_toolbox.egg-info/entry_points.txt +0 -0
  73. {fmu_manipulation_toolbox-1.9rc1 → fmu_manipulation_toolbox-1.9rc3}/fmu_manipulation_toolbox.egg-info/requires.txt +0 -0
  74. {fmu_manipulation_toolbox-1.9rc1 → fmu_manipulation_toolbox-1.9rc3}/fmu_manipulation_toolbox.egg-info/top_level.txt +0 -0
  75. {fmu_manipulation_toolbox-1.9rc1 → fmu_manipulation_toolbox-1.9rc3}/setup.cfg +0 -0
  76. {fmu_manipulation_toolbox-1.9rc1 → fmu_manipulation_toolbox-1.9rc3}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fmu_manipulation_toolbox
3
- Version: 1.9rc1
3
+ Version: 1.9rc3
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
@@ -10,7 +10,7 @@ def gui():
10
10
 
11
11
 
12
12
  def cli():
13
- from .cli import fmutool
13
+ from .cli.fmutool import fmutool
14
14
  fmutool()
15
15
 
16
16
 
@@ -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
- print(f"ERROR: Expected FMI {','.join(self.SUPPORTED_FMI_VERSIONS)} versions.")
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
- print(error.reason, error.msg)
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
- print(f"INFO: This FMU seems to be compliant with FMI-{self.compliant_with_version}.")
39
+ logger.info(f"This FMU seems to be compliant with FMI-{self.compliant_with_version}.")
37
40
  else:
38
- print(f"ERROR: This FMU does not validate with FMI standard.")
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
- print(f"ERROR: Cannot load {checker_filename}. Is this a python file?")
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
- print(f"ERROR: Cannot load {checker_filename}: {error})")
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
- print(f"Adding checker: {checker_filename}|{checker_name}")
63
+ logger.info(f"Adding checker: {checker_filename}|{checker_name}")
61
64
 
62
65
  except AttributeError:
63
- print(f"ERROR: {checker_filename} should implement class 'OperationCheck'")
66
+ logger.error(f"'{checker_filename}' should implement class 'OperationCheck'")