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 c544370..9aee531 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,8 +14,11 @@ 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`, + `eumUft2Sec2`, `eumUm2SecRad` and `eumUft2SecRad`. ### Changed @@ -23,8 +26,13 @@ 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. +- **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, + 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 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 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