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

#8944 - Extend 'metadatablocks/{block_id}' endpoint JSON output #9213

Merged
merged 8 commits into from
Dec 9, 2022

Conversation

JR-1991
Copy link
Contributor

@JR-1991 JR-1991 commented Dec 8, 2022

This is a continuation of PR #9091 due to a change of the branch name.

What this PR does / why we need it:

This PR extends the API endpoint /api/metadatablocks/{block_id} to include the following fields:

  • multiple: Whether or not multiple instances of this field can exist
  • isControlledVocabulary: Whether or not this field has a controlled vocabulary. Important to derive the typeClass later on
  • controlledVocabularyValues - If a vocabulary is given, includes all possible values.

With this extension it is possible to build compatible Dataverse JSON files for upload and download from any installation without having access to the TSV files. EasyDataverse would greatly benefit from this and allow users to "connect" to a Dataverse installation without the need of generating specific code.

Which issue(s) this PR closes:

Special notes for your reviewer:

None

Suggestions on how to test this:

Add or extend a fixture to test if the new fields are given upon execution.

Does this PR introduce a user interface change? If mockups are available, please link/include them here:

No.

Is there a release notes update needed for this change?:

The API endpoint /api/metadatablocks/{block_id} has been extended to include the following fields:

  • multiple: Whether or not multiple instances of this field can exist
  • isControlledVocabulary: Whether or not this field has a controlled vocabulary.
  • controlledVocabularyValues - If a vocabulary is given, includes all possible values.

Additional documentation:

None

@pdurbin pdurbin self-assigned this Dec 8, 2022
@pdurbin pdurbin added bk2211 Size: 30 A percentage of a sprint. 21 hours. (formerly size:33) labels Dec 8, 2022
@coveralls
Copy link

coveralls commented Dec 8, 2022

Coverage Status

Coverage decreased (-0.002%) to 19.997% when pulling ae83c27 on 8944-metadatablocks into 120adc1 on develop.

@mreekie mreekie removed the Size: 30 A percentage of a sprint. 21 hours. (formerly size:33) label Dec 8, 2022
@mreekie
Copy link

mreekie commented Dec 8, 2022

@pdurbin I removed the sizing for this. Let's talk during the standup.

@pdurbin pdurbin added the Size: 30 A percentage of a sprint. 21 hours. (formerly size:33) label Dec 8, 2022
@pdurbin
Copy link
Member

pdurbin commented Dec 8, 2022

@mreekie this is a one to one replacement. I carefully copied everything over. Yes, let's discuss!

@pdurbin
Copy link
Member

pdurbin commented Dec 8, 2022

@JR-1991 I went ahead and added some docs and a release note. Please take a look:

ae83c27 add docs #8944
2a87ae5 add release note #8944

You can preview the doc changes here:

I think this is ready for QA but at standup I plan on explaining that we could do a bit more work:

  • add tests for the isControlledVocabulary and multiple
  • get controlledVocabularyValues with non-English values

We could also defer this work, of course.

@JR-1991
Copy link
Contributor Author

JR-1991 commented Dec 8, 2022

@pdurbin thanks for adding the docs and release notes! From my side everything looks fine :-)

Copy link
Member

@pdurbin pdurbin left a comment

Choose a reason for hiding this comment

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

The new API test is passing (as are all other API tests): https://jenkins.dataverse.org/job/IQSS-Dataverse-Develop-PR/job/PR-9213/2/testReport/edu.harvard.iq.dataverse.api/MetadataBlocksIT/testGetCitationBlock/

Discussed at standup. Everyone seems ok with moving this to QA, especially because we'd probably need to do the extra work (supporting non-English languages) ourselves because the branch is in the IQSS repo and we're not sure if @JR-1991 can quickly add this. We'll wait until someone asks for it. Maybe @JayanthyChengan will save us again. 😅

Approved. Moving to QA.

@pdurbin pdurbin removed their assignment Dec 8, 2022
@kcondon kcondon self-assigned this Dec 9, 2022
@kcondon kcondon merged commit d9da8c5 into develop Dec 9, 2022
@kcondon kcondon deleted the 8944-metadatablocks branch December 9, 2022 17:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Size: 30 A percentage of a sprint. 21 hours. (formerly size:33)
Projects
Status: No status
5 participants