f8-engine 0.4.0__tar.gz → 0.4.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (99) hide show
  1. {f8_engine-0.4.0 → f8_engine-0.4.1}/Cargo.lock +2 -2
  2. {f8_engine-0.4.0 → f8_engine-0.4.1}/Cargo.toml +1 -1
  3. {f8_engine-0.4.0 → f8_engine-0.4.1}/PKG-INFO +3 -2
  4. {f8_engine-0.4.0 → f8_engine-0.4.1}/README.md +2 -1
  5. {f8_engine-0.4.0 → f8_engine-0.4.1}/crates/f8-core/src/functions/financial/irr.rs +2 -2
  6. {f8_engine-0.4.0 → f8_engine-0.4.1}/crates/f8-core/src/model/theme.rs +1 -1
  7. {f8_engine-0.4.0 → f8_engine-0.4.1}/python/f8/skills/f8-modeling/references/syntax-and-grid.md +1 -1
  8. {f8_engine-0.4.0 → f8_engine-0.4.1}/LICENSE +0 -0
  9. {f8_engine-0.4.0 → f8_engine-0.4.1}/crates/f8-core/Cargo.toml +0 -0
  10. {f8_engine-0.4.0 → f8_engine-0.4.1}/crates/f8-core/src/compiler/compiled/error.rs +0 -0
  11. {f8_engine-0.4.0 → f8_engine-0.4.1}/crates/f8-core/src/compiler/compiled/mod.rs +0 -0
  12. {f8_engine-0.4.0 → f8_engine-0.4.1}/crates/f8-core/src/compiler/compiled/model.rs +0 -0
  13. {f8_engine-0.4.0 → f8_engine-0.4.1}/crates/f8-core/src/compiler/emission/error.rs +0 -0
  14. {f8_engine-0.4.0 → f8_engine-0.4.1}/crates/f8-core/src/compiler/emission/format.rs +0 -0
  15. {f8_engine-0.4.0 → f8_engine-0.4.1}/crates/f8-core/src/compiler/emission/mod.rs +0 -0
  16. {f8_engine-0.4.0 → f8_engine-0.4.1}/crates/f8-core/src/compiler/emission/workbook.rs +0 -0
  17. {f8_engine-0.4.0 → f8_engine-0.4.1}/crates/f8-core/src/compiler/error.rs +0 -0
  18. {f8_engine-0.4.0 → f8_engine-0.4.1}/crates/f8-core/src/compiler/eval/context.rs +0 -0
  19. {f8_engine-0.4.0 → f8_engine-0.4.1}/crates/f8-core/src/compiler/eval/error.rs +0 -0
  20. {f8_engine-0.4.0 → f8_engine-0.4.1}/crates/f8-core/src/compiler/eval/expr.rs +0 -0
  21. {f8_engine-0.4.0 → f8_engine-0.4.1}/crates/f8-core/src/compiler/eval/mod.rs +0 -0
  22. {f8_engine-0.4.0 → f8_engine-0.4.1}/crates/f8-core/src/compiler/eval/model.rs +0 -0
  23. {f8_engine-0.4.0 → f8_engine-0.4.1}/crates/f8-core/src/compiler/graph/cycle.rs +0 -0
  24. {f8_engine-0.4.0 → f8_engine-0.4.1}/crates/f8-core/src/compiler/graph/dependency.rs +0 -0
  25. {f8_engine-0.4.0 → f8_engine-0.4.1}/crates/f8-core/src/compiler/graph/error.rs +0 -0
  26. {f8_engine-0.4.0 → f8_engine-0.4.1}/crates/f8-core/src/compiler/graph/mod.rs +0 -0
  27. {f8_engine-0.4.0 → f8_engine-0.4.1}/crates/f8-core/src/compiler/graph/resolve.rs +0 -0
  28. {f8_engine-0.4.0 → f8_engine-0.4.1}/crates/f8-core/src/compiler/ir/cell.rs +0 -0
  29. {f8_engine-0.4.0 → f8_engine-0.4.1}/crates/f8-core/src/compiler/ir/error.rs +0 -0
  30. {f8_engine-0.4.0 → f8_engine-0.4.1}/crates/f8-core/src/compiler/ir/expand.rs +0 -0
  31. {f8_engine-0.4.0 → f8_engine-0.4.1}/crates/f8-core/src/compiler/ir/id.rs +0 -0
  32. {f8_engine-0.4.0 → f8_engine-0.4.1}/crates/f8-core/src/compiler/ir/mod.rs +0 -0
  33. {f8_engine-0.4.0 → f8_engine-0.4.1}/crates/f8-core/src/compiler/ir/symbol.rs +0 -0
  34. {f8_engine-0.4.0 → f8_engine-0.4.1}/crates/f8-core/src/compiler/layout/a1.rs +0 -0
  35. {f8_engine-0.4.0 → f8_engine-0.4.1}/crates/f8-core/src/compiler/layout/error.rs +0 -0
  36. {f8_engine-0.4.0 → f8_engine-0.4.1}/crates/f8-core/src/compiler/layout/mod.rs +0 -0
  37. {f8_engine-0.4.0 → f8_engine-0.4.1}/crates/f8-core/src/compiler/lowering/address.rs +0 -0
  38. {f8_engine-0.4.0 → f8_engine-0.4.1}/crates/f8-core/src/compiler/lowering/error.rs +0 -0
  39. {f8_engine-0.4.0 → f8_engine-0.4.1}/crates/f8-core/src/compiler/lowering/mod.rs +0 -0
  40. {f8_engine-0.4.0 → f8_engine-0.4.1}/crates/f8-core/src/compiler/mod.rs +0 -0
  41. {f8_engine-0.4.0 → f8_engine-0.4.1}/crates/f8-core/src/expr/ast.rs +0 -0
  42. {f8_engine-0.4.0 → f8_engine-0.4.1}/crates/f8-core/src/expr/error.rs +0 -0
  43. {f8_engine-0.4.0 → f8_engine-0.4.1}/crates/f8-core/src/expr/mod.rs +0 -0
  44. {f8_engine-0.4.0 → f8_engine-0.4.1}/crates/f8-core/src/expr/parser.rs +0 -0
  45. {f8_engine-0.4.0 → f8_engine-0.4.1}/crates/f8-core/src/functions/common.rs +0 -0
  46. {f8_engine-0.4.0 → f8_engine-0.4.1}/crates/f8-core/src/functions/date/constructors.rs +0 -0
  47. {f8_engine-0.4.0 → f8_engine-0.4.1}/crates/f8-core/src/functions/date/mod.rs +0 -0
  48. {f8_engine-0.4.0 → f8_engine-0.4.1}/crates/f8-core/src/functions/date/parts.rs +0 -0
  49. {f8_engine-0.4.0 → f8_engine-0.4.1}/crates/f8-core/src/functions/date/serial.rs +0 -0
  50. {f8_engine-0.4.0 → f8_engine-0.4.1}/crates/f8-core/src/functions/date/yearfrac.rs +0 -0
  51. {f8_engine-0.4.0 → f8_engine-0.4.1}/crates/f8-core/src/functions/error.rs +0 -0
  52. {f8_engine-0.4.0 → f8_engine-0.4.1}/crates/f8-core/src/functions/financial/annuity.rs +0 -0
  53. {f8_engine-0.4.0 → f8_engine-0.4.1}/crates/f8-core/src/functions/financial/discounting.rs +0 -0
  54. {f8_engine-0.4.0 → f8_engine-0.4.1}/crates/f8-core/src/functions/financial/mod.rs +0 -0
  55. {f8_engine-0.4.0 → f8_engine-0.4.1}/crates/f8-core/src/functions/logical/boolean.rs +0 -0
  56. {f8_engine-0.4.0 → f8_engine-0.4.1}/crates/f8-core/src/functions/logical/branching.rs +0 -0
  57. {f8_engine-0.4.0 → f8_engine-0.4.1}/crates/f8-core/src/functions/logical/error_handling.rs +0 -0
  58. {f8_engine-0.4.0 → f8_engine-0.4.1}/crates/f8-core/src/functions/logical/mod.rs +0 -0
  59. {f8_engine-0.4.0 → f8_engine-0.4.1}/crates/f8-core/src/functions/lookup/index.rs +0 -0
  60. {f8_engine-0.4.0 → f8_engine-0.4.1}/crates/f8-core/src/functions/lookup/mod.rs +0 -0
  61. {f8_engine-0.4.0 → f8_engine-0.4.1}/crates/f8-core/src/functions/lookup/search.rs +0 -0
  62. {f8_engine-0.4.0 → f8_engine-0.4.1}/crates/f8-core/src/functions/lookup/xlookup.rs +0 -0
  63. {f8_engine-0.4.0 → f8_engine-0.4.1}/crates/f8-core/src/functions/lookup/xmatch.rs +0 -0
  64. {f8_engine-0.4.0 → f8_engine-0.4.1}/crates/f8-core/src/functions/math/aggregation.rs +0 -0
  65. {f8_engine-0.4.0 → f8_engine-0.4.1}/crates/f8-core/src/functions/math/basic.rs +0 -0
  66. {f8_engine-0.4.0 → f8_engine-0.4.1}/crates/f8-core/src/functions/math/conditional.rs +0 -0
  67. {f8_engine-0.4.0 → f8_engine-0.4.1}/crates/f8-core/src/functions/math/criteria.rs +0 -0
  68. {f8_engine-0.4.0 → f8_engine-0.4.1}/crates/f8-core/src/functions/math/mod.rs +0 -0
  69. {f8_engine-0.4.0 → f8_engine-0.4.1}/crates/f8-core/src/functions/math/product.rs +0 -0
  70. {f8_engine-0.4.0 → f8_engine-0.4.1}/crates/f8-core/src/functions/math/rounding.rs +0 -0
  71. {f8_engine-0.4.0 → f8_engine-0.4.1}/crates/f8-core/src/functions/mod.rs +0 -0
  72. {f8_engine-0.4.0 → f8_engine-0.4.1}/crates/f8-core/src/functions/registry.rs +0 -0
  73. {f8_engine-0.4.0 → f8_engine-0.4.1}/crates/f8-core/src/functions/traits.rs +0 -0
  74. {f8_engine-0.4.0 → f8_engine-0.4.1}/crates/f8-core/src/lib.rs +0 -0
  75. {f8_engine-0.4.0 → f8_engine-0.4.1}/crates/f8-core/src/model/error.rs +0 -0
  76. {f8_engine-0.4.0 → f8_engine-0.4.1}/crates/f8-core/src/model/format.rs +0 -0
  77. {f8_engine-0.4.0 → f8_engine-0.4.1}/crates/f8-core/src/model/id.rs +0 -0
  78. {f8_engine-0.4.0 → f8_engine-0.4.1}/crates/f8-core/src/model/manifest.rs +0 -0
  79. {f8_engine-0.4.0 → f8_engine-0.4.1}/crates/f8-core/src/model/mod.rs +0 -0
  80. {f8_engine-0.4.0 → f8_engine-0.4.1}/crates/f8-core/src/model/table.rs +0 -0
  81. {f8_engine-0.4.0 → f8_engine-0.4.1}/crates/f8-core/src/value/error.rs +0 -0
  82. {f8_engine-0.4.0 → f8_engine-0.4.1}/crates/f8-core/src/value/format.rs +0 -0
  83. {f8_engine-0.4.0 → f8_engine-0.4.1}/crates/f8-core/src/value/mod.rs +0 -0
  84. {f8_engine-0.4.0 → f8_engine-0.4.1}/crates/f8-python/Cargo.toml +0 -0
  85. {f8_engine-0.4.0 → f8_engine-0.4.1}/crates/f8-python/src/error.rs +0 -0
  86. {f8_engine-0.4.0 → f8_engine-0.4.1}/crates/f8-python/src/lib.rs +0 -0
  87. {f8_engine-0.4.0 → f8_engine-0.4.1}/crates/f8-python/src/model.rs +0 -0
  88. {f8_engine-0.4.0 → f8_engine-0.4.1}/pyproject.toml +0 -0
  89. {f8_engine-0.4.0 → f8_engine-0.4.1}/python/f8/__init__.py +0 -0
  90. {f8_engine-0.4.0 → f8_engine-0.4.1}/python/f8/__main__.py +0 -0
  91. {f8_engine-0.4.0 → f8_engine-0.4.1}/python/f8/_core.pyi +0 -0
  92. {f8_engine-0.4.0 → f8_engine-0.4.1}/python/f8/audit.py +0 -0
  93. {f8_engine-0.4.0 → f8_engine-0.4.1}/python/f8/builder.py +0 -0
  94. {f8_engine-0.4.0 → f8_engine-0.4.1}/python/f8/cli.py +0 -0
  95. {f8_engine-0.4.0 → f8_engine-0.4.1}/python/f8/py.typed +0 -0
  96. {f8_engine-0.4.0 → f8_engine-0.4.1}/python/f8/skills/f8-modeling/SKILL.md +0 -0
  97. {f8_engine-0.4.0 → f8_engine-0.4.1}/python/f8/skills/f8-modeling/references/auditing-and-repair.md +0 -0
  98. {f8_engine-0.4.0 → f8_engine-0.4.1}/python/f8/skills/f8-modeling/references/functions.md +0 -0
  99. {f8_engine-0.4.0 → f8_engine-0.4.1}/python/f8/types.py +0 -0
