Skip to content

Commit e2b09ae

Browse files
authored
Merge pull request #22 from dnv-opensource/eis
Merge eis into main, as prep for release 0.4.0
2 parents 0aac44e + b2680bb commit e2b09ae

27 files changed

Lines changed: 1450 additions & 1005 deletions

CHANGELOG.md

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,22 @@ The changelog format is based on [Keep a Changelog](https://keepachangelog.com/e
88
* -/-
99

1010

11+
## [0.4.0] - 2026-03-12
12+
13+
### Breaking Changes
14+
* src/component_model/utils/controls.py: Refactored `Controls` from a multi-variable container into per-variable `Control` objects with typed read/write access, and improved goal tracking so initial speed and acceleration are handled correctly when setting or changing goals.
15+
* src/component_model/utils/analysis.py: Reworked sine fitting by moving the `sine_fit()` function from `component_model.analytic` into `component_model.utils.analysis` and expanding it to fit offset sine waves, detect cycles from maxima, support cosine-like starts, and return offset, amplitude, angular frequency, phase, and a reference mid-time.
16+
17+
### Resolved
18+
* Fixed coordinate transform handling for vectors pointing in the negative z-direction.
19+
20+
### Changed
21+
* Relaxed range compatibility checks for units and promoted scipy from a test-only dependency to a runtime package dependency, aligning dependencies with actual package usage.
22+
* Cleaned up FMU test artifacts by removing generated FMU binaries from the examples folder, building FMUs into the test working directory instead, ignoring generated .dat files, and switching shared test fixtures to session scope.
23+
* Added or updated tests for the new controls behavior, sine fitting, transform handling, and FMU build workflow.
24+
* Included minor follow-up cleanup such as corrected example text typos, small README/docstring/formatting updates, and lockfile refreshes.
25+
26+
1127
## [0.3.2] - 2026-02-02
1228

1329
### Added
@@ -139,7 +155,8 @@ The changelog format is based on [Keep a Changelog](https://keepachangelog.com/e
139155

140156

141157
<!-- Markdown link & img dfn's -->
142-
[unreleased]: https://github.com/dnv-innersource/component-model/compare/v0.3.2...HEAD
158+
[unreleased]: https://github.com/dnv-innersource/component-model/compare/v0.4.0...HEAD
159+
[0.4.0]: https://github.com/dnv-innersource/component-model/compare/v0.3.2...v0.4.0
143160
[0.3.2]: https://github.com/dnv-innersource/component-model/compare/v0.3.1...v0.3.2
144161
[0.3.1]: https://github.com/dnv-innersource/component-model/compare/v0.3.0...v0.3.1
145162
[0.3.0]: https://github.com/dnv-innersource/component-model/compare/v0.2.0...v0.3.0

CITATION.cff

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
title: component-model
2-
version: 0.3.2
2+
version: 0.4.0
33
abstract: >-
44
Constructs a Functional Mockup Interface component model from a python script (fulfilling some requirements).
55
type: software

README.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ Development Setup
301301

302302
1. Install uv
303303
^^^^^^^^^^^^^
304-
This project uses `uv` as package manager.
304+
This project uses ``uv`` as package manager.
305305

306306
If you haven't already, install `uv <https://docs.astral.sh/uv/>`_, preferably using it's `"Standalone installer" <https://docs.astral.sh/uv/getting-started/installation/#__tabbed_1_2/>`_ method:
307307

@@ -319,7 +319,7 @@ If you haven't already, install `uv <https://docs.astral.sh/uv/>`_, preferably u
319319
320320
(see `docs.astral.sh/uv <https://docs.astral.sh/uv/getting-started/installation//>`_ for all / alternative installation methods.)
321321

322-
Once installed, you can update `uv` to its latest version, anytime, by running:
322+
Once installed, you can update ``uv`` to its latest version, anytime, by running:
323323

324324
.. code:: sh
325325
@@ -381,7 +381,7 @@ Run ``uv sync -U`` to create a virtual environment and install all project depen
381381
**Note**: ``uv`` will create a new virtual environment called
382382
``.venv`` in the project root directory when running ``uv sync -U``
383383
the first time. Optionally, you can create your own virtual
384-
environment using e.g. ``uv venv``, before running ``uv sync -U``.
384+
environment using e.g. ``uv venv``, before running ``uv sync -U``.
385385

386386

387387
5. (Optional) Activate the virtual environment

docs/source/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
author = "Siegfried Eisinger, Jorge Luis Mendez"
2727

2828
# The full version, including alpha/beta/rc tags
29-
release = "0.3.2"
29+
release = "0.4.0"
3030

3131
# -- General configuration ---------------------------------------------------
3232
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration

examples/DrivingForce.fmu

-798 KB
Binary file not shown.

examples/DrivingForce6D.fmu

-802 KB
Binary file not shown.

examples/HarmonicOscillator.fmu

-797 KB
Binary file not shown.

examples/HarmonicOscillator6D.fmu

-806 KB
Binary file not shown.

examples/axle_fmu.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,23 +64,23 @@ def __init__(
6464
self._rpm0 = Variable(
6565
self,
6666
"wheels[0].motor.rpm",
67-
"Angualar speed of wheel 1 in rad/s:",
67+
"Angular speed of wheel 1 in rad/s:",
6868
causality="input",
6969
variability="continuous",
7070
start=f"{rpm1} 1/s",
7171
)
7272
self._rpm1 = Variable(
7373
self,
7474
"wheels[1].motor.rpm",
75-
"Angualar speed of wheel 2 in rad/s:",
75+
"Angular speed of wheel 2 in rad/s:",
7676
causality="input",
7777
variability="continuous",
7878
start=f"{rpm2} 1/s",
7979
)
8080
self._acc0 = Variable(
8181
self,
8282
"der(wheels[0].motor.rpm)",
83-
"Angualar acceleration of wheel 1 in rad/s**2:",
83+
"Angular acceleration of wheel 1 in rad/s**2:",
8484
causality="input",
8585
variability="continuous",
8686
start="0.0 1/s**2",
@@ -90,7 +90,7 @@ def __init__(
9090
Variable(
9191
self,
9292
"der(wheels[1].motor.rpm)",
93-
"Angualar acceleration of wheel 2 in rad/s**2:",
93+
"Angular acceleration of wheel 2 in rad/s**2:",
9494
causality="input",
9595
variability="continuous",
9696
start="0.0 1/s**2",

pyproject.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ allow-direct-references = true
3030

3131
[project]
3232
name = "component-model"
33-
version = "0.3.2"
33+
version = "0.4.0"
3434
description = "Constructs a Functional Mockup Interface component model from a python script (fulfilling some requirements)."
3535
readme = "README.rst"
3636
requires-python = ">= 3.11"
@@ -66,13 +66,12 @@ dependencies = [
6666
"jsonpath-ng>=1.7.0",
6767
"pythonfmu>=0.7.0",
6868
"flexparser>=0.4",
69-
"scipy-stubs>=1.17.0.0",
69+
"scipy>=1.16",
7070
]
7171

7272
[project.optional-dependencies]
7373
test = [
74-
"fmpy==0.3.21", # version 0.3.22 does so far (25.3.25) not workwhen installing through pip
75-
"scipy>=1.16",
74+
"fmpy>=0.3.21", # version 0.3.22 does so far (25.3.25) not workwhen installing through pip
7675
"matplotlib>=3.10",
7776
"plotly>=6.3",
7877
"libcosimpy>=0.0.5",
@@ -103,6 +102,7 @@ dev = [
103102
"sphinxcontrib-mermaid>=1.0.0",
104103
"myst-parser>=4.0",
105104
"furo>=2025.9",
105+
"scipy-stubs>=1.17.0.0",
106106
]
107107

108108
[tool.uv]

0 commit comments

Comments
 (0)