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

Unexpected behaviour of forge.validate #369

Open
NicoRicardi opened this issue Jan 4, 2024 · 2 comments
Open

Unexpected behaviour of forge.validate #369

NicoRicardi opened this issue Jan 4, 2024 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@NicoRicardi
Copy link
Contributor

forge.validate(resource, type_=type_ on a test resource behaves in unexpected ways (at least to me).
Let's start with:

forge = KnowledgeGraphForge('https://raw.githubusercontent.com/BlueBrain/nexus-forge/master/examples/notebooks/use-cases/prod-forge-nexus.yml',
                          token= staging_token, bucket='dke/kgforge_tests', endpoint='https://staging.nise.bbp.epfl.ch/nexus/v1')
res = forge.retrieve('https://bbp.epfl.ch/dke/kgforge_tests/66d53b15-3d20-4aa0-8e48-e43cf7a2520d')
  1. It seems to ignore the type_ parameter if this is not the resource.type (or in the resource.type if this is a list). As such, it would succeed with any other type in forge as type_.
res.type = 'Entity'
forge.validate(res, type_='Entity')  # succeeds
forge.validate(res, type_= [any valid type on forge])  # succeeds
  1. there seems to be some kind of caching returning values from previous (but different) calls . As such, the same call yields different results according to the previous calls.
res.type = ['Entity', 'VolumetricDataLayer']
forge.validate(res, type_='Entity')  # succeeds
forge.validate(res, type_='VolumetricDataLayer')  # fails
forge.validate(res, type_='Entity')  # fails, but should succeed
@ssssarah ssssarah added the bug Something isn't working label Feb 19, 2024
@MFSY
Copy link
Collaborator

MFSY commented Apr 3, 2024

Hi @NicoRicardi ,
This should by #393

@NicoRicardi
Copy link
Contributor Author

Point 2 is fixed, indeed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants