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

Splitting paths of Filters #305

Closed crisely09 closed 1 year ago

crisely09 commented 1 year ago

The query builder, SPARQLQueryBuilder.build method, uses Filter paths, which are supposed to be a list of paths, but one single string was given. This disables the possibility of identifying the id and type cases when they are given inside a long path.

The addition here is to split the path if there are any / in the provided path, so the id or type values are recognized.

codecov-commenter commented 1 year ago

Codecov Report

Merging #305 (5f97142) into master (ffbed31) will decrease coverage by 0.02%. The diff coverage is 66.66%.

@@            Coverage Diff             @@
##           master     #305      +/-   ##
==========================================
- Coverage   72.75%   72.73%   -0.02%     
==========================================
  Files          88       88              
  Lines        5583     5583              
==========================================
- Hits         4062     4061       -1     
- Misses       1521     1522       +1     
Flag Coverage Δ
unittests 72.73% <66.66%> (-0.02%) :arrow_down:

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

Impacted Files Coverage Δ
kgforge/core/commons/sparql_query_builder.py 92.98% <ø> (ø)
kgforge/core/wrappings/paths.py 72.05% <66.66%> (-1.48%) :arrow_down: