Skip to content

Commit

Permalink
Merge 2597a61 into release
Browse files Browse the repository at this point in the history
  • Loading branch information
ClaasRostock authored Jan 18, 2025
2 parents dc16faf + 2597a61 commit dab5584
Show file tree
Hide file tree
Showing 68 changed files with 1,732 additions and 1,626 deletions.
4 changes: 4 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,7 @@
*.png -text
*.gif -text
*.ico -text

# Denote all files that are truly binary and should not be modified.
*.onnx binary
*.fmu binary
2 changes: 1 addition & 1 deletion .github/workflows/_build_and_publish_documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
with:
lfs: true
- name: Install uv
uses: astral-sh/setup-uv@v2
uses: astral-sh/setup-uv@v5
with:
enable-cache: true
cache-dependency-glob: "uv.lock"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/_build_package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
with:
lfs: true
- name: Install uv
uses: astral-sh/setup-uv@v2
uses: astral-sh/setup-uv@v5
with:
enable-cache: true
cache-dependency-glob: "uv.lock"
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/_code_quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v2
uses: astral-sh/setup-uv@v5
with:
enable-cache: true
cache-dependency-glob: "uv.lock"
Expand All @@ -28,7 +28,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v2
uses: astral-sh/setup-uv@v5
with:
enable-cache: true
cache-dependency-glob: "uv.lock"
Expand All @@ -47,7 +47,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v2
uses: astral-sh/setup-uv@v5
with:
enable-cache: true
cache-dependency-glob: "uv.lock"
Expand All @@ -66,7 +66,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v2
uses: astral-sh/setup-uv@v5
with:
enable-cache: true
cache-dependency-glob: "uv.lock"
Expand Down
15 changes: 7 additions & 8 deletions .github/workflows/_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,22 +16,21 @@ jobs:
- version: '3.10'
- version: '3.11'
- version: '3.12'
- version: '3.13'
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v2
uses: astral-sh/setup-uv@v5
with:
enable-cache: true
enable-cache: false
cache-dependency-glob: "uv.lock"
- name: Install Python ${{ matrix.python.version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python.version }}
- name: Install the project
run: uv sync --upgrade -p ${{ matrix.python.version }} --no-dev
- name: Install pytest
run: |
uv pip install pytest
uv pip install pytest-cov
run: uv sync -p ${{ matrix.python.version }} -U --no-dev
- name: Run pytest
run: uv run pytest --cov
run: >
uv run --with pytest --with pytest-cov
pytest --cov
24 changes: 11 additions & 13 deletions .github/workflows/_test_future.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name: Unit Tests (py313)
# Test also with Python 3.13 (experimental; workflow will not fail on error.)
name: Unit Tests (py314)
# Test also with Python 3.14 (experimental; workflow will not fail on error.)

on: workflow_call

jobs:
test313:
test314:
name: Test on ${{matrix.python.version}}-${{matrix.platform.runner}} (experimental)
continue-on-error: true
runs-on: ${{ matrix.platform.runner }}
Expand All @@ -14,24 +14,22 @@ jobs:
- runner: ubuntu-latest
- runner: windows-latest
python:
- version: '3.13.0-alpha - 3.13.0'
uvpy: '3.13'
- version: '3.14.0-alpha - 3.14.0'
uvpy: '3.14'
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v2
uses: astral-sh/setup-uv@v5
with:
enable-cache: true
enable-cache: false
cache-dependency-glob: "uv.lock"
- name: Install Python ${{ matrix.python.version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python.version }}
- name: Install the project
run: uv sync --upgrade -p ${{ matrix.python.uvpy }} --no-dev
- name: Install pytest
run: |
uv pip install pytest
uv pip install pytest-cov
run: uv sync -p ${{ matrix.python.uvpy }} -U --no-dev
- name: Run pytest
run: uv run pytest --cov
run: >
uv run --with pytest --with pytest-cov
pytest --cov
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -156,5 +156,8 @@ demos/**/*.log
demos/**/*.db
demos/**/*.nc

# Cmake generated files
CMakeUserPresets.json

# modules
modules.txt
modules.txt
12 changes: 6 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
rev: v5.0.0
hooks:
- id: mixed-line-ending
fix: auto
args: [--fix=auto]
- id: trailing-whitespace
- id: check-yaml
- id: check-toml
- id: check-merge-conflict
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.6.2
rev: v0.9.2
hooks:
- id: ruff
- id: ruff-format
- id: ruff
# - repo: https://github.com/pre-commit/mirrors-mypy
# rev: v1.9.0
# rev: v1.14.1
# hooks:
# - id: mypy
# exclude: tests/
exclude: '(.venv|.*_cache)/.*'
2 changes: 2 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
"sourcery.sourcery",
"njpwerner.autodocstring",
"editorconfig.editorconfig",
"ms-toolsai.jupyter",
"ms-toolsai.jupyter-renderers",
"ms-python.mypy-type-checker",
],
// List of extensions recommended by VS Code that should not be recommended for users of this workspace.
Expand Down
14 changes: 7 additions & 7 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"name": "ospCaseBuilder test_caseDict --inspect",
"type": "debugpy",
"request": "launch",
"cwd": "${workspaceFolder}\\tests\\test_dicts",
"cwd": "${workspaceFolder}\\tests\\test_working_directory",
"program": "${workspaceFolder}\\src\\ospx\\cli\\ospCaseBuilder.py",
"args": [
"test_caseDict",
Expand All @@ -65,7 +65,7 @@
"name": "ospCaseBuilder test_caseDict_minimal_inspect --inspect",
"type": "debugpy",
"request": "launch",
"cwd": "${workspaceFolder}\\tests\\test_dicts",
"cwd": "${workspaceFolder}\\tests\\test_working_directory",
"program": "${workspaceFolder}\\src\\ospx\\cli\\ospCaseBuilder.py",
"args": [
"test_caseDict_minimal_inspect",
Expand All @@ -81,7 +81,7 @@
"name": "importSystemStructure test_import_OspSystemStructure.xml",
"type": "debugpy",
"request": "launch",
"cwd": "${workspaceFolder}\\tests\\test_dicts",
"cwd": "${workspaceFolder}\\tests\\test_working_directory",
"program": "${workspaceFolder}\\src\\ospx\\cli\\importSystemStructure.py",
"args": [
"test_import_OspSystemStructure.xml",
Expand All @@ -96,7 +96,7 @@
"name": "ospCaseBuilder test_caseDict_imported_test_graph",
"type": "debugpy",
"request": "launch",
"cwd": "${workspaceFolder}\\tests\\test_dicts",
"cwd": "${workspaceFolder}\\tests\\test_working_directory",
"program": "${workspaceFolder}\\src\\ospx\\cli\\ospCaseBuilder.py",
"args": [
"test_caseDict_imported_test_graph",
Expand All @@ -112,7 +112,7 @@
"name": "ospCaseBuilder test_caseDict --graph",
"type": "debugpy",
"request": "launch",
"cwd": "${workspaceFolder}\\tests\\test_dicts",
"cwd": "${workspaceFolder}\\tests\\test_working_directory",
"program": "${workspaceFolder}\\src\\ospx\\cli\\ospCaseBuilder.py",
"args": [
"test_caseDict",
Expand All @@ -128,7 +128,7 @@
"name": "watchCosim test_caseDict",
"type": "debugpy",
"request": "launch",
"cwd": "${workspaceFolder}\\tests\\test_dicts",
"cwd": "${workspaceFolder}\\tests\\test_working_directory",
"program": "${workspaceFolder}\\src\\ospx\\watch\\cli\\watchCosim.py",
"args": [
"watchDict",
Expand All @@ -144,7 +144,7 @@
"name": "ospCaseBuilder test_caseDict_minimal_set_int_for_real",
"type": "debugpy",
"request": "launch",
"cwd": "${workspaceFolder}\\tests\\test_dicts",
"cwd": "${workspaceFolder}\\tests\\test_working_directory",
"program": "${workspaceFolder}\\src\\ospx\\cli\\ospCaseBuilder.py",
"args": [
"test_caseDict_minimal_set_int_for_real",
Expand Down
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,6 @@
],
"mypy-type-checker.importStrategy": "fromEnvironment",
"mypy-type-checker.reportingScope": "workspace",
"mypy-type-checker.preferDaemon": false,
"mypy-type-checker.preferDaemon": true,
"ruff.configurationPreference": "filesystemFirst",
}
36 changes: 34 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,37 @@ The changelog format is based on [Keep a Changelog](https://keepachangelog.com/e
-/-


## [0.3.1] - 2025-01-18

### Added
* Added support for Python 3.13
* Added CITATION.cff
* pyproject.toml : Added keywords

### Solved
* Resolved issues raised by `ruff` 0.9.2

### Dependencies
* Updated to ruff>=0.9.2 (from ruff>=0.6.3)
* Updated to pyright>=1.1.392 (from pyright>=1.1.378)
* Updated to sourcery>=1.31 (from sourcery>=1.22)
* Updated to lxml>=5.3 (from lxml>=5.2)
* Updated to types-lxml>=2024.12 (from types-lxml>=2024.4)
* Updated to matplotlib>=3.10 (from matplotlib>=3.9)
* Updated to dictIO>=0.4.1 (from dictIO>=0.4.0)
* Updated to Sphinx>=8.1 (from Sphinx>=8.0)
* Updated to sphinx-argparse-cli>=1.19 (from sphinx-argparse-cli>=1.17)
* Updated to sphinx-autodoc-typehints>=3.0 (from sphinx-autodoc-typehints>=2.2)
* Updated to mypy>=1.14 (from mypy>=1.11.1)
* Updated to setup-uv@v5 (from setup-uv@v2)
* Updated to jupyter>=1.1 (from jupyter>=1.0)
* Updated to pytest-cov>=6.0 (from pytest-cov>=5.0)
* Updated to pre-commit>=4.0 (from pre-commit>=3.8)
* numpy: As Python 3.13 requires numpy 2.x, made minimum required numpy version in pyproject.toml dependent on Python version:
* "numpy>=1.26; python_version < '3.13'",
* "numpy>=2.2; python_version >= '3.13'",


## [0.3.0] - 2024-11-11

### Breaking changes
Expand Down Expand Up @@ -438,8 +469,9 @@ Maintenance Release
* Added support for Python 3.10

<!-- Markdown link & img dfn's -->
[unreleased]: https://github.com/dnv-opensource/ospx/compare/v0.2.15...HEAD
[0.2.15]: https://github.com/dnv-opensource/ospx/compare/v0.2.14...v0.2.15
[unreleased]: https://github.com/dnv-opensource/ospx/compare/v0.3.1...HEAD
[0.3.1]: https://github.com/dnv-opensource/ospx/compare/v0.3.0...v0.3.1
[0.3.0]: https://github.com/dnv-opensource/ospx/compare/v0.2.14...v0.3.0
[0.2.14]: https://github.com/dnv-opensource/ospx/compare/v0.2.13...v0.2.14
[0.2.13]: https://github.com/dnv-opensource/ospx/compare/v0.2.12...v0.2.13
[0.2.12]: https://github.com/dnv-opensource/ospx/compare/v0.2.11...v0.2.12
Expand Down
37 changes: 37 additions & 0 deletions CITATION.cff
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
title: ospx
version: 0.3.1
abstract: >-
Extension package to farn, adding support to build OSP simulation cases using FMUs.
type: software
authors:
- name: DNV SE
address: 'Brooktorkai 18'
post-code: '20457'
city: Hamburg
country: DE
website: 'https://www.dnv.com/'
- given-names: Frank
family-names: Lumpitzsch
affiliation: DNV
email: [email protected]
website: 'https://www.linkedin.com/in/frank-lumpitzsch-23013196/'
- given-names: Claas
family-names: Rostock
affiliation: DNV
email: [email protected]
website: 'https://www.linkedin.com/in/claasrostock/?locale=en_US'
- given-names: Seunghyeon
family-names: Yoo
affiliation: DNV
email: [email protected]
website: 'https://www.linkedin.com/in/seunghyeon-yoo-3625173b/'
keywords:
- farn
- OSP
- fmi
license: MIT
license-url: 'https://dnv-opensource.github.io/ospx/LICENSE.html'
url: 'https://dnv-opensource.github.io/ospx/README.html'
repository-code: 'https://github.com/dnv-opensource/ospx'
message: 'Please cite this software using these metadata.'
cff-version: 1.2.0
Loading

0 comments on commit dab5584

Please sign in to comment.