Conversation
Coverage Report
|
Both sides are kept. Beyond the mechanical resolution: - pyproject: main's 1.0.0 bump, alembic-postgresql-enum and self-referential `standard` extra, on top of this branch's reshaped extras (anyio is a core dependency, `outbox` is gone and `vectors` covers both backends). The docs and the sqlite loader's ImportError follow. - e2e: the `postgres` backend runs the pgvector image, since the vector suite needs the extension. `postgres17` cannot hold the uuidv7() defaulted tables at all, so the vector tables move behind `vector_search` and UUIDAuditArticle behind `server_side_uuidv7`. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
TranslatedRepository was declared as a bare SQLAlchemyRepository, so TranslatedRepository[Article] raised "not a generic class" and the model could only be set by hand -- unlike every other repository in the library. Add TranslatableBase and the TranslatableModel type var, mirroring the SoftDeleteBase / SoftDeleteModel pair, and bind the repository to them. A model carrying no translation table now raises TypeError on subclassing, the way SoftDeleteRepository validates its own. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
JSON_EXTRACT hands back a quoted JSON scalar there, so LIKE and ordering matched against the quotes as well. An equality comparison coerces its operand to JSON and agrees either way, which is what made the rest of the surface look correct. Found by the new e2e suite: every LIKE query over a TranslatedString column returned nothing on both backends. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
SQLAlchemy never leaves version_id_generator as True -- it normalises the default into a callable incrementing the version it is handed -- so the branch meant to emit `version + 1` was unreachable and the callable one ran instead, calling it with None and yielding 1 every time. An integer version column therefore stayed pinned at 1 across every update, silently voiding the optimistic concurrency guard: update_if_match could never tell a stale row from a fresh one. Key the decision off the column type instead, and skip the bump in bulk_update, where an executemany cannot carry an expression. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
i18n shipped with tests for the two locale slots alone: translatable.py sat at 35%, translation.py at 48%, mixin.py at 44%. Cover both backends -- the TranslatedString column and the translation table -- across the Translation value type, the pydantic hooks, the multi-locale helpers, the per-dialect compilation and the repository join, plus an e2e suite running all of it against the five real backends. Also cover the integer version counter and the server managed guard, the repository's database attribute, JSON literal rendering and the vector type's non-list paths, and mark the three dependency-absent ImportError guards no cover -- the extras are installed in this environment, so they were never reachable. Unit coverage 95% -> 99%. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
i18n was not mentioned anywhere in docs/ or the README despite shipping two storage backends. Add a narrative page covering both, the startup callables, the multi-locale helpers and per-backend behaviour, and note that mypy rejects translation_table() as a dynamic base. The api reference had no i18n and no vectors section either, though vectors ships a full page of its own; add both. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.