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

Feat: Generate bag name hashes from only certain metadata fields #104

Open
1 task done
zoidy opened this issue Aug 27, 2024 · 0 comments
Open
1 task done

Feat: Generate bag name hashes from only certain metadata fields #104

zoidy opened this issue Aug 27, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@zoidy
Copy link
Collaborator

zoidy commented Aug 27, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Description

Currently, the hash included in bag names is used to determine whether an item in figshare has changed and the bag needs to be updated. This has is generated from the entirety of the metadata contained in the JSON response in the Figshare API. To minimize the need to re-bag previously preserved items when the metadata has changed, PR #103 includes a function to sort and standardize the JSON. This issue is to further improve on that by only hashing fields that we care about.

Suggested Implementation

Add another function in Utils.py to calculate a hash based only on certain top-level keys we care about. A suggested list

  • files
  • custom_fields (if a new custom field is added, a quick test shows that it does not show up in already-published items)
  • authors (if an author changes their name or orcid, this is reflected in already-published items)
  • description
  • funding_list
  • version
  • license
  • tags
  • categories
  • related_materials
  • title
  • doi
  • defined_type_name
  • timeline
@zoidy zoidy added the enhancement New feature or request label Aug 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant