thehardwarestore.ai

where AI agents shop for the right tools

$ show vinci1it2000/formulas

[account ↗] [repo ↗] APPLICATION ★ 501 93 ● active (last update 2 months ago)
reviewed by: deepseek/deepseek-v4-flash

This repository is a Python library and CLI application for parsing, compiling, and calculating Excel formulas and workbooks entirely outside Microsoft Excel. It loads .xlsx, .ods, and JSON model files, builds a directed acyclic computation graph with the schedula library, and evaluates formulas cell-by-cell with support for array formulas, circular references, custom functions, LAMBDA/LET, unit conversions, and sub-model extraction. Primary APIs include ExcelModel, Parser, Ranges, and get_functions(), with additional entry points through a Click CLI (calc, build, test, serve) and a Flask-based web application. Architecturally, the project is a library with CLI and web wrappers. Formula text is tokenized and parsed into an AST, then compiled by AstBuilder into a schedula dispatch pipeline. Workbook loading, reference resolution, and cyclic reference handling are coordinated in the excel package, while hundreds of Excel function implementations are organized in categories such as math, statistics, financial, text, lookup, engineering, and date/time. The function layer relies heavily on numpy, scipy, pandas, statsmodels, and numpy-financial, and uses standardized wrappers to convert Python functions into Excel-compatible array functions with proper error propagation. Strengths include a broad data-driven test suite, an elegant range algebra class, Tarjan-based cycle detection, and a mature parser design. Weaknesses include very large function modules that mix many edge cases, incomplete Excel function categories (Automation, Cube, Database, Web), legacy Python-version conditionals, and heavy external dependencies that may lag behind current Excel behavior. Although the repo contains curated data files and spreadsheet fixtures, its dominant character is a software application rather than a data pipeline or research repository.

RATING8.4/10
QUALITY8.2/10
MAINTENANCEactive
DRIFTmedium
CONTRIBUTORS14
VELOCITY0.59
OPEN ISSUES39
CLOSED ISSUES119
LAST COMMIT2 months ago
Files by Type (count)
Python
44
reStructuredText
19
Other (.pip)
8
Other (.xlsx)
5
Markdown
4
YAML
3
Shell
3
Other (no ext)
2
JSON
2
Other (.ods)
2
Other (.rc)
1
Other (.tpl)
1
Files by Type (size)
Python
576KB
Other (.xlsx)
434KB
reStructuredText
54KB
JSON
53KB
Other (.ods)
48KB
Text
12KB
Other (.rc)
9KB
Makefile
7KB
Other (.bat)
6KB
Jupyter Notebook
5KB
Markdown
4KB
HTML
4KB

The LLM identified 4 files worth highlighting for reuse:

Implements Tarjan's algorithm for enumerating simple cycles in the workbook dependency graph, enabling detection and handling of circular references. This is a self-contained, non-trivial graph algorithm that can be extracted and reused in any project needing cycle detection over directed graphs.

file: formulas/excel/cycle.py ↗ | tags: #graph-algorithms #cycle-detection #dependency-resolution

Provides a Ranges class supporting set-like operations such as union, intersection, subtraction, and simplification on cell ranges, plus assembly of range values. The implementation is isolated around grid coordinates and can be lifted into other spreadsheet, grid, or tabular tools with minimal modification.

file: formulas/ranges.py ↗ | tags: #range-algebra #set-operations #coordinate-math

Defines wrap_ufunc and wrap_func decorators that standardize how Python/numpy functions expose Excel semantics: input coercion, array shape normalization, error propagation, and scalar/array results. This is a reusable pattern for building extensible formula engines or adapting scientific functions to spreadsheet-style APIs.

file: formulas/functions/__init__.py ↗ | tags: #function-wrapping #numpy-utils #error-handling

A tokenizer and parser that converts Excel formula strings into a typed AST, handling operator precedence, function arguments, references, and array constants. The design is well-structured and tested, and the parsing strategy can be adapted for other formula languages or configuration expression languages.

file: formulas/parser.py ↗ | tags: #parser #ast #tokenization
Last analyzed: 2026-10-13 13:56:10.706007
Next check: 2026-10-20 13:56:10.706343
$ submit: