BlueBrain / nexus-forge

Building and Using Knowledge Graphs made easy
https://nexus-forge.readthedocs.io
GNU Lesser General Public License v3.0
38 stars 19 forks source link

Use full url to download files. #283

Closed crisely09 closed 1 year ago

crisely09 commented 1 year ago

Related to https://github.com/BlueBrain/nexus-forge/issues/282 The idea is to check if the contentUrl is already expanded and use it as given. When the file_id is passed, then do the standard url construction, i.e. endpoint/org/proj/file_id .

codecov-commenter commented 1 year ago

Codecov Report

Merging #283 (c992e76) into master (e4edeca) will decrease coverage by 0.10%. The diff coverage is 8.69%.

@@            Coverage Diff             @@
##           master     #283      +/-   ##
==========================================
- Coverage   72.85%   72.75%   -0.10%     
==========================================
  Files          88       88              
  Lines        5574     5583       +9     
==========================================
+ Hits         4061     4062       +1     
- Misses       1513     1521       +8     
Flag Coverage Δ
unittests 72.75% <8.69%> (-0.10%) :arrow_down:

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

Impacted Files Coverage Δ
kgforge/specializations/resources/datasets.py 62.88% <0.00%> (ø)
kgforge/specializations/stores/bluebrain_nexus.py 22.43% <7.69%> (+0.09%) :arrow_up:
kgforge/core/archetypes/store.py 58.87% <12.50%> (-2.70%) :arrow_down:
MFSY commented 1 year ago

Looks good. Fixed the following errors (introduced in previous merged commits) occurring when downloading:

crisely09 commented 1 year ago

I see that you added the solution to the cross_bucket problem here, that is good, two birds in one shot. Maybe we could add an example for downloading using cross_bucket=True if it doesn't already exist.

MFSY commented 1 year ago

I see that you added the solution to the cross_bucket problem here, that is good, two birds in one shot. Maybe we could add an example for downloading using cross_bucket=True if it doesn't already exist.

It is mentioned both in the Querying and Dataset notebooks.