v1.5.0
foamlib v1.5.0
New features
New parser for FoamFile
New custom recursive descent–based parser written in vanilla Python delivers additional type safety, better error messages, and a very significant speed boost when parsing binary files.
foamlib.typing
Type hints that were already used internally by foamlib are now also available for users who want to use them in their code.
run_all static method in AsyncFoamCase
Convenience method for easily running multiple cases in parallel.
All changes
- Add run_all and run_all_wait static methods to AsyncFoamCase by @gerlero in #682
- Fix docstrings by @gerlero in #683
- Expose typing module by @gerlero in #684
- Rename File type alias to FileDict by @gerlero in #685
- Implement custom recursive descent parser for FoamFile.loads by @gerlero in #686
- Switch ParsedFile to new custom parser with location tracking by @Copilot in #687
- Fix subdictionary entry update accumulating blank lines and indentation by @Copilot in #690
- Fix parsing by @gerlero in #691
- Improve FoamFile parse error handling by @gerlero in #692
- Improve number parsing by @gerlero in #693
- Remove regex library dependency from token parser by @Copilot in #694
- Drop dependency on PyParsing by @gerlero in #695
- Improve token parsing by @gerlero in #696
- Refactor parse_file_located to return flattened MultiDict and implement single-pass parsing by @Copilot in #697
- Decode ASCII numeric lists for NumPy for improved parsing performance by @gerlero in #698
- Update parse exception classes by @gerlero in #699
- Update README.md by @gerlero in #700
- Remove AsyncFoamCase.run_all_wait method by @gerlero in #701
- Simplify parser by @gerlero in #702
- Improve typing module by @gerlero in #703
- Make lazy FoamFile parsing thread-safe for extra transparency by @gerlero in #704
- Do not use FoamFile as context manager in non-mutating operations by @gerlero in #705
- Fix exit race condition between context depth and modified flag by @Copilot in #708
- Add extra assertion to FoamFile IO by @gerlero in #707
- Optimize len and contains via direct parsed data access by @Copilot in #706
- Switch from bytes to bytearray for parsed content by @gerlero in #709
- Fix failing parsing tests by @gerlero in #710
- Inline dict_from_items into normalized to remove unnecessary abstraction by @Copilot in #711
- Update index.rst by @gerlero in #713
- Fix formatting loss when editing subdictionary entries (FoamFile header) by @Copilot in #712
- Update README.md by @gerlero in #714
- Update benchmark by @gerlero in #715
Full Changelog: v1.4.5...v1.5.0