From 987648fb275c72be9173648b3232490ce9701914 Mon Sep 17 00:00:00 2001 From: Ryan Murray Date: Wed, 11 Nov 2026 16:04:05 +0100 Subject: [PATCH 1/3] Bundle the 2026 GOLD natives from the GitHub mirror The packages config now uses source="github-mirror", with DHI.DFS, DHI.PFS, DHI.EUM, DHI.DHIfl and DHI.Projections at 24.1.2 and DHI.MikeCore.Linux.ubuntu22 at 24.0.2. Switch back to nuget.org once it publishes them. The Windows DLLs on the mirror are unsigned, so the build's signature check is commented out until then. The Linux isolation check still runs. Co-Authored-By: Claude Opus 5.5 --- CHANGELOG.md | 8 ++++++-- buildUtil/build.py | 3 ++- buildUtil/packages.config | 14 +++++++------- 3 files changed, 15 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c544370..8f99b64 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,8 +23,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 example `libeum-mikecore-python.so`, so they don't collide with a MIKE installation's (see [ADR 0002](docs/adr/0002-isolate-bundled-native-libraries.md)). Code that - loads them by name needs the new names. The Windows DLLs keep their names - and DHI's signatures. + loads them by name needs the new names. The Windows DLLs keep their names. +- The bundled native libraries are the 2026 GOLD versions: DHI.DFS, DHI.PFS, + DHI.EUM, DHI.DHIfl and DHI.Projections 24.1.2, and + DHI.MikeCore.Linux.ubuntu22 24.0.2 (previously all 23.0.3). They're + downloaded from the GitHub mirror on this repository's releases until + nuget.org publishes them. The bundled Windows DLLs are unsigned for now. - **Possibly breaking:** importing mikecore no longer adds its library folder to `PATH` or `LD_LIBRARY_PATH`. Child processes, such as an engine started with `subprocess`, no longer inherit it. diff --git a/buildUtil/build.py b/buildUtil/build.py index bca2665..5341ca7 100644 --- a/buildUtil/build.py +++ b/buildUtil/build.py @@ -176,7 +176,8 @@ def setup(): download_nuget_package(name, version, output_dir="packages", feed=feed) copy_native_libs_to_bin("packages", "mikecore/bin") - check_signed("mikecore/bin/windows") + # The 2026 GOLD DLLs on the mirror are unsigned; re-enable when switching back to nuget.org. + # check_signed("mikecore/bin/windows") if platform.system().lower() == "linux": isolate_linux_libs("mikecore/bin/linux") check_isolated("mikecore/bin/linux") diff --git a/buildUtil/packages.config b/buildUtil/packages.config index 7ed144d..90b96fd 100644 --- a/buildUtil/packages.config +++ b/buildUtil/packages.config @@ -1,9 +1,9 @@ - - - - - - - + + + + + + + \ No newline at end of file From 2f5b77a22de7ace8a0ec660a41abb87ca9c08921 Mon Sep 17 00:00:00 2001 From: Ryan Murray Date: Wed, 11 Nov 2026 16:06:57 +0100 Subject: [PATCH 2/3] Add the 2026 EUM items and units Regenerated eumItem and eumUnit with buildUtil/eumXMLProcess.py from the 24.x EUM.xml. It adds three wave items (110365-110367) and four units (5218-5221), so item and unit lookups no longer fail on them. Co-Authored-By: Claude Opus 5.5 --- CHANGELOG.md | 4 ++++ mikecore/eum.py | 7 +++++++ 2 files changed, 11 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8f99b64..2b87237 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 build downloads the native NuGet packages from: `nuget.org`, or `github-mirror` for a mirror on this repository's releases. It's `nuget.org` for now, so the wheel is unchanged. +- `eumItem` and `eumUnit` entries for the 2026 EUM table: the items + `eumIFreqIntegWaveActionDensity`, `eumIDirecIntegWaveActionDensity` and + `eumIFreqIntegWaveEnergyDensityRate`, and the units `eumUm2Sec2`, + `eumUft2Sec2`, `eumUm2SecRad` and `eumUft2SecRad`. ### Changed diff --git a/mikecore/eum.py b/mikecore/eum.py index d2c0b88..ce9ced0 100644 --- a/mikecore/eum.py +++ b/mikecore/eum.py @@ -649,6 +649,9 @@ class eumItem(IntEnum): eumIFluorideF = 110362 eumITotalAlkanlinity = 110363 eumIChemicalOxygenDemandCOD = 110364 + eumIFreqIntegWaveActionDensity = 110365 + eumIDirecIntegWaveActionDensity = 110366 + eumIFreqIntegWaveEnergyDensityRate = 110367 # Predefined enums of EUM units. @@ -1050,6 +1053,10 @@ class eumUnit(IntEnum): eumUft2PerRad = 5215 eumUft2PerDegree = 5216 eumUft2Sec = 5217 + eumUm2Sec2 = 5218 + eumUft2Sec2 = 5219 + eumUm2SecRad = 5220 + eumUft2SecRad = 5221 eumUmilliGramPerL2OneHalfPerDay = 5300 eumUmilliGramPerL2OneHalfPerHour = 5301 eumUNewtonPerSqrMeter = 5400 From 36b7d1b79c87da39cca35e328f42447dde4c5123 Mon Sep 17 00:00:00 2001 From: Ryan Murray Date: Wed, 11 Nov 2026 16:14:07 +0100 Subject: [PATCH 3/3] Update the docs for the unsigned 2026 DLLs AGENTS.md no longer claims the build fails on an unsigned DLL, the README drops the bundled version number, and the CHANGELOG marks the 2026 natives as possibly breaking and drops the stale "wheel is unchanged" clause. Co-Authored-By: Claude Opus 5.5 --- AGENTS.md | 2 +- CHANGELOG.md | 12 ++++++------ README.md | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index 628d7df..d53fd0f 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -2,6 +2,6 @@ - Review changes against `CODING_STANDARDS.md`. - Check with `uvx pre-commit run --all-files` (ruff and line endings, as CI's `lint.yml` does), `uv run pyrefly check` (as `type_check.yml` does, which also caps the warning count) and `uv run pytest`. -- Native libraries: the hatch build hook `buildUtil/build.py` downloads the NuGet packages in `buildUtil/packages.config` into `packages/` and copies them to `mikecore/bin/{windows,linux}`, then, on Linux, adds `-mikecore-python` to every `.so` name, rewrites their references to each other and sets RPATH `$ORIGIN` (ADR 0002). The Windows DLLs are left as shipped, so DHI's signatures stay valid; the build fails if one is unsigned. Inspect `mikecore/bin/` after `uv sync`, not the NuGet sources. +- Native libraries: the hatch build hook `buildUtil/build.py` downloads the NuGet packages in `buildUtil/packages.config` into `packages/` and copies them to `mikecore/bin/{windows,linux}`, then, on Linux, adds `-mikecore-python` to every `.so` name, rewrites their references to each other and sets RPATH `$ORIGIN` (ADR 0002). The Windows DLLs are left as shipped. Inspect `mikecore/bin/` after `uv sync`, not the NuGet sources. - Test data lives in the root `testdata/`, not `tests/testdata/`. - `uv.lock` is gitignored. Push branches to `origin` (DHI/mikecore-python); PRs target `master`. diff --git a/CHANGELOG.md b/CHANGELOG.md index 2b87237..9aee531 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,8 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ones, at your own risk (see README). - A required `source` attribute in `buildUtil/packages.config` picks where the build downloads the native NuGet packages from: `nuget.org`, or - `github-mirror` for a mirror on this repository's releases. It's - `nuget.org` for now, so the wheel is unchanged. + `github-mirror` for a mirror on this repository's releases. - `eumItem` and `eumUnit` entries for the 2026 EUM table: the items `eumIFreqIntegWaveActionDensity`, `eumIDirecIntegWaveActionDensity` and `eumIFreqIntegWaveEnergyDensityRate`, and the units `eumUm2Sec2`, @@ -28,11 +27,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 installation's (see [ADR 0002](docs/adr/0002-isolate-bundled-native-libraries.md)). Code that loads them by name needs the new names. The Windows DLLs keep their names. -- The bundled native libraries are the 2026 GOLD versions: DHI.DFS, DHI.PFS, - DHI.EUM, DHI.DHIfl and DHI.Projections 24.1.2, and - DHI.MikeCore.Linux.ubuntu22 24.0.2 (previously all 23.0.3). They're +- **Possibly breaking:** the bundled native libraries are the 2026 GOLD + versions: DHI.DFS, DHI.PFS, DHI.EUM, DHI.DHIfl and DHI.Projections 24.1.2, + and DHI.MikeCore.Linux.ubuntu22 24.0.2 (previously all 23.0.3). They're downloaded from the GitHub mirror on this repository's releases until - nuget.org publishes them. The bundled Windows DLLs are unsigned for now. + nuget.org publishes them. The bundled Windows DLLs are unsigned for now, + which policies such as WDAC or AppLocker may block. - **Possibly breaking:** importing mikecore no longer adds its library folder to `PATH` or `LD_LIBRARY_PATH`. Child processes, such as an engine started with `subprocess`, no longer inherit it. diff --git a/README.md b/README.md index 94b1c19..0c1ad00 100644 --- a/README.md +++ b/README.md @@ -49,8 +49,8 @@ All commands are run from the project root. ### Another library in the same process also loads MIKE Core -mikecore loads its bundled MIKE Core libraries (23.0.3) by default, even with -MIKE installed. With another library in the process that loads MIKE Core +mikecore loads its bundled MIKE Core libraries by default, even with MIKE +installed. With another library in the process that loads MIKE Core (a MIKE engine, for example): - **Linux:** the two keep separate libraries, unless the other library is