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

Switch default dandi instance to dandi-api based on redirector #565

Merged
merged 5 commits into from
Apr 15, 2021

Conversation

jwodder
Copy link
Member

@jwodder jwodder commented Apr 13, 2021

Closes #541.

@jwodder jwodder added the minor Increment the minor version when merged label Apr 13, 2021
@codecov
Copy link

codecov bot commented Apr 13, 2021

Codecov Report

Merging #565 (53b2021) into master (6a5f285) will increase coverage by 0.02%.
The diff coverage is 88.57%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #565      +/-   ##
==========================================
+ Coverage   83.70%   83.73%   +0.02%     
==========================================
  Files          62       62              
  Lines        6530     6559      +29     
==========================================
+ Hits         5466     5492      +26     
- Misses       1064     1067       +3     
Flag Coverage Δ
unittests 83.73% <88.57%> (+0.02%) ⬆️

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

Impacted Files Coverage Δ
dandi/dandiarchive.py 85.26% <78.57%> (-0.05%) ⬇️
dandi/utils.py 80.19% <80.00%> (-0.14%) ⬇️
dandi/delete.py 96.99% <100.00%> (ø)
dandi/tests/test_dandiarchive.py 100.00% <100.00%> (ø)
dandi/tests/test_utils.py 98.65% <100.00%> (+0.03%) ⬆️

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 6a5f285...53b2021. Read the comment docs.

gui=server_info["services"]["webui"]["url"],
redirector=redirector_url,
api=server_info["services"]["api"]["url"],
)
Copy link
Member

Choose a reason for hiding this comment

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

could we please retain robustness of .get to provide None? or what would be the benefit of client crashing here if redirector again just drops a field instead of explicitly annotating with null?

Copy link
Member Author

Choose a reason for hiding this comment

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

Done.

Copy link
Member

Choose a reason for hiding this comment

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

Thank you! next one to touch this piece of code is to reduce duplication. Let's proceed

@yarikoptic
Copy link
Member

besides one comment (I would prefer .get over [] unless there is a good reason), looks good to me. Should be taken out of the Draft and to be merged

@jwodder jwodder marked this pull request as ready for review April 15, 2021 20:15
@yarikoptic yarikoptic merged commit 90049f8 into master Apr 15, 2021
@yarikoptic yarikoptic deleted the gh-541 branch April 15, 2021 20:47
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.

automate switching to -i dandi-api via dandiarchive.org/server-info information
2 participants