Versions¶
Constants and utilities for working with EnergyPlus version numbers. idfkit bundles schemas for every release from v8.9 through v25.2.
EnergyPlus version registry.
Defines all supported EnergyPlus versions since v8.9 (the first to publish epJSON schema) and provides utilities for version manipulation.
find_closest_version(version)
¶
Find the closest supported version that is <= the given version.
This is useful when a file specifies a patch version that doesn't exactly match a supported version (e.g. 9.0.0 -> 9.0.1).
Returns:
| Type | Description |
|---|---|
tuple[int, int, int] | None
|
The closest supported version, or None if no suitable version exists. |
Examples:
>>> find_closest_version((24, 1, 5))
(24, 1, 0)
>>> find_closest_version((9, 0, 0))
(8, 9, 0)
>>> find_closest_version((1, 0, 0)) is None
True
Source code in src/idfkit/versions.py
github_release_tag(version)
¶
Return the GitHub release tag for a version.
Examples:
Source code in src/idfkit/versions.py
is_supported_version(version)
¶
version_dirname(version)
¶
Return the schema directory name for a version.
Examples:
Source code in src/idfkit/versions.py
version_string(version)
¶
Format a version tuple as a human-readable string.
Examples: