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

Updates targeting Collection and Upload #754

Open
yuanzhou opened this issue Mar 5, 2024 · 1 comment
Open

Updates targeting Collection and Upload #754

yuanzhou opened this issue Mar 5, 2024 · 1 comment
Assignees
Labels
P Pitt dev team

Comments

@yuanzhou
Copy link
Member

yuanzhou commented Mar 5, 2024

Corresponding to hubmapconsortium/entity-api#632, first switch to use the /documents/<id> for retrieving the Collections:

def get_collection(self, entity_id):
logger.info(f"Start executing get_collection() on uuid: {entity_id}")
# The entity-api returns public collection with a list of connected public/published datasets, for either
# - a valid token but not in HuBMAP-Read group or
# - no token at all
# Here we do NOT send over the token
url = self.entity_api_url + "/entities/" + entity_id

Then switch to the new fields when iterating over the datasets associated with a Collection or Upload during the index procedure.

# Used for Upload and Collection index
def add_datasets_to_entity(self, entity):
logger.info("Start executing add_datasets_to_entity()")
datasets = []
if 'datasets' in entity:

  • For Collection, change to use member_uuids
  • For Upload, change to use dataset_uuids

Keep using datasets as the final field that gets indexed otherwise it'll break the Harvard portal-ui:

entity['datasets'] = datasets

Later, ask the Harvard team and IU (not sure if they are affected) to switch from Collection.datasets parsing to Collection.member_uuids, the same applies to Upload.datasets -> Upload.dataset_uuids.

@yuanzhou yuanzhou added the P Pitt dev team label Mar 5, 2024
@yuanzhou yuanzhou changed the title Corresponding index procedure updates targeting Collection and Upload Updates targeting Collection and Upload Mar 5, 2024
@yuanzhou
Copy link
Member Author

yuanzhou commented May 6, 2024

Move to backlog

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P Pitt dev team
Projects
Status: Backlog
Development

No branches or pull requests

2 participants