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

Publicly expose classmethods for constructing API resource instances #808

Merged
merged 1 commit into from
Oct 22, 2021

Conversation

jwodder
Copy link
Member

@jwodder jwodder commented Oct 20, 2021

This will help with a plan I have for making backups2datalad.py more asynchronous.

@jwodder jwodder added the minor Increment the minor version when merged label Oct 20, 2021
@codecov
Copy link

codecov bot commented Oct 20, 2021

Codecov Report

Merging #808 (b0f7d33) into master (0acafbe) will decrease coverage by 0.29%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #808      +/-   ##
==========================================
- Coverage   84.91%   84.62%   -0.30%     
==========================================
  Files          61       61              
  Lines        6152     6153       +1     
==========================================
- Hits         5224     5207      -17     
- Misses        928      946      +18     
Flag Coverage Δ
unittests 84.62% <100.00%> (-0.30%) ⬇️

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

Impacted Files Coverage Δ
dandi/dandiapi.py 86.14% <100.00%> (-0.33%) ⬇️
dandi/support/generatorify.py 0.00% <0.00%> (-16.10%) ⬇️
dandi/download.py 81.69% <0.00%> (-0.55%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0acafbe...b0f7d33. Read the comment docs.

Copy link
Member

@yarikoptic yarikoptic left a comment

Choose a reason for hiding this comment

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

Looks good and makes sense. I only wonder if we have somewhere verbalized the difference between data (dandi-api data records typically returned by dandi-api server, whenever they are not metadata records) and metadata (metadata records, following dandischema, which might be returned as "metadata" field within data or returned explicitly by some endpoints?) here?

@jwodder
Copy link
Member Author

jwodder commented Oct 20, 2021

@yarikoptic The closest thing to an explanation in this PR is the statement in RemoteAsset.from_data()'s docstring that it takes "a dict of raw data in the same format as returned by the API's pagination endpoints". I'm not sure how best to describe the other datas.

@yarikoptic
Copy link
Member

ok, let's proceed then

@yarikoptic yarikoptic merged commit 04aab25 into master Oct 22, 2021
@yarikoptic yarikoptic deleted the make branch October 22, 2021 18:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
minor Increment the minor version when merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants