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

Validate metadata #530

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft

Conversation

stellaprins
Copy link
Contributor

@stellaprins stellaprins commented Mar 14, 2025

Description

What is this PR

  • Bug fix
  • Addition of a new feature
  • Other

Why is this PR needed?
_rich_atlas_metadata expects that the metadata has only a single comma, in a specific place. However, some atlasses have citation metadata without comma or containing multiple commas, for these there will be an error when trying to print their information to the screen. See #525 for more context.

What does this PR do?

  • _rich_atlas_metadata does not split citation string up in two parts (using a comma as seperator) like before.
  • validate_metadata function added to validate the type of metadata of generated atlasses

References

#525

How has this PR been tested?

  • test_validate_metadata checks whether metadata is validated correctly for a few testcases
  • Visual inspection of the rich panel before and after change (see screenshot below).

Before (left) and after (right; note the comma after "Wang et al 2020"):
image

Is this a breaking change?

No.

Does this PR require an update to the documentation?

No.

Checklist:

  • The code has been tested locally
  • Tests have been added to cover all new functionality (unit & integration)
  • The documentation has been updated to reflect any changes
  • The code has been formatted with pre-commit

@stellaprins stellaprins mentioned this pull request Mar 14, 2025
4 tasks
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.

1 participant