Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow management of data dictionaries in DKAN via API calls #3691

Merged
merged 4 commits into from
Oct 13, 2021

Conversation

clayliddell
Copy link
Contributor

@clayliddell clayliddell commented Oct 8, 2021

Adds a default data-dictionary schema to be used in future work to provide a native solution for column-level metadata, and for greater control over data types used in datastore imports.

  • Test coverage exists
  • Documentation exists

QA Steps

Test that the new data-dictionary API endpoints are working by:

  • Creating a new data-dictionary using the POST /api/1/metastore/schemas/data-dictionary/items endpoint
  • Fetching a data-dictionary using the GET /api/1/metastore/schemas/data-dictionary/items/{identifier} endpoint
  • Replacing a data-dictionary using the PUT /api/1/metastore/schemas/data-dictionary/items/{identifier} endpoint
  • Updating a data-dictionary using the PATCH /api/1/metastore/schemas/data-dictionary/items/{identifier} endpoint
  • Deleteing a data-dictionary using the DELETE /api/1/metastore/schemas/data-dictionary/items/{identifier} endpoint

Clayton Liddell added 4 commits October 8, 2021 14:20
Ensure distributions are substantially random.
Ensure at least one dataset exists for catalog "data.json" API test.
Ensure integration tests do not expect API results to change on shared
endpoints.
@clayliddell clayliddell added this to In progress in DKAN 2 Development via automation Oct 12, 2021
@clayliddell clayliddell moved this from In progress to Needs review in DKAN 2 Development Oct 12, 2021
@clayliddell
Copy link
Contributor Author

A part of this PR was adding complete integration testing for the Metastore API endpoints.
Unit tests are already in place for the underlying methods.

Copy link
Member

@dafeder dafeder left a comment

Choose a reason for hiding this comment

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

Just a note - this is an important first step, but we'll have to think about if we want to have certain schemas be core-only, as I think the functionality we build on top of this will be less abstract-able and more coupled to the specific schema than, say, the dataset and datastore queries. At minimum, we'll need to tell people with custom schemas on their site (most of the sites we're aware of) to copy this into their schema folder, but also have any code that depends on it fail gracefully if a dictionary schema is found not to be present.

@dafeder dafeder merged commit ab18e7d into 2.x Oct 13, 2021
DKAN 2 Development automation moved this from Needs review to Done Oct 13, 2021
@dafeder dafeder deleted the 5404-data-dictionaries-api branch October 13, 2021 15:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

None yet

2 participants