WIP-Katsu: new dataset model in katsu#665
Draft
SanjeevLakhwani wants to merge 29 commits intodevelopfrom
Draft
Conversation
Add a mixin that enables Django models to split Pydantic schema fields between actual database columns and a JSONB field, with methods to convert between schema and model instances.
Switch bento-lib dependency from PyPI release to git branch to pull in new dataset model schema and related features.
Ensures proper JSON serialization of complex types (datetime, etc.) when storing in JSONB columns.
Introduces DatasetV2 using PydanticJSONBMixin for hybrid column/JSONB storage based on bento_lib's DatasetModel schema. Key columns are indexed for efficient querying while full payload is stored in JSONB. Also renames old Dataset.project related_name to datasets_old to prepare for migration.
- Add DatasetV2Serializer with Pydantic validation on input and schema-based output representation - Add DatasetV2ViewSet with project_id filtering support - Register /datasets_v2 endpoint in REST API urls
Adds a Django management command that converts legacy Dataset records into DatasetV2 using a best-effort mapping from DATS-style fields to ProjectScopedDatasetModel. Supports --dry-run, --skip-existing, --force-placeholder, --language, and --dataset-id options.
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## develop #665 +/- ##
===========================================
- Coverage 94.52% 92.74% -1.79%
===========================================
Files 135 136 +1
Lines 5515 5705 +190
Branches 523 542 +19
===========================================
+ Hits 5213 5291 +78
- Misses 212 324 +112
Partials 90 90 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Replace composite (identifier, language) primary key with identifier-only PK. Add DatasetV2Translation model for non-default-language provenance data with full CRUD API at /datasets_v2/<id>/translations[/<lang>]. Fix project_id bug in update/destroy authz checks.
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.
No description provided.