Releases: scikit-hep/formulate
Version 1.0.1
This release provided significant bug fixes and cleanup with respect to the previous overhaul. The switch to Lark as the parsing backend and the internal AST were kept, but the code was significantly simplified and many issues were ironed out.
Breaking changes
- A
numexprparsing bug was fixed, which had been present since the initial release offormulate. Bitwise operator precedence was changed, so some expressions will be interpreted differently, or fail to be parsed if they are not validnumexprexpressions. (See bug fixes section for more details.) - Some constant names were changed. In particular, very generic names are not assumed to be constants and will instead need more specific names. For example
cis no longer interpreted as the speed of light, soc_lightshould be used instead. Constant names were taken fromhepunitsfor consistency within Scikit-HEP.
Features and improvements
- The CLI interface (which was briefly removed) was reintroduced.
- Added dependency on
hepunitsin order to provide a useful set of constants. - Added methods to suggest fixes to parsing issues. These will be expanded in the future.
Bug fixes
- ROOT parsing issues were resolved.
- Various issues with constant and function conversions were resolved.
- Bitwise operator precedence for
numexprexpressions was fixed. An expression likex > 1 & x < 3was being parsed as(x > 1) & (x < 3)whereasnumexprwould actually parse it asx > (1 & x) < 3.
Maintainability improvements
- Added
larkas a dependency, and moved away from standalone parsers. This simplifies the code and makes future adjustments to the grammar rules much easier. - Moved function and constant conversions into a central location instead of having them in each
to_*function. Expressions are converted into a unified internal representation when they are parsed. This makes it easier to identify parsing and conversion issues.
Alpha 1.0.0: complete overhaul
Release Notes for Version 1.0.0
This release has been yanked due to too many small bugfixes and a general overhaul, use the 1.0.1 instead
Formulate is now significantly faster and cleaner in handling large expressions thanks to a new backend.
Features and Enhancements
-
Expression Conversion:
- Improved the API for converting between ROOT and numexpr-style expressions.
- Introduced a new abstract syntax tree (AST) system (
AST.py) for better parsing and manipulation of expressions.
-
Compatibility Updates:
- Raised the minimum supported Python version to 3.10.
- Removed Python 2.x and older 3.x versions from compatibility.
Bug Fixes
- Fixed various issues in parsing and converting mathematical expressions between formats.
- Enhanced testing coverage and fixed bugs related to edge cases in the API.
All this was contributed by @aryan26roy and @jpivarski
Version 1.0.0rc1
Summary
This is the first release after the switch to Lark.
What's Changed
- ci: add trusted publisher and attestations by @henryiii in #44
- Fix trusted publisher delivery by @jonas-eschle in #47
- Update version and .gitignore by @aryan26roy in #48
New Contributors
- @aryan26roy made their first contribution in #48
Full Changelog: v0.1.1...v1.0.0rc1
Minor bug fixes
This release is the correctly tagged release of 0.1.0 and contains mainly developer side updates of the CI, CD, pre-commits and more.
v0.0.8: Merge pull request #22 from scikit-hep/add-subvariables
Preliminary support for nested variables
Add docs and automatic parsing
Merge pull request #16 from chrisburr/add-docs Add docs and auto expression type detection
v0.0.6
v0.0.5: Merge pull request #11 from chrisburr/add-more-constants
- Add support for all
TMathconstants except those related to uncertainties - Add support for most
TMathfunctions - Add
variables,named_constantsandunnamed_constantsproperties toExpressionobjects - Generally improve
ExpressionAPI