pythonfmu3 0.2.2__py3-none-any.whl → 0.2.2.2__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.
Potentially problematic release.
This version of pythonfmu3 might be problematic. Click here for more details.
- pythonfmu3/__init__.py +8 -8
- pythonfmu3/__main__.py +52 -52
- pythonfmu3/_version.py +1 -1
- pythonfmu3/builder.py +260 -260
- pythonfmu3/default_experiment.py +7 -7
- pythonfmu3/deploy.py +118 -118
- pythonfmu3/enums.py +48 -48
- pythonfmu3/fmi3slave.py +438 -438
- pythonfmu3/logmsg.py +14 -14
- pythonfmu3/osutil.py +22 -22
- pythonfmu3/pythonfmu-export/.clang-format +35 -35
- pythonfmu3/pythonfmu-export/CMakeLists.txt +59 -59
- pythonfmu3/pythonfmu-export/build/ALL_BUILD.vcxproj +184 -0
- pythonfmu3/pythonfmu-export/build/ALL_BUILD.vcxproj.filters +8 -0
- pythonfmu3/pythonfmu-export/build/CMakeCache.txt +369 -0
- pythonfmu3/pythonfmu-export/build/CMakeFiles/0ee4db0675778dfba98c7160896d5a45/generate.stamp.rule +1 -0
- pythonfmu3/pythonfmu-export/build/CMakeFiles/3.24.0/CMakeCCompiler.cmake +72 -0
- pythonfmu3/pythonfmu-export/build/CMakeFiles/3.24.0/CMakeCXXCompiler.cmake +83 -0
- pythonfmu3/pythonfmu-export/build/CMakeFiles/3.24.0/CMakeDetermineCompilerABI_C.bin +0 -0
- pythonfmu3/pythonfmu-export/build/CMakeFiles/3.24.0/CMakeDetermineCompilerABI_CXX.bin +0 -0
- pythonfmu3/pythonfmu-export/build/CMakeFiles/3.24.0/CMakeRCCompiler.cmake +6 -0
- pythonfmu3/pythonfmu-export/build/CMakeFiles/3.24.0/CMakeSystem.cmake +15 -0
- pythonfmu3/pythonfmu-export/build/CMakeFiles/3.24.0/CompilerIdC/CMakeCCompilerId.c +838 -0
- pythonfmu3/pythonfmu-export/build/CMakeFiles/3.24.0/CompilerIdC/CompilerIdC.exe +0 -0
- pythonfmu3/pythonfmu-export/build/CMakeFiles/3.24.0/CompilerIdC/CompilerIdC.vcxproj +71 -0
- pythonfmu3/pythonfmu-export/build/CMakeFiles/3.24.0/CompilerIdC/Debug/CMakeCCompilerId.obj +0 -0
- pythonfmu3/pythonfmu-export/build/CMakeFiles/3.24.0/CompilerIdC/Debug/CompilerIdC.exe.recipe +11 -0
- pythonfmu3/pythonfmu-export/build/CMakeFiles/3.24.0/CompilerIdC/Debug/CompilerIdC.tlog/CL.command.1.tlog +0 -0
- pythonfmu3/pythonfmu-export/build/CMakeFiles/3.24.0/CompilerIdC/Debug/CompilerIdC.tlog/CL.read.1.tlog +0 -0
- pythonfmu3/pythonfmu-export/build/CMakeFiles/3.24.0/CompilerIdC/Debug/CompilerIdC.tlog/CL.write.1.tlog +0 -0
- pythonfmu3/pythonfmu-export/build/CMakeFiles/3.24.0/CompilerIdC/Debug/CompilerIdC.tlog/CompilerIdC.lastbuildstate +2 -0
- pythonfmu3/pythonfmu-export/build/CMakeFiles/3.24.0/CompilerIdC/Debug/CompilerIdC.tlog/link.command.1.tlog +0 -0
- pythonfmu3/pythonfmu-export/build/CMakeFiles/3.24.0/CompilerIdC/Debug/CompilerIdC.tlog/link.read.1.tlog +0 -0
- pythonfmu3/pythonfmu-export/build/CMakeFiles/3.24.0/CompilerIdC/Debug/CompilerIdC.tlog/link.write.1.tlog +0 -0
- pythonfmu3/pythonfmu-export/build/CMakeFiles/3.24.0/CompilerIdCXX/CMakeCXXCompilerId.cpp +826 -0
- pythonfmu3/pythonfmu-export/build/CMakeFiles/3.24.0/CompilerIdCXX/CompilerIdCXX.exe +0 -0
- pythonfmu3/pythonfmu-export/build/CMakeFiles/3.24.0/CompilerIdCXX/CompilerIdCXX.vcxproj +71 -0
- pythonfmu3/pythonfmu-export/build/CMakeFiles/3.24.0/CompilerIdCXX/Debug/CMakeCXXCompilerId.obj +0 -0
- pythonfmu3/pythonfmu-export/build/CMakeFiles/3.24.0/CompilerIdCXX/Debug/CompilerIdCXX.exe.recipe +11 -0
- pythonfmu3/pythonfmu-export/build/CMakeFiles/3.24.0/CompilerIdCXX/Debug/CompilerIdCXX.tlog/CL.command.1.tlog +0 -0
- pythonfmu3/pythonfmu-export/build/CMakeFiles/3.24.0/CompilerIdCXX/Debug/CompilerIdCXX.tlog/CL.read.1.tlog +0 -0
- pythonfmu3/pythonfmu-export/build/CMakeFiles/3.24.0/CompilerIdCXX/Debug/CompilerIdCXX.tlog/CL.write.1.tlog +0 -0
- pythonfmu3/pythonfmu-export/build/CMakeFiles/3.24.0/CompilerIdCXX/Debug/CompilerIdCXX.tlog/CompilerIdCXX.lastbuildstate +2 -0
- pythonfmu3/pythonfmu-export/build/CMakeFiles/3.24.0/CompilerIdCXX/Debug/CompilerIdCXX.tlog/link.command.1.tlog +0 -0
- pythonfmu3/pythonfmu-export/build/CMakeFiles/3.24.0/CompilerIdCXX/Debug/CompilerIdCXX.tlog/link.read.1.tlog +0 -0
- pythonfmu3/pythonfmu-export/build/CMakeFiles/3.24.0/CompilerIdCXX/Debug/CompilerIdCXX.tlog/link.write.1.tlog +0 -0
- pythonfmu3/pythonfmu-export/build/CMakeFiles/3.24.0/VCTargetsPath.txt +1 -0
- pythonfmu3/pythonfmu-export/build/CMakeFiles/3.24.0/VCTargetsPath.vcxproj +31 -0
- pythonfmu3/pythonfmu-export/build/CMakeFiles/3.24.0/x64/Debug/VCTargetsPath.recipe +11 -0
- pythonfmu3/pythonfmu-export/build/CMakeFiles/3.24.0/x64/Debug/VCTargetsPath.tlog/VCTargetsPath.lastbuildstate +2 -0
- pythonfmu3/pythonfmu-export/build/CMakeFiles/3.30.2/CMakeCCompiler.cmake +81 -0
- pythonfmu3/pythonfmu-export/build/CMakeFiles/3.30.2/CMakeCXXCompiler.cmake +101 -0
- pythonfmu3/pythonfmu-export/build/CMakeFiles/3.30.2/CMakeDetermineCompilerABI_C.bin +0 -0
- pythonfmu3/pythonfmu-export/build/CMakeFiles/3.30.2/CMakeDetermineCompilerABI_CXX.bin +0 -0
- pythonfmu3/pythonfmu-export/build/CMakeFiles/3.30.2/CMakeRCCompiler.cmake +6 -0
- pythonfmu3/pythonfmu-export/build/CMakeFiles/3.30.2/CMakeSystem.cmake +15 -0
- pythonfmu3/pythonfmu-export/build/CMakeFiles/3.30.2/CompilerIdC/CMakeCCompilerId.c +904 -0
- pythonfmu3/pythonfmu-export/build/CMakeFiles/3.30.2/CompilerIdC/CompilerIdC.exe +0 -0
- pythonfmu3/pythonfmu-export/build/CMakeFiles/3.30.2/CompilerIdC/CompilerIdC.vcxproj +72 -0
- pythonfmu3/pythonfmu-export/build/CMakeFiles/3.30.2/CompilerIdC/Debug/CMakeCCompilerId.obj +0 -0
- pythonfmu3/pythonfmu-export/build/CMakeFiles/3.30.2/CompilerIdC/Debug/CompilerIdC.exe.recipe +11 -0
- pythonfmu3/pythonfmu-export/build/CMakeFiles/3.30.2/CompilerIdC/Debug/CompilerIdC.tlog/CL.command.1.tlog +0 -0
- pythonfmu3/pythonfmu-export/build/CMakeFiles/3.30.2/CompilerIdC/Debug/CompilerIdC.tlog/CL.read.1.tlog +0 -0
- pythonfmu3/pythonfmu-export/build/CMakeFiles/3.30.2/CompilerIdC/Debug/CompilerIdC.tlog/CL.write.1.tlog +0 -0
- pythonfmu3/pythonfmu-export/build/CMakeFiles/3.30.2/CompilerIdC/Debug/CompilerIdC.tlog/CompilerIdC.lastbuildstate +2 -0
- pythonfmu3/pythonfmu-export/build/CMakeFiles/3.30.2/CompilerIdC/Debug/CompilerIdC.tlog/link.command.1.tlog +0 -0
- pythonfmu3/pythonfmu-export/build/CMakeFiles/3.30.2/CompilerIdC/Debug/CompilerIdC.tlog/link.read.1.tlog +0 -0
- pythonfmu3/pythonfmu-export/build/CMakeFiles/3.30.2/CompilerIdC/Debug/CompilerIdC.tlog/link.write.1.tlog +0 -0
- pythonfmu3/pythonfmu-export/build/CMakeFiles/3.30.2/CompilerIdCXX/CMakeCXXCompilerId.cpp +919 -0
- pythonfmu3/pythonfmu-export/build/CMakeFiles/3.30.2/CompilerIdCXX/CompilerIdCXX.exe +0 -0
- pythonfmu3/pythonfmu-export/build/CMakeFiles/3.30.2/CompilerIdCXX/CompilerIdCXX.vcxproj +72 -0
- pythonfmu3/pythonfmu-export/build/CMakeFiles/3.30.2/CompilerIdCXX/Debug/CMakeCXXCompilerId.obj +0 -0
- pythonfmu3/pythonfmu-export/build/CMakeFiles/3.30.2/CompilerIdCXX/Debug/CompilerIdCXX.exe.recipe +11 -0
- pythonfmu3/pythonfmu-export/build/CMakeFiles/3.30.2/CompilerIdCXX/Debug/CompilerIdCXX.tlog/CL.command.1.tlog +0 -0
- pythonfmu3/pythonfmu-export/build/CMakeFiles/3.30.2/CompilerIdCXX/Debug/CompilerIdCXX.tlog/CL.read.1.tlog +0 -0
- pythonfmu3/pythonfmu-export/build/CMakeFiles/3.30.2/CompilerIdCXX/Debug/CompilerIdCXX.tlog/CL.write.1.tlog +0 -0
- pythonfmu3/pythonfmu-export/build/CMakeFiles/3.30.2/CompilerIdCXX/Debug/CompilerIdCXX.tlog/CompilerIdCXX.lastbuildstate +2 -0
- pythonfmu3/pythonfmu-export/build/CMakeFiles/3.30.2/CompilerIdCXX/Debug/CompilerIdCXX.tlog/link.command.1.tlog +0 -0
- pythonfmu3/pythonfmu-export/build/CMakeFiles/3.30.2/CompilerIdCXX/Debug/CompilerIdCXX.tlog/link.read.1.tlog +0 -0
- pythonfmu3/pythonfmu-export/build/CMakeFiles/3.30.2/CompilerIdCXX/Debug/CompilerIdCXX.tlog/link.write.1.tlog +0 -0
- pythonfmu3/pythonfmu-export/build/CMakeFiles/3.30.2/VCTargetsPath.txt +1 -0
- pythonfmu3/pythonfmu-export/build/CMakeFiles/3.30.2/VCTargetsPath.vcxproj +31 -0
- pythonfmu3/pythonfmu-export/build/CMakeFiles/3.30.2/x64/Debug/VCTargetsPath.recipe +11 -0
- pythonfmu3/pythonfmu-export/build/CMakeFiles/3.30.2/x64/Debug/VCTargetsPath.tlog/VCTargetsPath.lastbuildstate +2 -0
- pythonfmu3/pythonfmu-export/build/CMakeFiles/CMakeConfigureLog.yaml +568 -0
- pythonfmu3/pythonfmu-export/build/CMakeFiles/CMakeOutput.log +357 -0
- pythonfmu3/pythonfmu-export/build/CMakeFiles/TargetDirectories.txt +3 -0
- pythonfmu3/pythonfmu-export/build/CMakeFiles/cmake.check_cache +1 -0
- pythonfmu3/pythonfmu-export/build/CMakeFiles/generate.stamp +1 -0
- pythonfmu3/pythonfmu-export/build/CMakeFiles/generate.stamp.depend +28 -0
- pythonfmu3/pythonfmu-export/build/CMakeFiles/generate.stamp.list +2 -0
- pythonfmu3/pythonfmu-export/build/ZERO_CHECK.vcxproj +174 -0
- pythonfmu3/pythonfmu-export/build/ZERO_CHECK.vcxproj.filters +13 -0
- pythonfmu3/pythonfmu-export/build/cmake_install.cmake +50 -0
- pythonfmu3/pythonfmu-export/build/install_manifest.txt +0 -0
- pythonfmu3/pythonfmu-export/build/pythonfmu-export.sln +53 -0
- pythonfmu3/pythonfmu-export/build/src/CMakeFiles/generate.stamp +1 -0
- pythonfmu3/pythonfmu-export/build/src/CMakeFiles/generate.stamp.depend +2 -0
- pythonfmu3/pythonfmu-export/build/src/Debug/pythonfmu-export.pdb +0 -0
- pythonfmu3/pythonfmu-export/build/src/Release/pythonfmu-export.exp +0 -0
- pythonfmu3/pythonfmu-export/build/src/Release/pythonfmu-export.lib +0 -0
- pythonfmu3/pythonfmu-export/build/src/cmake_install.cmake +34 -0
- pythonfmu3/pythonfmu-export/build/src/pythonfmu-export.dir/Debug/PySlaveInstance.obj +0 -0
- pythonfmu3/pythonfmu-export/build/src/pythonfmu-export.dir/Debug/cppfmu_cs.obj +0 -0
- pythonfmu3/pythonfmu-export/build/src/pythonfmu-export.dir/Debug/exports.def +1885 -0
- pythonfmu3/pythonfmu-export/build/src/pythonfmu-export.dir/Debug/fmi_functions.obj +0 -0
- pythonfmu3/pythonfmu-export/build/src/pythonfmu-export.dir/Debug/objects.txt +3 -0
- pythonfmu3/pythonfmu-export/build/src/pythonfmu-export.dir/Debug/pythonfmu-export.tlog/CL.command.1.tlog +0 -0
- pythonfmu3/pythonfmu-export/build/src/pythonfmu-export.dir/Debug/pythonfmu-export.tlog/CL.read.1.tlog +0 -0
- pythonfmu3/pythonfmu-export/build/src/pythonfmu-export.dir/Debug/pythonfmu-export.tlog/CL.write.1.tlog +0 -0
- pythonfmu3/pythonfmu-export/build/src/pythonfmu-export.dir/Debug/pythonfmu-export.tlog/CustomBuild.command.1.tlog +10 -0
- pythonfmu3/pythonfmu-export/build/src/pythonfmu-export.dir/Debug/pythonfmu-export.tlog/CustomBuild.read.1.tlog +1 -0
- pythonfmu3/pythonfmu-export/build/src/pythonfmu-export.dir/Debug/pythonfmu-export.tlog/CustomBuild.write.1.tlog +2 -0
- pythonfmu3/pythonfmu-export/build/src/pythonfmu-export.dir/Debug/pythonfmu-export.tlog/link.command.1.tlog +1 -0
- pythonfmu3/pythonfmu-export/build/src/pythonfmu-export.dir/Debug/pythonfmu-export.tlog/link.read.1.tlog +1 -0
- pythonfmu3/pythonfmu-export/build/src/pythonfmu-export.dir/Debug/pythonfmu-export.tlog/link.read.3.tlog +1 -0
- pythonfmu3/pythonfmu-export/build/src/pythonfmu-export.dir/Debug/pythonfmu-export.tlog/link.write.1.tlog +1 -0
- pythonfmu3/pythonfmu-export/build/src/pythonfmu-export.dir/Debug/pythonfmu-export.tlog/pythonfmu-export.lastbuildstate +2 -0
- pythonfmu3/pythonfmu-export/build/src/pythonfmu-export.dir/Debug/pythonfmu-export.tlog/unsuccessfulbuild +0 -0
- pythonfmu3/pythonfmu-export/build/src/pythonfmu-export.dir/Debug/vc142.pdb +0 -0
- pythonfmu3/pythonfmu-export/build/src/pythonfmu-export.dir/MinSizeRel/objects.txt +3 -0
- pythonfmu3/pythonfmu-export/build/src/pythonfmu-export.dir/RelWithDebInfo/objects.txt +3 -0
- pythonfmu3/pythonfmu-export/build/src/pythonfmu-export.dir/Release/PySlaveInstance.obj +0 -0
- pythonfmu3/pythonfmu-export/build/src/pythonfmu-export.dir/Release/cppfmu_cs.obj +0 -0
- pythonfmu3/pythonfmu-export/build/src/pythonfmu-export.dir/Release/exports.def +538 -0
- pythonfmu3/pythonfmu-export/build/src/pythonfmu-export.dir/Release/fmi_functions.obj +0 -0
- pythonfmu3/pythonfmu-export/build/src/pythonfmu-export.dir/Release/objects.txt +3 -0
- pythonfmu3/pythonfmu-export/build/src/pythonfmu-export.dir/Release/pythonfmu-export.dll.recipe +14 -0
- pythonfmu3/pythonfmu-export/build/src/pythonfmu-export.dir/Release/pythonfmu-export.tlog/CL.command.1.tlog +0 -0
- pythonfmu3/pythonfmu-export/build/src/pythonfmu-export.dir/Release/pythonfmu-export.tlog/CL.read.1.tlog +0 -0
- pythonfmu3/pythonfmu-export/build/src/pythonfmu-export.dir/Release/pythonfmu-export.tlog/CL.write.1.tlog +0 -0
- pythonfmu3/pythonfmu-export/build/src/pythonfmu-export.dir/Release/pythonfmu-export.tlog/CustomBuild.command.1.tlog +10 -0
- pythonfmu3/pythonfmu-export/build/src/pythonfmu-export.dir/Release/pythonfmu-export.tlog/CustomBuild.read.1.tlog +1 -0
- pythonfmu3/pythonfmu-export/build/src/pythonfmu-export.dir/Release/pythonfmu-export.tlog/CustomBuild.write.1.tlog +2 -0
- pythonfmu3/pythonfmu-export/build/src/pythonfmu-export.dir/Release/pythonfmu-export.tlog/link.command.1.tlog +0 -0
- pythonfmu3/pythonfmu-export/build/src/pythonfmu-export.dir/Release/pythonfmu-export.tlog/link.delete.1.tlog +0 -0
- pythonfmu3/pythonfmu-export/build/src/pythonfmu-export.dir/Release/pythonfmu-export.tlog/link.read.1.tlog +0 -0
- pythonfmu3/pythonfmu-export/build/src/pythonfmu-export.dir/Release/pythonfmu-export.tlog/link.write.1.tlog +0 -0
- pythonfmu3/pythonfmu-export/build/src/pythonfmu-export.dir/Release/pythonfmu-export.tlog/pythonfmu-export.lastbuildstate +2 -0
- pythonfmu3/pythonfmu-export/build/src/pythonfmu-export.dir/Release/pythonfmu-export.tlog/pythonfmu-export.write.1u.tlog +0 -0
- pythonfmu3/pythonfmu-export/build/src/pythonfmu-export.vcxproj +414 -0
- pythonfmu3/pythonfmu-export/build/src/pythonfmu-export.vcxproj.filters +48 -0
- pythonfmu3/pythonfmu-export/build/x64/Debug/ZERO_CHECK/ZERO_CHECK.recipe +11 -0
- pythonfmu3/pythonfmu-export/build/x64/Debug/ZERO_CHECK/ZERO_CHECK.tlog/CustomBuild.command.1.tlog +10 -0
- pythonfmu3/pythonfmu-export/build/x64/Debug/ZERO_CHECK/ZERO_CHECK.tlog/CustomBuild.read.1.tlog +29 -0
- pythonfmu3/pythonfmu-export/build/x64/Debug/ZERO_CHECK/ZERO_CHECK.tlog/CustomBuild.write.1.tlog +3 -0
- pythonfmu3/pythonfmu-export/build/x64/Debug/ZERO_CHECK/ZERO_CHECK.tlog/ZERO_CHECK.lastbuildstate +2 -0
- pythonfmu3/pythonfmu-export/build/x64/Release/ALL_BUILD/ALL_BUILD.recipe +17 -0
- pythonfmu3/pythonfmu-export/build/x64/Release/ALL_BUILD/ALL_BUILD.tlog/ALL_BUILD.lastbuildstate +2 -0
- pythonfmu3/pythonfmu-export/build/x64/Release/ALL_BUILD/ALL_BUILD.tlog/CustomBuild.command.1.tlog +10 -0
- pythonfmu3/pythonfmu-export/build/x64/Release/ALL_BUILD/ALL_BUILD.tlog/CustomBuild.read.1.tlog +27 -0
- pythonfmu3/pythonfmu-export/build/x64/Release/ALL_BUILD/ALL_BUILD.tlog/CustomBuild.write.1.tlog +2 -0
- pythonfmu3/pythonfmu-export/build/x64/Release/ZERO_CHECK/ZERO_CHECK.recipe +11 -0
- pythonfmu3/pythonfmu-export/build/x64/Release/ZERO_CHECK/ZERO_CHECK.tlog/CustomBuild.command.1.tlog +10 -0
- pythonfmu3/pythonfmu-export/build/x64/Release/ZERO_CHECK/ZERO_CHECK.tlog/CustomBuild.read.1.tlog +29 -0
- pythonfmu3/pythonfmu-export/build/x64/Release/ZERO_CHECK/ZERO_CHECK.tlog/CustomBuild.write.1.tlog +3 -0
- pythonfmu3/pythonfmu-export/build/x64/Release/ZERO_CHECK/ZERO_CHECK.tlog/ZERO_CHECK.lastbuildstate +2 -0
- pythonfmu3/pythonfmu-export/build_unix.sh +4 -4
- pythonfmu3/pythonfmu-export/build_win.sh +4 -4
- pythonfmu3/pythonfmu-export/src/CMakeLists.txt +45 -45
- pythonfmu3/pythonfmu-export/src/cppfmu/cppfmu_common.hpp +161 -161
- pythonfmu3/pythonfmu-export/src/cppfmu/cppfmu_cs.cpp +192 -192
- pythonfmu3/pythonfmu-export/src/cppfmu/cppfmu_cs.hpp +185 -185
- pythonfmu3/pythonfmu-export/src/cppfmu/fmi_functions.cpp +937 -937
- pythonfmu3/pythonfmu-export/src/fmi/fmi3FunctionTypes.h +638 -638
- pythonfmu3/pythonfmu-export/src/fmi/fmi3Functions.h +343 -343
- pythonfmu3/pythonfmu-export/src/fmi/fmi3PlatformTypes.h +94 -94
- pythonfmu3/pythonfmu-export/src/pythonfmu/IPyState.hpp +17 -17
- pythonfmu3/pythonfmu-export/src/pythonfmu/PySlaveInstance.cpp +744 -744
- pythonfmu3/pythonfmu-export/src/pythonfmu/PySlaveInstance.hpp +111 -111
- pythonfmu3/pythonfmu-export/src/pythonfmu/PyState.hpp +84 -84
- pythonfmu3/resources/binaries/x86_64-linux/libpythonfmu-export.so +0 -0
- pythonfmu3/resources/binaries/x86_64-windows/pythonfmu-export.dll +0 -0
- pythonfmu3/resources/binaries/x86_64-windows1/pythonfmu-export.dll +0 -0
- pythonfmu3/tests/conftest.py +5 -5
- pythonfmu3/tests/data/csvdemo.csv +7 -7
- pythonfmu3/tests/slaves/PythonSlaveWithException.py +18 -18
- pythonfmu3/tests/slaves/localmodule.py +8 -8
- pythonfmu3/tests/slaves/pythonslave.py +52 -52
- pythonfmu3/tests/slaves/pythonslave_read_file.py +23 -23
- pythonfmu3/tests/slaves/slavewithdep.py +21 -21
- pythonfmu3/tests/test_builder.py +195 -195
- pythonfmu3/tests/test_deploy.py +48 -48
- pythonfmu3/tests/test_fmi3slave.py +152 -152
- pythonfmu3/tests/test_integration.py +350 -350
- pythonfmu3/tests/test_logger.py +180 -180
- pythonfmu3/tests/test_multiple_fmus.py +141 -141
- pythonfmu3/tests/test_variables.py +334 -334
- pythonfmu3/tests/utils.py +13 -13
- pythonfmu3/unit.py +62 -62
- pythonfmu3/variable_types.py +101 -101
- pythonfmu3/variables.py +400 -400
- pythonfmu3-0.2.2.dist-info/LICENSE → pythonfmu3-0.2.2.2.dist-info/LICENSE.txt +23 -23
- {pythonfmu3-0.2.2.dist-info → pythonfmu3-0.2.2.2.dist-info}/METADATA +9 -6
- pythonfmu3-0.2.2.2.dist-info/RECORD +200 -0
- {pythonfmu3-0.2.2.dist-info → pythonfmu3-0.2.2.2.dist-info}/WHEEL +1 -1
- {pythonfmu3-0.2.2.dist-info → pythonfmu3-0.2.2.2.dist-info}/entry_points.txt +1 -0
- pythonfmu3-0.2.2.dist-info/RECORD +0 -54
- {pythonfmu3-0.2.2.dist-info → pythonfmu3-0.2.2.2.dist-info}/top_level.txt +0 -0
pythonfmu3/deploy.py
CHANGED
|
@@ -1,118 +1,118 @@
|
|
|
1
|
-
"""CLI command to deploy a FMU."""
|
|
2
|
-
import argparse
|
|
3
|
-
import os
|
|
4
|
-
import subprocess
|
|
5
|
-
import sys
|
|
6
|
-
import zipfile
|
|
7
|
-
from pathlib import Path
|
|
8
|
-
from tempfile import TemporaryDirectory
|
|
9
|
-
from typing import Union
|
|
10
|
-
|
|
11
|
-
from .enums import PackageManager
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
# Dictionary of ("default file name", "associated package manager")
|
|
15
|
-
ENVIRONMENT_FILES = {
|
|
16
|
-
"requirements.txt": PackageManager.pip,
|
|
17
|
-
"environment.yaml": PackageManager.conda,
|
|
18
|
-
"environment.yml": PackageManager.conda
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
def deploy(
|
|
23
|
-
fmu: Union[str, Path],
|
|
24
|
-
environment: Union[str, Path, None] = None,
|
|
25
|
-
package_manager: Union[str, PackageManager, None] = None
|
|
26
|
-
) -> None:
|
|
27
|
-
"""Install Python dependency packages from requirement file shipped within the FMU.
|
|
28
|
-
|
|
29
|
-
Args:
|
|
30
|
-
fmu (str or pathlib.Path) : FMU file path
|
|
31
|
-
environment (str or pathlib.Path) : optional, requirements file within the `resources` folder of the FMU
|
|
32
|
-
package_manager (str) : optional, Python package manager
|
|
33
|
-
"""
|
|
34
|
-
fmu = Path(fmu)
|
|
35
|
-
manager = None
|
|
36
|
-
if package_manager is not None:
|
|
37
|
-
manager = PackageManager(package_manager)
|
|
38
|
-
|
|
39
|
-
env_content = None
|
|
40
|
-
environment_file = None
|
|
41
|
-
with zipfile.ZipFile(fmu) as files:
|
|
42
|
-
names = files.namelist()
|
|
43
|
-
|
|
44
|
-
environment_file = None
|
|
45
|
-
if environment is None:
|
|
46
|
-
for spec in ENVIRONMENT_FILES:
|
|
47
|
-
test = Path("resources") / spec
|
|
48
|
-
if test.as_posix() in names:
|
|
49
|
-
environment_file = test
|
|
50
|
-
manager = manager or ENVIRONMENT_FILES[spec]
|
|
51
|
-
break
|
|
52
|
-
if environment_file is None:
|
|
53
|
-
raise ValueError("Unable to find requirement file in the FMU resources folder.")
|
|
54
|
-
else:
|
|
55
|
-
environment_file = Path("resources") / environment
|
|
56
|
-
if environment_file.as_posix() not in names:
|
|
57
|
-
raise ValueError(f"Unable to find requirement file {environment!s} in the FMU resources folder.")
|
|
58
|
-
|
|
59
|
-
if manager is None:
|
|
60
|
-
if environment in ENVIRONMENT_FILES:
|
|
61
|
-
manager = ENVIRONMENT_FILES[environment]
|
|
62
|
-
elif environment.endswith(".yaml") or environment.endswith(".yml"):
|
|
63
|
-
manager = PackageManager.conda
|
|
64
|
-
else:
|
|
65
|
-
manager = PackageManager.pip
|
|
66
|
-
|
|
67
|
-
with files.open(environment_file.as_posix(), mode="r") as env_file:
|
|
68
|
-
env_content = env_file.read()
|
|
69
|
-
|
|
70
|
-
with TemporaryDirectory() as tmp:
|
|
71
|
-
tempd = Path(tmp)
|
|
72
|
-
|
|
73
|
-
copy_env = tempd / environment_file.name
|
|
74
|
-
copy_env.write_bytes(env_content)
|
|
75
|
-
|
|
76
|
-
if manager == PackageManager.pip:
|
|
77
|
-
subprocess.run(
|
|
78
|
-
[sys.executable, "-m", "pip", "install", "-r", f"{copy_env!s}", "--progress-bar", "off"],
|
|
79
|
-
stdout=sys.stdout,
|
|
80
|
-
stderr=sys.stderr,
|
|
81
|
-
check=True
|
|
82
|
-
)
|
|
83
|
-
elif manager == PackageManager.conda:
|
|
84
|
-
conda_exe = os.environ.get("CONDA_EXE", "conda")
|
|
85
|
-
subprocess.run(
|
|
86
|
-
[conda_exe, "env", "update", f"--file={copy_env!s}", "--quiet"],
|
|
87
|
-
stdout=sys.stdout,
|
|
88
|
-
stderr=sys.stderr,
|
|
89
|
-
check=True
|
|
90
|
-
)
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
def create_command_parser(parser: argparse.ArgumentParser):
|
|
94
|
-
|
|
95
|
-
parser.add_argument(
|
|
96
|
-
"-f",
|
|
97
|
-
"--file",
|
|
98
|
-
dest="fmu",
|
|
99
|
-
help="Path to the Python FMU.",
|
|
100
|
-
required=True
|
|
101
|
-
)
|
|
102
|
-
|
|
103
|
-
parser.add_argument(
|
|
104
|
-
"-e",
|
|
105
|
-
"--env",
|
|
106
|
-
dest="environment",
|
|
107
|
-
help="Requirements or environment file.",
|
|
108
|
-
default=None
|
|
109
|
-
)
|
|
110
|
-
|
|
111
|
-
parser.add_argument(
|
|
112
|
-
choices=["pip", "conda"],
|
|
113
|
-
dest="package_manager",
|
|
114
|
-
nargs='?',
|
|
115
|
-
help="Python packages manager"
|
|
116
|
-
)
|
|
117
|
-
|
|
118
|
-
parser.set_defaults(execute=deploy)
|
|
1
|
+
"""CLI command to deploy a FMU."""
|
|
2
|
+
import argparse
|
|
3
|
+
import os
|
|
4
|
+
import subprocess
|
|
5
|
+
import sys
|
|
6
|
+
import zipfile
|
|
7
|
+
from pathlib import Path
|
|
8
|
+
from tempfile import TemporaryDirectory
|
|
9
|
+
from typing import Union
|
|
10
|
+
|
|
11
|
+
from .enums import PackageManager
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
# Dictionary of ("default file name", "associated package manager")
|
|
15
|
+
ENVIRONMENT_FILES = {
|
|
16
|
+
"requirements.txt": PackageManager.pip,
|
|
17
|
+
"environment.yaml": PackageManager.conda,
|
|
18
|
+
"environment.yml": PackageManager.conda
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
def deploy(
|
|
23
|
+
fmu: Union[str, Path],
|
|
24
|
+
environment: Union[str, Path, None] = None,
|
|
25
|
+
package_manager: Union[str, PackageManager, None] = None
|
|
26
|
+
) -> None:
|
|
27
|
+
"""Install Python dependency packages from requirement file shipped within the FMU.
|
|
28
|
+
|
|
29
|
+
Args:
|
|
30
|
+
fmu (str or pathlib.Path) : FMU file path
|
|
31
|
+
environment (str or pathlib.Path) : optional, requirements file within the `resources` folder of the FMU
|
|
32
|
+
package_manager (str) : optional, Python package manager
|
|
33
|
+
"""
|
|
34
|
+
fmu = Path(fmu)
|
|
35
|
+
manager = None
|
|
36
|
+
if package_manager is not None:
|
|
37
|
+
manager = PackageManager(package_manager)
|
|
38
|
+
|
|
39
|
+
env_content = None
|
|
40
|
+
environment_file = None
|
|
41
|
+
with zipfile.ZipFile(fmu) as files:
|
|
42
|
+
names = files.namelist()
|
|
43
|
+
|
|
44
|
+
environment_file = None
|
|
45
|
+
if environment is None:
|
|
46
|
+
for spec in ENVIRONMENT_FILES:
|
|
47
|
+
test = Path("resources") / spec
|
|
48
|
+
if test.as_posix() in names:
|
|
49
|
+
environment_file = test
|
|
50
|
+
manager = manager or ENVIRONMENT_FILES[spec]
|
|
51
|
+
break
|
|
52
|
+
if environment_file is None:
|
|
53
|
+
raise ValueError("Unable to find requirement file in the FMU resources folder.")
|
|
54
|
+
else:
|
|
55
|
+
environment_file = Path("resources") / environment
|
|
56
|
+
if environment_file.as_posix() not in names:
|
|
57
|
+
raise ValueError(f"Unable to find requirement file {environment!s} in the FMU resources folder.")
|
|
58
|
+
|
|
59
|
+
if manager is None:
|
|
60
|
+
if environment in ENVIRONMENT_FILES:
|
|
61
|
+
manager = ENVIRONMENT_FILES[environment]
|
|
62
|
+
elif environment.endswith(".yaml") or environment.endswith(".yml"):
|
|
63
|
+
manager = PackageManager.conda
|
|
64
|
+
else:
|
|
65
|
+
manager = PackageManager.pip
|
|
66
|
+
|
|
67
|
+
with files.open(environment_file.as_posix(), mode="r") as env_file:
|
|
68
|
+
env_content = env_file.read()
|
|
69
|
+
|
|
70
|
+
with TemporaryDirectory() as tmp:
|
|
71
|
+
tempd = Path(tmp)
|
|
72
|
+
|
|
73
|
+
copy_env = tempd / environment_file.name
|
|
74
|
+
copy_env.write_bytes(env_content)
|
|
75
|
+
|
|
76
|
+
if manager == PackageManager.pip:
|
|
77
|
+
subprocess.run(
|
|
78
|
+
[sys.executable, "-m", "pip", "install", "-r", f"{copy_env!s}", "--progress-bar", "off"],
|
|
79
|
+
stdout=sys.stdout,
|
|
80
|
+
stderr=sys.stderr,
|
|
81
|
+
check=True
|
|
82
|
+
)
|
|
83
|
+
elif manager == PackageManager.conda:
|
|
84
|
+
conda_exe = os.environ.get("CONDA_EXE", "conda")
|
|
85
|
+
subprocess.run(
|
|
86
|
+
[conda_exe, "env", "update", f"--file={copy_env!s}", "--quiet"],
|
|
87
|
+
stdout=sys.stdout,
|
|
88
|
+
stderr=sys.stderr,
|
|
89
|
+
check=True
|
|
90
|
+
)
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
def create_command_parser(parser: argparse.ArgumentParser):
|
|
94
|
+
|
|
95
|
+
parser.add_argument(
|
|
96
|
+
"-f",
|
|
97
|
+
"--file",
|
|
98
|
+
dest="fmu",
|
|
99
|
+
help="Path to the Python FMU.",
|
|
100
|
+
required=True
|
|
101
|
+
)
|
|
102
|
+
|
|
103
|
+
parser.add_argument(
|
|
104
|
+
"-e",
|
|
105
|
+
"--env",
|
|
106
|
+
dest="environment",
|
|
107
|
+
help="Requirements or environment file.",
|
|
108
|
+
default=None
|
|
109
|
+
)
|
|
110
|
+
|
|
111
|
+
parser.add_argument(
|
|
112
|
+
choices=["pip", "conda"],
|
|
113
|
+
dest="package_manager",
|
|
114
|
+
nargs='?',
|
|
115
|
+
help="Python packages manager"
|
|
116
|
+
)
|
|
117
|
+
|
|
118
|
+
parser.set_defaults(execute=deploy)
|
pythonfmu3/enums.py
CHANGED
|
@@ -1,48 +1,48 @@
|
|
|
1
|
-
"""FMI enumerations"""
|
|
2
|
-
from enum import Enum, IntEnum
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
class Fmi3Type(Enum):
|
|
6
|
-
integer = 0
|
|
7
|
-
real = 1
|
|
8
|
-
boolean = 2
|
|
9
|
-
string = 3
|
|
10
|
-
enumeration = 4
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
class Fmi3Causality(Enum):
|
|
14
|
-
parameter = 0
|
|
15
|
-
calculatedParameter = 1
|
|
16
|
-
input = 2
|
|
17
|
-
output = 3
|
|
18
|
-
local = 4
|
|
19
|
-
independent = 5
|
|
20
|
-
structuralParameter = 6
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
class Fmi3Initial(Enum):
|
|
24
|
-
exact = 0
|
|
25
|
-
approx = 1
|
|
26
|
-
calculated = 2
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
class Fmi3Variability(Enum):
|
|
30
|
-
constant = 0
|
|
31
|
-
fixed = 1
|
|
32
|
-
tunable = 2
|
|
33
|
-
discrete = 3
|
|
34
|
-
continuous = 4
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
class Fmi3Status(IntEnum):
|
|
38
|
-
ok = 0
|
|
39
|
-
warning = 1
|
|
40
|
-
discard = 2
|
|
41
|
-
error = 3
|
|
42
|
-
fatal = 4
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
class PackageManager(Enum):
|
|
46
|
-
"""Enumeration of Python packages manager."""
|
|
47
|
-
pip = "pip"
|
|
48
|
-
conda = "conda"
|
|
1
|
+
"""FMI enumerations"""
|
|
2
|
+
from enum import Enum, IntEnum
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
class Fmi3Type(Enum):
|
|
6
|
+
integer = 0
|
|
7
|
+
real = 1
|
|
8
|
+
boolean = 2
|
|
9
|
+
string = 3
|
|
10
|
+
enumeration = 4
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class Fmi3Causality(Enum):
|
|
14
|
+
parameter = 0
|
|
15
|
+
calculatedParameter = 1
|
|
16
|
+
input = 2
|
|
17
|
+
output = 3
|
|
18
|
+
local = 4
|
|
19
|
+
independent = 5
|
|
20
|
+
structuralParameter = 6
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
class Fmi3Initial(Enum):
|
|
24
|
+
exact = 0
|
|
25
|
+
approx = 1
|
|
26
|
+
calculated = 2
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
class Fmi3Variability(Enum):
|
|
30
|
+
constant = 0
|
|
31
|
+
fixed = 1
|
|
32
|
+
tunable = 2
|
|
33
|
+
discrete = 3
|
|
34
|
+
continuous = 4
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
class Fmi3Status(IntEnum):
|
|
38
|
+
ok = 0
|
|
39
|
+
warning = 1
|
|
40
|
+
discard = 2
|
|
41
|
+
error = 3
|
|
42
|
+
fatal = 4
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
class PackageManager(Enum):
|
|
46
|
+
"""Enumeration of Python packages manager."""
|
|
47
|
+
pip = "pip"
|
|
48
|
+
conda = "conda"
|