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

Avoid that tripper.Namespace crashes if the cache directory cannot be accessed #235

Merged
merged 2 commits into from
Aug 16, 2024

Conversation

jesper-friis
Copy link
Contributor

Description

Avoid that tripper.Namespace crashes if the cache directory cannot be accessed.

Unfortunately, if you use tripper with the rdflib backend, you may still get errors if the cache dir is not accessible. Try e.g.

XDG_CACHE_HOME=/root/.cache pytest tests/test_namespace.py

as a non-root user. It will result in a HTTPError, which is caused by that rdflib doesn't have permissions to store a downloaded turtle file in the cache directory.

Type of change

  • Bug fix and code cleanup
  • New feature
  • Documentation update
  • Testing

Checklist for the reviewer

This checklist should be used as a help for the reviewer.

  • Is the change limited to one issue?
  • Does this PR close the issue?
  • Is the code easy to read and understand?
  • Do all new feature have an accompanying new test?
  • Has the documentation been updated as necessary?
  • Is the code properly tested?

Copy link

codecov bot commented Aug 15, 2024

Codecov Report

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

Project coverage is 78.16%. Comparing base (8f38cbc) to head (5349147).
Report is 1 commits behind head on master.

Files Patch % Lines
tripper/namespace.py 69.23% 8 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #235      +/-   ##
==========================================
- Coverage   78.44%   78.16%   -0.29%     
==========================================
  Files          18       18              
  Lines        1698     1708      +10     
==========================================
+ Hits         1332     1335       +3     
- Misses        366      373       +7     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jesper-friis jesper-friis merged commit 2172204 into master Aug 16, 2024
17 of 19 checks passed
@jesper-friis jesper-friis deleted the cache-permissions branch August 16, 2024 13:29
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.

2 participants