@@ -37,7 +37,7 @@ checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f"
37
37
 
38
38
  [[package]]
39
39
  name = "f8-core"
40
- version = "0.4.0"
40
+ version = "0.4.1"
41
41
  dependencies = [
42
42
  "indexmap",
43
43
  "petgraph",
@@ -50,7 +50,7 @@ dependencies = [
50
50
 
51
51
  [[package]]
52
52
  name = "f8-python"
53
- version = "0.4.0"
53
+ version = "0.4.1"
54
54
  dependencies = [
55
55
  "f8-core",
56
56
  "pyo3",
@@ -3,7 +3,7 @@ resolver = "3"
3
3
  members = ["crates/f8-core", "crates/f8-python"]
4
4
 
5
5
  [workspace.package]
6
- version = "0.4.0"
6
+ version = "0.4.1"
7
7
  edition = "2024"
8
8
  description = "Financial modeling engine with compiler verification and live Excel formulas"
9
9
  authors = ["Michael (Chencheng) Hu, CFA"]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: f8-engine
3
- Version: 0.4.0
3
+ Version: 0.4.1
4
4
  Classifier: Development Status :: 4 - Beta
5
5
  Classifier: Intended Audience :: Developers
6
6
  Classifier: Intended Audience :: Financial and Insurance Industry
@@ -46,7 +46,8 @@ AI agents struggle to manipulate raw spreadsheets (`openpyxl`, Office.js, or GUI
46
46
 
47
47
  - Semantic 2D modeling: Author models with readable table, row, and column identifiers; `f8` handles spatial layout and lowers logic into native Excel formulas.
48
48
  - Compiler-enforced rigor: A 6-pass Rust compiler verifies grid completeness (zero unassigned cells or formula overlaps) and enforces a strict DAG via Tarjan cycle detection.
49
- - Closed-loop verification: Evaluates formulas in memory with 100% Excel parity (including the 1900 leap day bug) so AI agents and `pytest` suites can audit tables, trace dependencies, and verify accounting checks in milliseconds.
49
+ - Closed-loop verification: Evaluates formulas in memory so AI agents and `pytest` suites can audit tables, trace dependencies, and verify accounting checks in milliseconds, without opening Excel.
50
+ - Verified Excel parity: Matches Excel on all 44 supported functions, including error propagation, type coercion, and the 1900 leap day bug. The [parity workbook](https://github.com/mhcfa/f8/releases/latest/download/excel_parity_verification.xlsx) ships without cached values, so Excel itself recalculates and grades 101 cases on open: exact match for integers, text, dates, and lookups; 1e-9 relative tolerance for floating-point and iterative functions (`IRR`, `XIRR`); exact error type for 23 error cases.
50
51
 
51
52
  ## Getting started
52
53
 
@@ -20,7 +20,8 @@ AI agents struggle to manipulate raw spreadsheets (`openpyxl`, Office.js, or GUI
20
20
 
21
21
  - Semantic 2D modeling: Author models with readable table, row, and column identifiers; `f8` handles spatial layout and lowers logic into native Excel formulas.
22
22
  - Compiler-enforced rigor: A 6-pass Rust compiler verifies grid completeness (zero unassigned cells or formula overlaps) and enforces a strict DAG via Tarjan cycle detection.
23
- - Closed-loop verification: Evaluates formulas in memory with 100% Excel parity (including the 1900 leap day bug) so AI agents and `pytest` suites can audit tables, trace dependencies, and verify accounting checks in milliseconds.
23
+ - Closed-loop verification: Evaluates formulas in memory so AI agents and `pytest` suites can audit tables, trace dependencies, and verify accounting checks in milliseconds, without opening Excel.
24
+ - Verified Excel parity: Matches Excel on all 44 supported functions, including error propagation, type coercion, and the 1900 leap day bug. The [parity workbook](https://github.com/mhcfa/f8/releases/latest/download/excel_parity_verification.xlsx) ships without cached values, so Excel itself recalculates and grades 101 cases on open: exact match for integers, text, dates, and lookups; 1e-9 relative tolerance for floating-point and iterative functions (`IRR`, `XIRR`); exact error type for 23 error cases.
24
25
 
25
26
  ## Getting started
26
27
 
@@ -124,7 +124,7 @@ impl ExcelFunction for IrrFunction {
124
124
  }
125
125
  }
126
126
 
127
- if f_val.abs() < CONVERGENCE_TOLERANCE {
127
+ if f_val == 0.0 {
128
128
  return Ok(CellValue::Number(normalize_zero(rate)));
129
129
  }
130
130
 
@@ -282,7 +282,7 @@ impl ExcelFunction for XirrFunction {
282
282
  }
283
283
  }
284
284
 
285
- if f_val.abs() < CONVERGENCE_TOLERANCE {
285
+ if f_val == 0.0 {
286
286
  return Ok(CellValue::Number(normalize_zero(rate)));
287
287
  }
288
288
 
@@ -105,7 +105,7 @@ impl Default for TypographyConfig {
105
105
  }
106
106
 
107
107
  fn default_max_col_width() -> f64 {
108
- 50.0
108
+ 75.0
109
109
  }
110
110
 
111
111
  /// Physical row heights, column character widths, gutters, and margins.
@@ -284,7 +284,7 @@ table.add_column_gutter() -> Table
284
284
  - Table banners and collapsing:
285
285
  - Non-empty `title` emits a full-width title banner row (`start_col..=end_col`). `subtitle` emits a subtitle row beneath `title` (passing an empty or whitespace-only `subtitle=""` raises `SpecificationError`; use `subtitle=None` to omit). If either `title` or `subtitle` is present, a 1-row buffer gutter is inserted before column headers; passing `title=""` (with `subtitle=None`) omits both banner and buffer gutter so column headers start at `start_row`.
286
286
  - `collapsible=True`: Groups physical rows `start_row + 1..=end_row` in Excel outline with summary symbols above (`group_symbols_above(True)`).
287
- - Column width arbitration & text wrapping: Each physical worksheet column takes the maximum width across all tables spanning that column, computed as `round(clamp(max_chars * char_width_multiplier + col_padding, min_col_width, max_col_width), 2)` (default `col_padding=0.0`, `min_col_width=12.0`, `max_col_width=50.0`, where `max_chars` spans per-column header lines—excluding spanning `group`—and `\n`-delimited data cell segments with `indent * 2` plus `+1` alignment-space character on formatted values with trailing alignment spaces; gutter-only columns use `gutter_col_width=3.0`). Cells whose effective width exceeds `max_col_width` or that contain `\n` newlines enable OpenXML `wrapText="1"` (`FormatAlign::VerticalCenter` on all data cells) and scale `SheetLayout.row_heights` to `lines * data_row_height` while leaving `.xlsx` row heights automatic for Excel font auto-fitting.
287
+ - Column width arbitration & text wrapping: Each physical worksheet column takes the maximum width across all tables spanning that column, computed as `round(clamp(max_chars * char_width_multiplier + col_padding, min_col_width, max_col_width), 2)` (default `col_padding=0.0`, `min_col_width=12.0`, `max_col_width=75.0`, where `max_chars` spans per-column header lines—excluding spanning `group`—and `\n`-delimited data cell segments with `indent * 2` plus `+1` alignment-space character on formatted values with trailing alignment spaces; gutter-only columns use `gutter_col_width=3.0`). Cells whose effective width exceeds `max_col_width` or that contain `\n` newlines enable OpenXML `wrapText="1"` (`FormatAlign::VerticalCenter` on all data cells) and scale `SheetLayout.row_heights` to `lines * data_row_height` while leaving `.xlsx` row heights automatic for Excel font auto-fitting.
288
288
 
289
289
  ---
290
290
 
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes