Conversation
135506f to
cfce0ff
Compare
|
Would probably also be good to add some tests for this service |
|
Good to see these efforts from OSCARS bear fruit. Before this is gets merged the following needs to happen:
Having the last two bullet points fixed to enable a merge or not is negotiatable, the other bullet points need to be fixed for this to become merged. |
@mkuehbach Thank you for the comments. I will proceed working on the first two points. I am not sure what can be done to reduce the size of NeXusOntology repo. @sanbrock Do you have some suggestions here? |
10ce134 to
e5ec0b0
Compare
6efb19b to
effd6a2
Compare
9954cdd to
1277879
Compare
290e022 to
6911e7e
Compare
0cd8fbe to
6911e7e
Compare
lukaspie
left a comment
There was a problem hiding this comment.
Reviewing just the docs for now. Please run mkdocs serve to check that they display fine.
Please also remove the package-lock.json
lukaspie
left a comment
There was a problem hiding this comment.
Looks much better already, just a couple more points.
Please also don't just resolve conversations, but leave a small comment what you have done with the initial comment (can be as short as "implemented"). This makes it easier to keep track.
|
Docs looks good now 👍 |
Thank you! |
…elp to include ontology based search in Nomad GUI
e1af5c1 to
cc49716
Compare
There was a problem hiding this comment.
Good to go from my side with edits made in the documentation, license statements in Python files to add.
Really useful edits and PR, good job @Tanmay2028, @lukaspie, and @sanbrock .
This PR introduces a FastAPI-based ontology service for the NOMAD platform, enabling dynamic access to NeXus ontology superclasses via HTTP endpoints. The service also ensures the ontology file is always up-to-date with the latest commit from the NeXus definitions submodule and provides reasoning capabilities using Owlready2.
Key Features
Ontology File Management:
On startup, the service checks for the existence of the ontology OWL file corresponding to the latest commit hash. If missing, it regenerates the OWL file and updates the reference.
Reasoning and Inference:
The ontology is loaded and inferred using Owlready2’s reasoner. Inferred ontologies are cached in a temporary directory for efficient access.
API Endpoints: /superclasses/{class_name}: Returns the list of superclasses for a given ontology class.
Integration with pynxtools schema:
The pynxtools schema fetches superclasses and populates metadata fields accordingly.