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

Give API resource classes __str__ methods #753

Merged
merged 5 commits into from
Aug 20, 2021
Merged

Give API resource classes __str__ methods #753

merged 5 commits into from
Aug 20, 2021

Conversation

jwodder
Copy link
Member

@jwodder jwodder commented Aug 20, 2021

Closes #751.

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

codecov bot commented Aug 20, 2021

Codecov Report

Merging #753 (91d3bf2) into master (05b9560) will increase coverage by 0.06%.
The diff coverage is 89.47%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #753      +/-   ##
==========================================
+ Coverage   84.77%   84.83%   +0.06%     
==========================================
  Files          59       59              
  Lines        6003     6021      +18     
==========================================
+ Hits         5089     5108      +19     
+ Misses        914      913       -1     
Flag Coverage Δ
unittests 84.83% <89.47%> (+0.06%) ⬆️

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

Impacted Files Coverage Δ
dandi/dandiapi.py 93.00% <84.61%> (-0.23%) ⬇️
dandi/tests/test_dandiapi.py 100.00% <100.00%> (ø)
dandi/delete.py 90.97% <0.00%> (-0.70%) ⬇️
dandi/dandiarchive.py 83.58% <0.00%> (-0.52%) ⬇️
dandi/_version.py 45.96% <0.00%> (+1.75%) ⬆️

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 05b9560...91d3bf2. Read the comment docs.

@yarikoptic
Copy link
Member

Please add some basic tests to ensure we get what we expect and don't kaboom while simply str'ing those objects

@jwodder
Copy link
Member Author

jwodder commented Aug 20, 2021

@yarikoptic Done.

dandi/dandiapi.py Outdated Show resolved Hide resolved
dandi/dandiapi.py Outdated Show resolved Hide resolved
dandi/dandiapi.py Outdated Show resolved Hide resolved
@yarikoptic
Copy link
Member

looks good

failing test

dandi/dandiarchive.py:532: in follow_redirect
    raise FailedToConnectError(
E   dandi.exceptions.FailedToConnectError: Response for getting https://bit.ly/dandi12 to redirect returned 400. Please verify that it is a URL related to dandiarchive and supported by dandi client

is unrelated ... we are retrying on 404 (only) there ... I wonder if we should retry on 400 ?

@yarikoptic yarikoptic merged commit 78d81de into master Aug 20, 2021
@yarikoptic yarikoptic deleted the gh-751 branch August 20, 2021 16:14
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.

provide user friendly __str__ for new API classes
2 participants