Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #58 +/- ##
==========================================
+ Coverage 86.48% 86.56% +0.08%
==========================================
Files 48 48
Lines 3300 3306 +6
Branches 374 375 +1
==========================================
+ Hits 2854 2862 +8
+ Misses 278 277 -1
+ Partials 168 167 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 38dbbf4b90
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
|
||
| else: | ||
| raise ProgrammaticError(msg(MessageKey.VALUE_TYPE_DECLARATION_UNSUPPORTED, value_type=excel_codec)) | ||
| yield field_adapter.runtime_metadata() |
There was a problem hiding this comment.
Reject non-codec annotations during schema extraction
_extract_pydantic_model now unconditionally falls through to yield field_adapter.runtime_metadata() for every non-composite type, so models like name: str = FieldMeta(...) are accepted instead of being rejected. That stores str as excel_codec, and later import validation calls self.excel_codec.normalize_import_value(...), which raises runtime AttributeError rather than a clear configuration ProgrammaticError at startup. This is a regression from the previous issubclass(excel_codec, ExcelFieldCodec) guard and makes invalid model declarations fail much later and less predictably.
Useful? React with 👍 / 👎.
Summary
This PR prepares the
2.2.1release of ExcelAlchemy.It continues the stable 2.x line with deeper metadata layering, stronger internal immutability, and tighter type boundaries around the Pydantic adapter layer, while keeping the public import/export workflow API stable.
What changed
Metadata layering
DeclaredFieldMeta,RuntimeFieldBinding,WorkbookPresentationMeta, andImportConstraintsfrozen internal structuresFieldMetaInfomutation paths to replace internal layer objects via structural updates instead of mutating them in placeTyping refinements
Tests and release prep
2.2.1changelog entrydocs/releases/2.2.1.mdCompatibility notes
FieldMeta(...)andExcelMeta(...)remain the stable public metadata entry pointsVerification
./.venv/bin/ruff check ../.venv/bin/uv run pyright./.venv/bin/pytest -qRelease intent
After merge, this branch is intended to be tagged and published as:
v2.2.1