Skip to content

Commit

Permalink
Merge branch 'release/v0.2.14'
Browse files Browse the repository at this point in the history
  • Loading branch information
t-sommer committed Oct 23, 2019
2 parents e29ddf4 + e0037e5 commit c645eb6
Show file tree
Hide file tree
Showing 22 changed files with 895 additions and 402 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,12 @@ To learn more about how to use FMPy in you own scripts take a look at the
[custom_input.py](fmpy/examples/custom_input.py) and
[parameter_variation.py](fmpy/examples/parameter_variation.py) examples.

## Commercial Support

You're starting a project, need training or professional support?
Our partners at LTX Simulation are ready to help you.
Please send an e-mail to [email protected] for a quote.

------------------------------------

© 2018 Dassault Systèmes
7 changes: 4 additions & 3 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:

- bash: |
source activate myEnvironment
conda install --yes --quiet --name myEnvironment -c conda-forge python=$PYTHON_VERSION dask lxml matplotlib numpy pathlib pyqt pyqtgraph pytest-cov requests
conda install --yes --quiet --name myEnvironment -c conda-forge python=$PYTHON_VERSION dask lark-parser lxml matplotlib numpy pathlib pyqt pyqtgraph pytest-cov requests
displayName: Install Anaconda packages
- bash: |
Expand Down Expand Up @@ -76,7 +76,7 @@ jobs:

- bash: |
source activate myEnvironment
conda install --yes --quiet --name myEnvironment -c conda-forge python=$PYTHON_VERSION dask lxml matplotlib numpy pathlib pyqt pyqtgraph pytest-cov requests
conda install --yes --quiet --name myEnvironment -c conda-forge python=$PYTHON_VERSION dask lark-parser lxml matplotlib numpy pathlib pyqt pyqtgraph pytest-cov requests
displayName: Install Anaconda packages
- bash: |
Expand Down Expand Up @@ -128,7 +128,7 @@ jobs:

- script: |
call activate myEnvironment
conda install --yes --quiet --name myEnvironment -c conda-forge python=%PYTHON_VERSION% cmake dask lxml matplotlib numpy pathlib pyqt pyqtgraph pytest-cov pywin32 requests
conda install --yes --quiet --name myEnvironment -c conda-forge python=%PYTHON_VERSION% cmake dask lark-parser lxml matplotlib numpy pathlib pyqt pyqtgraph pytest-cov pywin32 requests
displayName: Install Anaconda packages
- script: |
Expand All @@ -145,6 +145,7 @@ jobs:
inputs:
testResultsFiles: '**/test-*.xml'
testRunTitle: 'Publish test results for Python $(python.version)'
failTaskOnFailedTests: true

- task: PublishCodeCoverageResults@1
inputs:
Expand Down
12 changes: 12 additions & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
## v0.2.14 (2019-10-23)

Improved validation & --visible option for CLI

- `FIXED` "Load Start Values" only enabled when FMU can be simulated
- `NEW` --visible option in CLI
- `NEW` XML line numbers added to validation messages
- `NEW` validation of variables names for naming convention "structured"
- `IMPROVED` visible=fmi2True when simulating in GUI

## v0.2.13 (2019-09-16)

Extended FMI 3.0 alpha 2 support & improved GUI

- `NEW` check for illegal filenames in FMU archives
- `NEW` reload button in GUI
- `IMPROVED` extended FMI 3.0 alpha 2 support
Expand Down
15 changes: 8 additions & 7 deletions fmpy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from ctypes import *
import _ctypes

__version__ = '0.2.13'
__version__ = '0.2.14'


# determine the platform
Expand Down Expand Up @@ -62,27 +62,28 @@ def supported_platforms(filename):
""" Get the platforms supported by the FMU without extracting it
Parameters:
filename filename of the FMU or directory with extracted FMU
filename filename of the FMU, directory with extracted FMU or file like object
Returns:
platforms a list of supported platforms supported by the FMU
"""

import zipfile

platforms = []
from .util import _is_string

# get the files within the FMU
if os.path.isdir(filename):
if _is_string(filename) and os.path.isdir(filename): # extracted FMU
names = []
for dirpath, _, filenames in os.walk(filename):
for name in filenames:
abspath = os.path.join(dirpath, name)
names.append(os.path.relpath(abspath, start=filename).replace('\\', '/'))
else:
else: # FMU as path or file like object
import zipfile
with zipfile.ZipFile(filename, 'r') as zf:
names = zf.namelist()

platforms = []

# check for the C-sources
for name in names:
head, tail = os.path.split(name)
Expand Down
Loading

0 comments on commit c645eb6

Please sign in to comment.