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

Pass view when forge.sparql, forge.elastic, forge.search call #373

Closed ssssarah closed 8 months ago

ssssarah commented 8 months ago

Feature to be able to specify a view when calling forge.sparql, forge.elastic and forge.search, instead of always using the one defined in the config

codecov-commenter commented 8 months ago

Codecov Report

Attention: 16 lines in your changes are missing coverage. Please review.

Comparison is base (8a900ec) 74.52% compared to head (691a1c9) 74.51%.

Files Patch % Lines
kgforge/specializations/stores/bluebrain_nexus.py 23.07% 10 Missing :warning:
kgforge/specializations/stores/demo_store.py 71.42% 2 Missing :warning:
kgforge/core/archetypes/dataset_store.py 66.66% 1 Missing :warning:
kgforge/core/archetypes/read_only_store.py 50.00% 1 Missing :warning:
kgforge/core/archetypes/store.py 66.66% 1 Missing :warning:
kgforge/core/forge.py 0.00% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #373 +/- ## ========================================== - Coverage 74.52% 74.51% -0.02% ========================================== Files 100 100 Lines 6332 6332 ========================================== - Hits 4719 4718 -1 - Misses 1613 1614 +1 ``` | [Flag](https://app.codecov.io/gh/BlueBrain/nexus-forge/pull/373/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=BlueBrain) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/BlueBrain/nexus-forge/pull/373/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=BlueBrain) | `74.51% <74.60%> (-0.02%)` | :arrow_down: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=BlueBrain#carryforward-flags-in-the-pull-request-comment) to find out more.

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

crisely09 commented 8 months ago

looks good, could you provide either a test or expand the query example notebook to use the view parameter?

ssssarah commented 8 months ago

I would probably update the notebooks, as there are no unit tests for querying

MFSY commented 8 months ago

I would probably update the notebooks, as there are no unit tests for querying

Please provide unit tests for this change.

ssssarah commented 8 months ago

I would probably update the notebooks, as there are no unit tests for querying

Please provide unit tests for this change.

There are no unit tests for querying currently, and this feature only checks the existence of an extra keyword argument, before doing the request.post call, so it's not even behavior that is isolated and can be tested through unit tests

ssssarah commented 8 months ago

I could make a unit test on https://github.com/BlueBrain/nexus-forge/blob/4fde40c8514769cb851bf620e3148586bae61920/kgforge/specializations/stores/nexus/service.py#L218 though

MFSY commented 8 months ago

I could make a unit test on

https://github.com/BlueBrain/nexus-forge/blob/4fde40c8514769cb851bf620e3148586bae61920/kgforge/specializations/stores/nexus/service.py#L218

though

Please do

ssssarah commented 8 months ago

I could make a unit test on https://github.com/BlueBrain/nexus-forge/blob/4fde40c8514769cb851bf620e3148586bae61920/kgforge/specializations/stores/nexus/service.py#L218

though

Please do

Just added it