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 jsonpath to collect values when downloading a file #425

Merged
merged 3 commits into from
Oct 31, 2024

Conversation

crisely09
Copy link
Contributor

@crisely09 crisely09 commented Oct 31, 2024

There was a problem when doing something like:

forge.download(cell_types_ontology, path=my_path, content_type='application/ld+json')

when the encodingFormat was JSON, as it was used in the headers, and the metadata of the file was return instead of the content of the file.

Solution:
Use the default headers (Accept : */*) to download the content of a file and switch to jsonpath to collect values from a given path.

@codecov-commenter
Copy link

codecov-commenter commented Oct 31, 2024

Codecov Report

Attention: Patch coverage is 97.95918% with 1 line in your changes missing coverage. Please review.

Project coverage is 74.16%. Comparing base (bf14555) to head (8a97fab).

Files with missing lines Patch % Lines
kgforge/core/archetypes/read_only_store.py 80.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #425      +/-   ##
==========================================
+ Coverage   74.01%   74.16%   +0.15%     
==========================================
  Files         106      106              
  Lines        7020     7065      +45     
==========================================
+ Hits         5196     5240      +44     
- Misses       1824     1825       +1     
Flag Coverage Δ
unittests 74.16% <97.95%> (+0.15%) ⬆️

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.

Copy link
Collaborator

@lecriste lecriste left a comment

Choose a reason for hiding this comment

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

LGTM

@crisely09 crisely09 merged commit 0451e90 into master Oct 31, 2024
2 checks passed
@crisely09 crisely09 deleted the check_download branch October 31, 2024 13:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants