Skip to content

Improved public API access

Choose a tag to compare

@MAGALA-RICHARD MAGALA-RICHARD released this 07 Mar 03:12
· 3515 commits to main since this release

Version 1.5.2

Improvements

  • Added lazy-loading support for APSIM runtime modules to prevent early CLR initialization.
  • Consolidates all apsimNGpy public API into a single access point to enable easier discovery and support lazy importing. For example, ApsimModel if the APSIM binary path has been set, can now be imported directly from the top-level package:
    from apsimNGpy import ApsimModel
    Bug Fixes

  • Fixed issues with APSIM binary path configuration when importing apsimNGpy.
  • Improved compatibility with Ruff static analysis for TYPE_CHECKING imports.
  • fixed f strings errors in early versions of python
  • Fixed the add_crop_replacements method and removed the deprecated _crop argument. Future releases will allow this method to be called without arguments, automatically detecting available plant modules and adding them to the replacements folder.

Tests

  • Added tests verifying lazy attribute resolution and caching behavior.
  • Added tests ensuring unittest modules are correctly exposed.