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

Use yarl to clean up some code #1415

Merged
merged 3 commits into from
Mar 6, 2024
Merged

Use yarl to clean up some code #1415

merged 3 commits into from
Mar 6, 2024

Conversation

jwodder
Copy link
Member

@jwodder jwodder commented Mar 1, 2024

Closes #1380.

@jwodder jwodder added dependencies Update one or more dependencies version code quality Nonfunctional improvements to the codebase labels Mar 1, 2024
Copy link

codecov bot commented Mar 1, 2024

Codecov Report

Attention: Patch coverage is 72.41379% with 8 lines in your changes are missing coverage. Please review.

Project coverage is 68.09%. Comparing base (2cafb50) to head (e58df62).
Report is 3 commits behind head on master.

Files Patch % Lines
dandi/utils.py 62.50% 6 Missing ⚠️
dandi/dandiapi.py 66.66% 1 Missing ⚠️
dandi/tests/test_delete.py 75.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           master    #1415       +/-   ##
===========================================
- Coverage   88.53%   68.09%   -20.44%     
===========================================
  Files          77       77               
  Lines       10527    10522        -5     
===========================================
- Hits         9320     7165     -2155     
- Misses       1207     3357     +2150     
Flag Coverage Δ
unittests 68.09% <72.41%> (-20.44%) ⬇️

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.

@jwodder jwodder marked this pull request as ready for review March 1, 2024 17:59
@jwodder jwodder requested a review from yarikoptic March 1, 2024 17:59
u1 = u1.with_path(u1.path.rstrip("/"))
u2 = URL(url2)
u2 = u2.with_path(u2.path.rstrip("/"))
return u1 == u2
Copy link
Member

Choose a reason for hiding this comment

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

so how is this better? will it reorder query params or smth to find equality? if so -- would be nice to add a testcase which would solidify adding such capability which was not present before.

Copy link
Member Author

Choose a reason for hiding this comment

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

It normalizes various URL bits, such as lowercasing the scheme & host and normalizing internationalized domain names.

Copy link
Member Author

Choose a reason for hiding this comment

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

Tests added: e58df62

@jwodder
Copy link
Member Author

jwodder commented Mar 5, 2024

The current test failures are due to connection issues with purl.obolibrary.org.

@yarikoptic
Copy link
Member

I filed an issue

@yarikoptic yarikoptic merged commit ee18a15 into master Mar 6, 2024
9 of 28 checks passed
@yarikoptic yarikoptic deleted the gh-1380 branch March 6, 2024 00:35
@yarikoptic
Copy link
Member

fwiw ontobee is back online, tests passed after merging

Copy link

🚀 PR was released in 0.61.0 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code quality Nonfunctional improvements to the codebase dependencies Update one or more dependencies version released
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use a dedicated URL-handling library
2 participants