issue-cas-7746: extensions join table + vocabulary on Schemamapping#8032
Open
foozleface wants to merge 4 commits intoissue-7745from
Open
issue-cas-7746: extensions join table + vocabulary on Schemamapping#8032foozleface wants to merge 4 commits intoissue-7745from
foozleface wants to merge 4 commits intoissue-7745from
Conversation
…pping Adds the missing pieces for multi-mapping DwC archives: - Exportdatasetextension model + table linking ExportDataSet to multiple Schemamappings (core + N extensions) with sort order - vocabulary field on Schemamapping for vocab-locked mappings (e.g. dwc, ac) Fixes #7746 (extensions join table). Vocabulary support is required by the backend code for term/vocab validation; included here as a small schema completion ahead of the backend PR.
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
This was referenced Apr 27, 2026
… errors Adding the new `extensions` one-to-many relationship to ExportDataset in datamodel.py raised test_sqlalchemy_model_errors because the SQLAlchemy auto-generated models don't carry that relationship. Add an expected_errors entry for ExportDataset matching the codebase's existing pattern for other tables with similar gaps (Collection, Discipline, Division, etc.).
…eptions The ExportDataSetExtension.exportDataSet relationship is skipped by the SA model builder due to a casing mismatch (datamodel classname is 'ExportDataset' but referenced as 'ExportDataSet'), so it surfaces as a 'not_found' error. SchemaMapping has a known direction mismatch on its query relationship (datamodel one-to-one vs SA many-to-one). Both follow the codebase's existing pattern for tables with these gaps.
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.
Summary
First in a 7-PR atomic stack implementing Cal Academy's DwC export work on top of @CarolineDenis's schema foundation (#7873, #7874, #7877).
This PR adds:
ExportDataSetExtensionjoin table — links extensionSchemaMappings to a parentExportDataSetwith sort ordervocabularyfield onSchemaMapping— optional CharField(32) for tagging mappings to a controlled vocabularyMigration
specify.0048_extensions_and_vocabularydepends on0047_spqueryfield_dwc_fields(Caroline's PR #7873).Prerequisites
This PR is based on
issue-7745(PR #7877). The09815b3268commit visible in the diff is a rebased duplicate of #7873 (issue-7748); once #7873 lands, that commit folds into main on rebase.Stack
Subsequent PRs in this stack (each rebased on its predecessor):
Each PR maps to a single Specify issue and was tested independently.
Test plan
python manage.py test specifyweb.backend.export.tests.test_models— 8/8 passing