Skip to content

feat(v2.2.1): release: prepare ExcelAlchemy 2.2.1#58

Merged
ruicore merged 1 commit intomainfrom
v2.2
Apr 3, 2026
Merged

feat(v2.2.1): release: prepare ExcelAlchemy 2.2.1#58
ruicore merged 1 commit intomainfrom
v2.2

Conversation

@ruicore
Copy link
Copy Markdown
Contributor

@ruicore ruicore commented Apr 3, 2026

Summary

This PR prepares the 2.2.1 release 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

  • make DeclaredFieldMeta, RuntimeFieldBinding, WorkbookPresentationMeta, and ImportConstraints frozen internal structures
  • update FieldMetaInfo mutation paths to replace internal layer objects via structural updates instead of mutating them in place
  • normalize workbook presentation internals so character sets and options are stored in immutable forms

Typing refinements

  • tighten type boundaries in the Pydantic adapter around annotations, codecs, and normalized input payloads
  • reduce ambiguity in metadata and adapter internals while preserving 2.x behavior

Tests and release prep

  • add regression tests that verify split metadata layers behave like immutable value objects
  • add regression tests that verify facade-level metadata mutation replaces internal layers rather than mutating them in place
  • add 2.2.1 changelog entry
  • add docs/releases/2.2.1.md

Compatibility notes

  • no public import/export workflow API was removed
  • FieldMeta(...) and ExcelMeta(...) remain the stable public metadata entry points
  • the metadata layering changes are internal and preserve the public 2.x surface

Verification

  • ./.venv/bin/ruff check .
  • ./.venv/bin/uv run pyright
  • ./.venv/bin/pytest -q

Release intent

After merge, this branch is intended to be tagged and published as:

  • v2.2.1

@ruicore ruicore merged commit 5fc2fb6 into main Apr 3, 2026
5 checks passed
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 3, 2026

Codecov Report

❌ Patch coverage is 92.59259% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 86.56%. Comparing base (dd087b6) to head (38dbbf4).
⚠️ Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
src/excelalchemy/metadata.py 91.11% 4 Missing ⚠️
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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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()
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

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