Materials-Data-Science-and-Informatics / iridium

Python library for convenient access to Invenio RDM through its public REST API.
MIT License
2 stars 2 forks source link

Improvement of vocabulary-tests needed? #8

Open chriz-uniba opened 2 years ago

chriz-uniba commented 2 years ago

The tests for vocabularies provided here: https://github.com/Materials-Data-Science-and-Informatics/iridium/blob/4d357dc9d61aebfedd3c3e6a6b6451798c2c7122/tests/test_inveniordm_api.py#L23-L50

are only working on instances where the vocabularies aren't adjusted. For example, a freshly installed instance.

It is expected and wanted behaviour that vocabularies are adapted and changed: https://inveniordm.docs.cern.ch/customize/vocabularies/ Our instance, for example, has already some other subjects and we are working on different record-types.

I wonder whether the current tests need more improvement or whether we want to limit these tests down to a 'untouched' vocabularies folder and we expect the user to disable or adjust these tests for their own instances.

apirogov commented 2 years ago

Good question. I wrote tests against "vanilla", because Iridium currently has no awareness at all about customizations.

Do you have an idea how the test should work for customized vocabularies? I would only have the idea that you have to make your customization YAMLs available to the tests and use them as a basis.

But the next question is - is there an added value for testing Iridium by testing against custom vocabularies (except being able to run against your own instance)? All it would do is make sure that you correctly wired up your vocabularies in your instance, but the Iridium API does not care about what terms are in there.