Skip to content

modeleon 0.2.2

Choose a tag to compare

@adilkhanovkz adilkhanovkz released this 19 Oct 16:50
· 4 commits to main since this release

Install or upgrade: pip install -U modeleon

  • mo.MIN / mo.MAX period by period — over two or more operands they give a series: mo.MIN(sweep, balance) caps a line in every period and mo.MAX(cash, inputs.min_cash) floors it, inside a loop=True container too, written as =MIN(…) / =MAX(…) in every column. Over one operand they stay the reduction over the row.
  • Formula cells carry the values the engine computed, so a reader that does not recalculate (a file preview, openpyxl with data_only=True, pandas) shows the model's numbers.
  • SUMPRODUCT — mo.SUM(price * volume) over laid-out rows is written as a live =SUMPRODUCT(…).
  • A declared sheet order — ExcelView(sheet={'order': ['summary', 'inputs']}).
  • Captions and units — a keyed line on a period sheet gets a caption row with its keys; a table gets a unit row under its captions; ExcelView(meta={'unit': False}) hides unit text everywhere.
  • Outline numbering — meta={'numbering': 'section'} numbers sections and lines as 1, 1.1, 1.1.1.
  • check_compat(model, 'excel') names every number baked into a formula, cell by cell.
  • Fixes: a compound lag fill is written in brackets, a subscript is written as its cell, a + chain past Excel's 8,192 characters folds into SUM, bare literals in number formats are quoted, and the workbook carries no green triangles of its writer's own making.

Behaviour changes: mo.MIN(a, b) / mo.MAX(a, b) over two series used to reduce both rows to one number; they now work period by period. ExcelView(meta={'unit': False}) used to equal unset; it now hides the unit suffixes too.

The full list is in CHANGELOG.md.