Skip to content

Conversation

@robcohen
Copy link

Summary

  • Fix mypy type errors across 18 Python files (no-any-return, attr-defined, type-arg, unused-ignore)
  • Add missing CostSpec protocol for cost specification handling
  • Make beanquery imports optional in contrib/scripts.py
  • Update sync-pre-commit.ts to use bun.lock instead of package-lock.json

Test plan

  • make mypy passes with no errors
  • pytest passes (460 tests)
  • tsc and svelte-check pass
  • Website tested manually in Chrome (Income Statement, Journal, Query pages)

🤖 Generated with Claude Code

robcohen and others added 25 commits January 23, 2026 08:16
Replace Python beancount parser with rustledger-wasm for faster parsing.
All 462 tests pass with the new backend.

Key changes:
- Add rustledger WASI engine and loader (src/fava/rustledger/)
- Add type adapters (RLTransaction, RLBalance, etc.) for rustledger entries
- Implement plugin execution in Python (auto_accounts, link_documents)
- Add beanquery compatibility layer for converting RL entries to beancount
- Update Fava core to handle both beancount and rustledger entry types
- Add custom hash function for rustledger dataclass entries
- Update flake.nix with uv for additional Python packages (pyexcel)

The original beancount backend can be used by setting FAVA_USE_BEANCOUNT=1.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add ccontexts property to RLDisplayContext to match beancount's
DisplayContext API. This eliminates ~50 lines of precision inference
code from number.py.

Changes:
- Add _RLCurrencyContext class with get_fractional() method
- Add ccontexts dict to RLDisplayContext
- Simplify number.py to use unified ccontexts API
- Remove redundant assertion in query_shell.py

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
New features in this build:
- Plugins returned in JSON for Python execution
- Includes returned with line numbers
- Custom directive values preserve type
- Batch command support (load + queries)
- Validation errors include line numbers
- PostingCost number_total for {{1000 USD}} syntax

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add type name mapping in serialisation.py to convert rustledger types
  (RLDocument, RLTransaction, etc.) to standard beancount types for JSON API
- Add _normalize_type macro in journal template to convert class names
  (rltransaction -> transaction, rlclose -> close) for CSS compatibility

Fixes Journal page showing empty entries and Documents page validation errors.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Provides Booking enum, Missing sentinel, and directive type names
to replace beancount type constants.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Make beancount/beanquery optional dependencies (beancount-compat extra)
- Remove beanquery_compat.py and beanquery stubs
- Update beans module to work with rustledger types
- Update core modules to use rustledger query engine
- Update rustledger module with improved type handling
- Update all test snapshots for new output format

The WASM module (rustledger-wasi.wasm) is bundled with the package
to ensure version compatibility between Python wrapper and WASM API.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Complete rename of the project from "fava" to "rustfava":

Package & Module:
- Renamed src/fava/ to src/rustfava/
- Updated all Python imports across codebase
- Changed CLI command from `fava` to `rustfava`
- Changed env var prefix from FAVA_* to RUSTFAVA_*

Classes:
- FavaLedger → RustfavaLedger
- FavaAPIError → RustfavaAPIError
- FavaExtensionBase → RustfavaExtensionBase
- FavaJSONProvider → RustfavaJSONProvider
- FavaOptions → RustfavaOptions
- FavaExtTest → RustfavaExtTest

Frontend:
- Updated package.json name
- Changed localStorage prefix from fava- to rustfava-

Build & Config:
- Updated pyproject.toml (name, scripts, URLs)
- Updated Makefile, flake.nix, Dockerfile
- Updated GitHub workflows
- Updated documentation (README, docs/, help/)

