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

[builder] Add collection_doi_label to the datasets dataframe #1200

Merged
merged 2 commits into from
Jun 27, 2024

Conversation

ebezzi
Copy link
Member

@ebezzi ebezzi commented Jun 21, 2024

Fixes #1180

@ebezzi ebezzi changed the title Add collection_doi_label to the datasets dataframe [builder] Add collection_doi_label to the datasets dataframe Jun 21, 2024
@@ -90,6 +90,7 @@ def load_manifest_from_CxG() -> list[Dataset]:
collection_id=dataset["collection_id"],
collection_name=null_to_empty_str(dataset["collection_name"]),
collection_doi=null_to_empty_str(dataset["collection_doi"]),
collection_doi_label=null_to_empty_str(dataset.get("collection_doi_label")),
Copy link
Contributor

Choose a reason for hiding this comment

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

Here you are using dataset.get("...") which does simply returns None if the key doesn't exist - that is, it does not raise an exception. The other calls use dataset["..."] which raise on exception if the key doesn't exist.

Should this semantics be made consistent? Maybe the other key lookups in null_to_empty_str() should use dataset.get(...) instead?

Copy link

codecov bot commented Jun 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.11%. Comparing base (fc0281b) to head (9c130f7).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1200   +/-   ##
=======================================
  Coverage   91.11%   91.11%           
=======================================
  Files          77       77           
  Lines        5922     5923    +1     
=======================================
+ Hits         5396     5397    +1     
  Misses        526      526           
Flag Coverage Δ
unittests 91.11% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ebezzi ebezzi merged commit 1298aa9 into main Jun 27, 2024
15 checks passed
@ebezzi ebezzi deleted the ebezzi/add-collection-doi-label branch June 27, 2024 18:38
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.

Implement collection_doi_label in builder
2 participants