averbis / averbis-python-api

Conveniently access the REST API of Averbis products using Python
Apache License 2.0
12 stars 4 forks source link

Issue #139: Normalize URL in Client #140

Closed DavidHuebner closed 1 year ago

DavidHuebner commented 1 year ago
DavidHuebner commented 1 year ago

Ready to be reviewed.

codecov-commenter commented 1 year ago

Codecov Report

Merging #140 (08a43f2) into dev (234196f) will increase coverage by 0.01%. The diff coverage is 100.00%.

:mega: This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@            Coverage Diff             @@
##              dev     #140      +/-   ##
==========================================
+ Coverage   92.24%   92.26%   +0.01%     
==========================================
  Files          16       16              
  Lines        2167     2172       +5     
==========================================
+ Hits         1999     2004       +5     
  Misses        168      168              
Impacted Files Coverage Δ
averbis/__init__.py 100.00% <ø> (ø)
averbis/__version__.py 0.00% <ø> (ø)
averbis/core/_rest_client.py 86.81% <100.00%> (+0.04%) :arrow_up:
tests/test_client.py 100.00% <100.00%> (ø)
tests/test_document_collection.py 100.00% <100.00%> (ø)
tests/test_pipeline.py 100.00% <100.00%> (ø)

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

reckart commented 1 year ago

The # marks an anchor fragment in an URL of a HTML page. If you encounter that in an URL, you can remove it any anything coming after it for the purposes of the client. But to be honest, I think the client should not accept this and rather produce a helpful error message educating the user that a valid server URL does not contain anchors/fragments.