EMMC-ASBL / tripper

Triplestore wrapper package for Python.
https://EMMC-ASBL.github.io/tripper
MIT License
6 stars 2 forks source link

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

Closed jesper-friis closed 1 month ago

jesper-friis commented 1 month ago

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

Checklist for the reviewer

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

codecov[bot] commented 1 month ago

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 :warning:
Additional details and impacted files ```diff @@ 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 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.