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

Add metadata editing #8

Merged
merged 5 commits into from
Jun 11, 2019
Merged

Add metadata editing #8

merged 5 commits into from
Jun 11, 2019

Conversation

Ajax23
Copy link
Contributor

@Ajax23 Ajax23 commented May 29, 2019

Added three functions for editing metadata. If necesarry tests can be added.

  • put_request: Make a PUT request using the rquest package, which is needed for editing
  • get_dataset_metadata: returns a dictionary containing the metadatablocks of a given dataset
  • edit_dataset_metadata: updates the dataset metadata

Additionally utilities function dict_to_json now ensures encoding by default. If there was a reason it should not, an additional boolean could be added to the function.

The documentation was written in the same style except for curl calls which was moved to own code-blocks and urls which now align with the official sphinx guide. If this style agrees with the auther, the whole documentation should be adapted.

@skasberger
Copy link
Member

skasberger commented May 29, 2019

Thanks, that's a great PR!

Will do the review in the next days. Right now, I am in the middle of adding models.py, with metadata data models for Dataverses, Datasets and Datafiles for release 0.2.0. The file api.py will not be touched for this from my side, so maybe i will add your PR functionality to 0.2.0. But as this is the first time i work within a real open source development workflow, i have to do some research, how this is done best (release management, implement PRs, etc.). And need to finish the release before i leave to the Dataverse Community Conference, so I can present something nice. So am a bit busy, but thanks again for your great contribution!

@skasberger skasberger merged commit c846cde into gdcc:develop Jun 11, 2019
@skasberger
Copy link
Member

I have removed the get_dataset_metadata() function, because in the next release, there will be metadata manipulation functions included, which can be used to address the metadata directly. Thanks again for your contribution.

@Ajax23 Ajax23 deleted the edit_metadata branch June 14, 2019 10:17
djbrooke pushed a commit to djbrooke/pyDataverse that referenced this pull request Feb 9, 2021
skasberger added a commit that referenced this pull request Apr 7, 2021
@JR-1991 JR-1991 added this to the v0.3.1 milestone May 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants