Skip to content

Refactor schema profiles and resolution - #42

Merged
ileodo merged 5 commits into
mainfrom
refactor/profile
Oct 8, 2026
Merged

ileodo merged 5 commits into
mainfrom
refactor/profile

Conversation

@ileodo

@ileodo ileodo commented Oct 8, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Move schema field definitions, raw row handling, and database-specific resolution into the new schema package.
  • Add SchemaProfile so model fields are resolved through inherited field definitions, with errors grouped by field. MoneywizApi can accept a custom profile and validates it before loading.
  • Resolve tag join table metadata from the database and pass the resolved profile through the accessor and managers.
  • Create records through the profile, including plain dataclass subclasses, and document custom profile usage in the README.
  • Let profile validation discover loaded Record subclasses by default while accepting an explicit model list for scoped validation.

Test evidence

  • ruff format src tests — applied.
  • ruff check src tests — passed.
  • pytest -q — 26 passed, 15 skipped. The skipped integration tests require MONEYWIZ_TEST_DB_PATH.
  • git diff --check — passed.

@ileodo
ileodo merged commit a68dfa4 into main Oct 8, 2026
5 checks passed
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.

1 participant