Releases: gerlero/foamlib
v1.4.0
foamlib v1.4.0
New feature: colon (:) as index
FoamFile and related classes now support colons (:) as indices, with the meaning of "this entire file/dictionary". Accessing setting file[:] returns an independent copy of the entire data (it is equivalent to file.as_dict()), whilefile[:] = data will replace all of the contents of the object (except the header, if present).
File manipulation improvements
File manipulation is now safer and more robust, with minor grammar changes, a much improved data normalization step (whose purpose is to ensure that any data written by foamlib always matches what its parser expects), and additional validation of user inputs for extra certainty.
More modern codebase
Updated a huge portion of the code to use constructs from the newer versions of Python, including the use of match-case (PEP 634 structural pattern matching)—available since Python 3.10—where it makes sense.
Dropped support for Python 3.8 and 3.9
These versions are now end of life and their use is not recommended anymore. However, installing foamlib with these Python versions is still possible: you'll just get an earlier version of foamlib.
All changes
- Bump actions/checkout from 5 to 6 by @dependabot[bot] in #618
- Drop support for Python < 3.10 by @gerlero in #619
- Drop future annotations imports by @gerlero in #620
- Eliminate type assertion in Dimensioned initialization by @gerlero in #621
- Modify scipy-stubs dependency in pyproject.toml by @gerlero in #622
- Simplify parsing grammar by @gerlero in #623
- Fix data normalization edge case by @gerlero in #625
- Update data normalization implementation by @gerlero in #627
- Specify overloads of add_to_mapping utility funcion by @gerlero in #628
- Fix ty errors by @gerlero in #631
- Update file serialization by @gerlero in #633
- Update internal field classification function by @gerlero in #634
- Fix ty errors by @gerlero in #635
- Improve robustness of log monitoring by @gerlero in #639
- Improve serialization by @gerlero in #637
- Improve typing by @gerlero in #641
- Update typing by @gerlero in #643
- Update parsing by @gerlero in #644
- Refactor dict workflows in parsing and serialization by @gerlero in #645
- Improve typing by @gerlero in #647
- Always use None to represent empty values by @gerlero in #648
- Update README.md by @gerlero in #649
- Update CONTRIBUTING.md by @gerlero in #650
- Reject comments when parsing only data by @gerlero in #651
- Do not widen user input domain by @gerlero in #652
- Rename internal parsing module by @gerlero in #653
- Rename internal normalization function by @gerlero in #654
- Improve serialization by @gerlero in #656
- Improve serialization by @gerlero in #657
- Fix pattern matching for None case in _serialization.py by @gerlero in #658
- Update standalone data grammar to match serialization by @gerlero in #659
- Refactor FoamFile helpers by @gerlero in #660
- Fix warnings in tests and examples by @gerlero in #662
- Improve serialization by @gerlero in #661
- Update project description for clarity by @gerlero in #664
- Support colons as indices in FoamFile and related classes by @gerlero in #663
Full Changelog: v1.3.15...v1.4.0
v1.3.21
v1.3.20
v1.3.19
v1.3.18
v1.3.17
v1.3.16
v1.3.15
What's Changed
- Update pytest version constraint to <10 by @gerlero in #610
- Remove license-files from pyproject.toml by @gerlero in #611
- Update uv_build version range in pyproject.toml by @gerlero in #612
- Remove license classifier from pyproject.toml by @gerlero in #613
- Switch to src-based layout by @gerlero in #614
- Update pytest-asyncio version constraint by @gerlero in #615
- Revert "Remove license-files from pyproject.toml" by @gerlero in #616
Full Changelog: v1.3.14...v1.3.15
v1.3.14
What's Changed
- Bump astral-sh/setup-uv from 6 to 7 by @dependabot[bot] in #601
- Update uv-build requirement from <0.9.0,>=0.8.14 to >=0.8.14,<0.10.0 by @dependabot[bot] in #600
- Fix ty errors by @gerlero in #603
- Fix #605 by @gerlero in #607
- Fix ty errors by @gerlero in #608
Full Changelog: v1.3.13...v1.3.14