Tests:
- Updated all test imports and references
- Updated test snapshots
- Configured coverage exclusions for rustledger integration code

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Change all repository references from jmptable/rustfava to
rustledger/rustfava and jmptable/rustledger to rustledger/rustledger.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Clarify that Rustfava uses rustledger instead of Python's beancount
- Remove beanquery references (replaced by rustledger's query engine)
- Update all GitHub URLs to rustledger organization
- Add changelog entry explaining the fork and key differences
- Update help pages with correct module paths (rustfava.ext, etc.)
- Remove beancount version display (no longer applicable)
- Add notes about beancount-compat optional dependency for import

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Update all user-facing documentation to use uv instead of pip/pip3:
- README.rst
- docs/index.rst, usage.rst, changelog.rst
- src/rustfava/help/features.md, import.md
- contrib/docker/Dockerfile
- contrib/pythonanywhere/favatests/update.sh

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Major modernization changes:
- Bump minimum Python to 3.13, drop 3.10-3.12 support
- Replace npm with bun for frontend builds
- Remove typing-extensions dependency (use stdlib typing.override)
- Remove old-deps testing and constraints
- Remove duplicate CHANGES file (use docs/changelog.rst)
- Update CI workflows for Python 3.13/3.14 and bun
- Update flake.nix for Python 3.13 and bun
- Update pyinstaller spec for optional beancount
- Update pythonanywhere deployment scripts for rustfava
- Update development docs for bun

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Replace simplejson with stdlib json, using custom default function
  for Decimal serialization (preserves precision as strings)
- Slim Docker image to Alpine with multi-stage build
- Simplify pre-commit hooks to use bunx with system language
- Update beangulp stubs to reference rustfava

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Switch from Sphinx/RST to MkDocs/Markdown for documentation
- Add mkdocs-material theme with dark mode support
- Add mkdocstrings for API reference generation
- Convert all RST docs to Markdown
- Move deployment docs from contrib/ to docs/
- Update README.rst to README.md

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Update _build_backend.py to use bun instead of npm
- Remove obsolete docs/generate.py Sphinx generator script
- Update Makefile docs target to use mkdocs
- Remove simplejson from flake.nix (ply kept - used for filter parsing)
- Enable UV caching in all CI workflows (faster builds)
- Remove package-lock.json from .gitignore (using bun.lock)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Fix old `from fava` imports in contrib scripts (would crash at runtime)
- Replace deprecated `traceback.format_exception(*sys.exc_info())` with
  `traceback.format_exc()` in ingest.py
- Update `subprocess.call()` to `subprocess.run()` in auto_commit.py
- Update docstrings from "Fava" to "Rustfava" throughout codebase
- Consolidate test-js CI to ubuntu-only (frontend is OS-agnostic)
- Merge lint-python-mypy and lint-python-ty into single lint-python-types job

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Fix MANIFEST.in paths (src/fava → src/rustfava) for correct packaging
- Add SECURITY.md with vulnerability reporting guidelines
- Add Dependabot config for Python, npm, and GitHub Actions updates
- Add GitHub issue templates (bug report, feature request)
- Add CodeQL security scanning workflow

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Replace the old Fava PNG logo with the rustledger SVG icon for
consistent branding across the rustledger organization.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Replace the old Fava double-S logo with the new rustfava "rf" logo
(orange "r", white "f" on dark background) in the app header.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add gzip compression for JSON responses >500 bytes
- Add Cache-Control headers and ETag support for API caching
- Add Pydantic models for API request validation
- Pin CodeQL action versions to commit SHAs
- Add UV caching to all GitHub Actions workflows
- Replace os.path.normpath with Path.resolve()
- Use str.removeprefix() for cleaner string manipulation
- Add Docker improvements: HEALTHCHECK, LABEL, non-root user
- Add project URLs to pyproject.toml (Documentation, Issues, Changelog)
- Enable stricter TypeScript linting (noExplicitAny, noNonNullAssertion)
- Add artifact retention-days to docs workflow
- Expand SECURITY.md with CSP and deployment guidelines
- Convert prettier.config.cjs to ESM module
- Convert BeancountError from NamedTuple to dataclass
- Add Black target-version for Python 3.13
- Update docs workflow to Python 3.14
- Add py.typed marker for PEP 561
- Remove ty type-checker (consolidate on mypy)
- Add pytest-xdist for parallel test execution
- Add uv lock --check to CI
- Convert build.ts to camelCase conventions
- Fix frontend tests by restoring proper test script
- Add Node.js 24 to flake.nix for registerHooks API
- Fix Decimal serialization (float instead of string)
- Add ply as explicit dependency

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add concurrency control to cancel redundant PR runs
- Add timeout-minutes to all jobs (5-15 min)
- Add fail-fast: false to matrix strategies
- Add Node.js 24 setup for frontend tests (registerHooks API)
- Use --frozen-lockfile for bun install
- Add UV caching to publish workflow
- Switch to trusted publishing (OIDC) for PyPI
- Split publish into separate build/publish jobs
- Add pypi environment for deployment protection
- Upload/download artifacts between build and publish

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Fix no-any-return errors in rustledger engine with explicit casts
- Add missing type parameters to generic dict/tuple types
- Add CostSpec protocol for cost specification handling
- Replace direct attribute access with getattr() for ABC compatibility
- Make beanquery imports optional in contrib/scripts.py
- Update sync-pre-commit.ts to use bun.lock instead of package-lock.json
- Fix gzip encoding check in application.py

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Change mid-sentence "Rustfava" to "rustfava" throughout codebase
- Keep capitalized form at start of sentences and in titles
- Remove contrib/pythonanywhere/ directory (unused)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@yagebu
Copy link
Member

yagebu commented Jan 24, 2026

@robcohen: Wrong repo? ;)

@yagebu yagebu closed this Jan 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants