6180: persist DCAT-US3 catalog metadata during harvest - #812
Open
Aguiardavidm wants to merge 8 commits into
Open
6180: persist DCAT-US3 catalog metadata during harvest#812Aguiardavidm wants to merge 8 commits into
Aguiardavidm wants to merge 8 commits into
Conversation
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Aguiardavidm
temporarily deployed
to
development
August 5, 2026 15:36 — with
GitHub Actions
Inactive
This was referenced Aug 5, 2026
Aguiardavidm
temporarily deployed
to
development
August 5, 2026 17:34 — with
GitHub Actions
Inactive
Aguiardavidm
temporarily deployed
to
development
August 5, 2026 17:34 — with
GitHub Actions
Inactive
Contributor
Author
jbrown-xentity
left a comment
Contributor
There was a problem hiding this comment.
This all looks great, but a schema change in DCAT-US3.0 means we need one more item cleaned/removed, and then this is good to go! See below comment with reference.
|
|
||
| # DCAT-US 3.0 Catalog fields that are harvested as their own records rather | ||
| # than stored inline on the catalog metadata. | ||
| DCATUS3_CATALOG_HARVESTED_FIELDS = ("dataset", "service", "record") |
Contributor
There was a problem hiding this comment.
So unfortunately this changed last minute @Aguiardavidm ; it should also exclude datasetSeries, see https://github.com/GSA/dcat-us/pull/162/changes#diff-a418ae196beadca489f75ac5098c2e3a211223057f86bcad24bde5014e81dee5R56
Aguiardavidm
had a problem deploying
to
development
August 7, 2026 18:11 — with
GitHub Actions
Failure
Aguiardavidm
had a problem deploying
to
development
August 7, 2026 18:11 — with
GitHub Actions
Failure
Aguiardavidm
had a problem deploying
to
development
August 7, 2026 20:02 — with
GitHub Actions
Failure
Aguiardavidm
had a problem deploying
to
development
August 7, 2026 20:02 — with
GitHub Actions
Failure
Aguiardavidm
had a problem deploying
to
development
August 7, 2026 20:08 — with
GitHub Actions
Failure
Aguiardavidm
had a problem deploying
to
development
August 7, 2026 20:08 — with
GitHub Actions
Failure
Aguiardavidm
temporarily deployed
to
development
August 7, 2026 21:17 — with
GitHub Actions
Inactive
Aguiardavidm
temporarily deployed
to
development
August 7, 2026 21:17 — with
GitHub Actions
Inactive
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.
Pull Request
Related to GSA/data.gov#6180
Supersedes #795, rewritten now that
datagov_data_accesshas been deprecated (GSA/data.gov#6209) and its models/migrations vendored directly into this repo. Also folds in the standalone DB migration from datagov_data_access#10, which targeted the now-defunct package and can no longer land there.About
Adds support for retaining DCAT-US 3.0 catalog-level metadata during a harvest, per the ticket's sketch:
dcatus_catalogJSONB column onharvest_job, chained onto this repo's current migration head.acquire_minimum_external_datanow captures the full downloaded catalog fordcatus3.0sources, recursively extracts every dataset (including datasets nested in sub-catalogs, however deep), and persists a stripped copy of the catalog metadata (withdataset/service/recordremoved, recursively) onto the job viaupdate_harvest_job.harvester/utils/general_utils.py:strip_dcatus3_catalog_objectsandextract_dcatus3_catalog_datasets.dcatus3_0_nested_catalog.json) and tests covering both the flat and nested-catalog cases, plus integration tests foradd_harvest_job/update_harvest_jobwithdcatus_catalog.No
datagov-catalogchanges are needed: catalog deliberately has noHarvestJobmodel (GSA/data.gov#6211, catalog never queriesharvest_job), and its FK-satisfying fixture stand-in is checked against a static snapshot that predates this column.Ran the full unit/integration suite locally; all passing tests remain green (12 pre-existing failures in
test_auth_logging.pyandtest_load_manager.pyreproduce identically on unmodifiedmainin this environment and are unrelated to this change).PR TASKS