Repository navigation
linexcel 0.7.0
linexcel 0.7.0
Release backfillée (NOU-11) — 27 commits depuis v0.6.0. Notes : section CHANGELOG ci-dessous.
[0.7.0] — 2026-08-02
Added
-
Token accounting:
result.token_usagetallies everydocument()and
document_workbook()call, exposinginput_tokens,output_tokens,
total,requestsand a readablestr(). Recovered from the abandoned
feat/agnostic-aibranch, whose provider abstraction was superseded -
Counts are read from the provider when it reports them — Gemini's
usage_metadataand the OpenAI-compatibleusageblock — so the figure
matches what is billed. They are approximated only as a fallback, and
TokenUsage.estimatedthen flags the tally -
aidoc.estimate_tokens(), the fallback estimator, counts CJK characters
individually instead of letting\w+swallow a spaceless Japanese or Chinese
sentence as a single word -
Optional
usage=accumulator onaidoc.document_nodes()and
aidoc.document_workbook(), and aUsageReportingProviderprotocol that
custom providers may implement to report real counts. Return types are
unchanged, so existing callers are unaffected -
Seven more languages for
language=, covering both the AI prompts and the
viewer interface:es,de,it,pt,nl,ja,zh(withenand
fr, nine in total). The set stays a closed allowlist —languageselects a
stored system prompt and reaches the generated JavaScript, so free-form input
would be a prompt-injection and interpolation vector -
linexcel.i18n, single source of truth for the language list and the viewer
interface strings, which used to be hand-maintained inside the JS template.
The suite assertsi18n.UI_STRINGSand the twoaidocprompt registries
cover the same languages and the same keys -
Translation provenance is stated in the README, the AI guide and the
linexcel.i18ndocstring:enandfrare hand-written, the other seven
were produced with AI assistance and are not natively reviewed -
Multi-provider AI support: Google Gemini (default), OpenAI-compatible endpoints (Ollama, vLLM, LM Studio), and custom callables
-
base_urlandproviderparameters ondocument()anddocument_workbook() -
Environment variables:
LINEXCEL_AI_BASE_URL,LINEXCEL_AI_MODEL -
Optional dependency:
pip install linexcel[openai] -
README: multi-provider documentation section
-
linexcel.__version__, read from the installed distribution metadata -
max_workersondocument()to tune AI request concurrency
Fixed
- Workbook screenshots now work on Windows and macOS, not only Linux.
save_screenshots()looked for LibreOffice andpdftoppmonPATHalone,
which neither the Windows nor the macOS installer extends, so the renderer
reported itself as missing on machines where it was installed. Both binaries
are now also looked up in their standard install directory, including
winget's package store for Poppler - On Windows the renderer invokes
soffice.comrather thansoffice.exe:
soffice.exedetaches and returns immediately, so the conversion was reported
as finished before the PDF existed and the run failed with "LibreOffice did
not produce a PDF" - Screenshot rendering uses a throwaway LibreOffice user profile
(-env:UserInstallation). A LibreOffice already open on the desktop owns the
default profile, and the headless process would exit successfully having
converted nothing save_screenshots()reports which of the two binaries is missing and gives
the install command for the running platform, instead of naming both and
assuming Debian- The screenshot pane hard-coded its heading and its
Page Nbuttons in French,
so every report in the eight other languages was partly French. Both now go
throughlinexcel.i18n, which gains apagestring - The workbook-context example in the documentation iterated
result.workbook_contextas if it were keyed by sheet name; per-sheet context
lives under itssheetskey linexcel.PackageNotFoundErrorwas never meant to be public; the
importlib.metadataimport is now privateprovider=now accepts a plain callable, as the documentation always claimed;
previously only objects exposing ageneratemethod worked- VBA call edges were never emitted: the procedure lookup was keyed on
Module.Namewhile the call scanner reports unqualified names. Calls now
resolve in the calling module first, then across modules, and an ambiguous
name stays unresolved instead of pointing at an arbitrary module - VBA call detection is case-insensitive throughout, matching the language:
procedure lookups are keyed on the lowercased name, so two modules declaring
Tauxandtauxno longer capture each other's calls nor defeat the
ambiguity guard, and a function's own return assignment (Taux = 1) is not
mistaken for a call - A dotted name is a VBA call only when the qualifier is a module
(Module1.Taux, now resolved exactly);.Valueor.Countis member access
and no longer produces an edge to a similarly named procedure document()no longer discards every successful card when a single node
fails; failures are reported through aUserWarningandAiDocErroris
raised only when all nodes failto_html()no longer fails on aLineageResultbuilt without the workbook
bytes; the sheet-preview tab is simply omitted- Viewer template placeholders are substituted in a single pass. Chained
replacements let__TITLE__and__LANG__be rewritten inside the
already-injected graph, so a cell, sheet name, or comment containing either
literal was silently replaced by the title — and a title ending in a
backslash truncated the embedded JSON, blanking the viewer - The
cellsinterface string was used twice by the viewer but defined in no
locale, so reports fell through to the raw key ("1 000 cells" in French).
The unusedsheets_summary_titlekey was dropped
Changed
- Breaking:
render_html(),to_html()andsave_html()reject a
languageoutside("en", "fr")withValueError. It was previously
interpolated raw into the generated JavaScript, where it could terminate the
string literal; unknown values used to fall back to English at runtime pytestnow collects thesrc/doctests, whichtestpathsused to exclude- Generated validation artifacts are no longer tracked in the repository
- AI data-handling notes describe every provider, not just Gemini
save_screenshots(timeout=)defaults to 180 seconds instead of 60. A first
headless run builds the LibreOffice profile from scratch, which alone can
exceed the old budget on Windowslinexcel.insightsexposesfind_libreoffice()andfind_pdftoppm(), so a
caller can check the renderer is available before analyzing a workbooklinexcel.i18ngains apagestring, used by the screenshot page switcher
[0.3.0] - 2026-07-14
Added
- Localization:
en(default) andfrlanguage support for AI documentation and UI - Sidebar worksheet overview in HTML report
- Sheet-specific screenshot embedding in HTML report
- Workbook-level AI documentation (
document_workbook()) SECURITY.md,THIRD_PARTY_NOTICES.md
Changed
- Refined AI data handling documentation and security notes
[0.2.2] - 2026-07-10
Changed
- Improved formula decomposition and step evaluation
- Refined dependency graph edge resolution for named ranges
[0.1.0] - 2026-07-10
Added
- Initial release
- Formula extraction via formualizer (Rust engine)
- Stretched pattern grouping via R1C1 canonicalization
- Dependency graph: cells, ranges, defined names, VBA procedures
- Step-by-step composite function evaluation
- Standalone HTML viewer (Cytoscape.js, fully offline)
- Optional AI documentation via Google Gemini
- LibreOffice screenshot rendering
- PyPI trusted publishing