Releases: joaofreires/boolia
0.1.3
What's Changed
- Support attribute and method resolution by @joaofreires in #2
- Adds RuleBook serialization (JSON/YAML) by @joaofreires in #1
Full Changelog: 0.1.2...0.1.3
0.1.2
Features
- Added an
OperatorRegistrywith bundledDEFAULT_OPERATORSenabling project-specific infix operators (word- or symbol-based) without modifying boolia internals. - Updated the lexer, Pratt parser, and AST to source operator metadata from the registry, automatically handling precedence, tokenization, and evaluation.
- Expanded the public API
evaluate,compile_expr,compile_ruleandRuleto accept custom operator registries and persist them through compiled rules. - Re-exported
OperatorRegistryandDEFAULT_OPERATORSvia the top-level package for immediate user access. - Documented the workflow and sample code for registering a custom xor operator in the README.
✅ Quality
- Added
test_operators.pycovering keyword and symbol operators plus rule compilation with custom registries.
Settings Update
Configuration and CI/tests updates.
0.1.0
boolia 0.1.0
Highlights
✨ Boolean expression engine — Parse concise logic with and / or / not, comparisons, membership checks, literals, and dotted identifiers that resolve safely against plain Python dicts.
🏷️ Tag-aware evaluation — Treat bare identifiers as flags backed by a tag set, with configurable behavior when values are missing (raise, none, false, or a custom default).
🧩 Reusable rule books — Name expressions, reuse them later, and feed everything through a consistent evaluation API that accepts context, tags, and custom resolvers.
🎛️ Rule groups — Compose existing rules with RuleGroup, choosing all or any semantics, nesting as needed, and getting cycle detection out of the box.
🧰 Extensible functions — Register safe callables (e.g., starts_with, matches) and invoke them directly inside expressions.
✅ Confidence via tests — New pytest coverage exercises rule evaluation, function integration, missing-value policies, and the fresh grouping logic.