Skip to content

Get release label for a given genome_uuid#181

Open
bilalebi wants to merge 5 commits intomainfrom
get-release-label
Open

Get release label for a given genome_uuid#181
bilalebi wants to merge 5 commits intomainfrom
get-release-label

Conversation

@bilalebi
Copy link
Contributor

Changes

Implement GetReleaseLabelByUUID gRPC call

  • input:
    • genome_uuid: Mandatory
    • dataset_type: Optional
  • Output: Release label attached to the selected genome

Example

Query:

grpcurl -plaintext -d '{
  "genomeUuid": "a73351f7-93e7-11ec-a39d-005056b38ce3"
}' localhost:50051 ensembl_metadata.EnsemblMetadata.GetReleaseLabelByUUID

Response

{
  "release_label": "2023-10-18"
}

Context

This will be used by Thoas instead of GetReleaseVersionByUUID to get where the genome is stored in Mongo DB

Note

I will need to clean up the code once we stop using GetReleaseVersionByUUID

@bilalebi bilalebi self-assigned this Jan 20, 2026
@bilalebi bilalebi requested a review from darefalola January 20, 2026 14:06
else:
if len(release_version_result) > 1:
logger.warning(f"Multiple results returned. {release_version_result}")
response_data = msg_factory.create_label_version(release_version_result[0])
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there any other check that can be used to return a specific release label when there are multiple labels returned. Is it possible to sort by date or any other field to get the most appropriate release label for the genome uuid?

logger.warning("Missing or Empty Genome UUID field.")
return msg_factory.create_label_version()

release_version_result = db_conn.fetch_genome_datasets(genome_uuid=genome_uuid,
Copy link
Contributor

Choose a reason for hiding this comment

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

Should the variable be release_label_result instead of release_verison_result? The function name and conversation says we are getting release labels. It might cause confusion for any other person that might want to refactor this later.
Check the variable names. I also see release_version being passed to the function.

@bilalebi bilalebi requested a review from darefalola February 4, 2026 14:04
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.

2 participants