Skip to content

Factor out common fields in nwb2asset() and get_default_metadata()#1088

Merged
yarikoptic merged 1 commit intomasterfrom
gh-456
Aug 1, 2022
Merged

Factor out common fields in nwb2asset() and get_default_metadata()#1088
yarikoptic merged 1 commit intomasterfrom
gh-456

Conversation

@jwodder
Copy link
Contributor

@jwodder jwodder commented Aug 1, 2022

Closes #456.

@jwodder jwodder added the internal Changes only affect the internal API label Aug 1, 2022
@codecov
Copy link

codecov bot commented Aug 1, 2022

Codecov Report

Attention: Patch coverage is 97.14286% with 1 line in your changes missing coverage. Please review.

Project coverage is 88.52%. Comparing base (afae8e8) to head (ba51aad).
Report is 958 commits behind head on master.

Files Patch % Lines
dandi/metadata.py 96.29% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1088      +/-   ##
==========================================
+ Coverage   88.50%   88.52%   +0.01%     
==========================================
  Files          73       73              
  Lines        9306     9295      -11     
==========================================
- Hits         8236     8228       -8     
+ Misses       1070     1067       -3     
Flag Coverage Δ
unittests 88.52% <97.14%> (+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.

def extract_digest(
metadata: dict,
) -> Optional[Dict[models.DigestType, str]]:
def extract_digest(metadata: dict) -> Optional[Dict[models.DigestType, str]]:
Copy link
Member

Choose a reason for hiding this comment

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

I see no content difference -- why is it jumping like this then -- did we change blacking settings since last time this file was modified?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, I just noticed that the signature could fit on one line and felt compelled to fix it.

@yarikoptic
Copy link
Member

Thanks! I dislike functions with undocumented side-effects, but that is ok for now. Let's proceed.

@yarikoptic yarikoptic merged commit 84f3ead into master Aug 1, 2022
@yarikoptic yarikoptic deleted the gh-456 branch August 1, 2022 19:53
@jwodder jwodder mentioned this pull request Aug 4, 2022
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

internal Changes only affect the internal API

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rewrite nwb2asset() to use get_default_metadata() as a base

2 participants