Code Monkey home page Code Monkey logo

oteapi-optimade's Introduction

OTE-API OPTIMADE

An OTE-API Plugin with OTE strategies.

Further reading:

License and copyright

OTE-API OPTIMADE is released under the MIT license with copyright © SINTEF.

Acknowledgment

OTE-API OPTIMADE has been created via the cookiecutter template for OTE-API plugins.

OTE-API OPTIMADE has been supported by the following projects:

  • OntoTrans (2020-2024) that receives funding from the European Union’s Horizon 2020 Research and Innovation Programme, under Grant Agreement n. 862136.

  • VIPCOAT (2021-2025) receives funding from the European Union’s Horizon 2020 Research and Innovation Programme - DT-NMBP-11-2020 Open Innovation Platform for Materials Modelling, under Grant Agreement no: 952903.

  • OpenModel (2021-2025) receives funding from the European Union’s Horizon 2020 Research and Innovation Programme - DT-NMBP-11-2020 Open Innovation Platform for Materials Modelling, under Grant Agreement no: 953167.

oteapi-optimade's People

Contributors

casperwa avatar jesper-friis avatar pre-commit-ci[bot] avatar team4-0 avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar

oteapi-optimade's Issues

Wrong OPTIMADEStructureAttributes datamodel

There are many issues in the OPTIMADEStructureAttributes datamodel.

nelements is used both as a dimension and as a property. It can only be one of them, in this nelements.

Same with nsites.

elements_rations is not well-defined. The description should describe how this array constructed?

Support new OTEAPI session handling

With the update of the parser strategy, session handling has also been updated with backwards-incompatible consequences. This new way of working against OTEAPI should be implemented.

Update the pipeline figure in example (and example)

Please update the below figure. The filter strategy should come after the data resource strategy in the pipeline:

image

This is conceptually important. We have the partial pipeline documenting the data source (typically DataResource >> Parse >> Mapping). That should be treated as one unit and always come first in the pipeline. The filter is not a part of the documentation of the data resource, but is a part of our application that selects the subset of all the data in the data resource we are interested in. It should use the initialize() method to specify the query such that only the information we need is fetched from the data resource.

I did this originally, but unfortunately the session object is not returned correctly from the "filter strategy", so I had to switch them around. I believe this issue is being resolved in OTElib, but this is an issue.
Furthermore, retrieving the data from the session object is plain wrong and should not be done like this. But that's out-of-scope of this tutorial to fix.

Originally posted by @CasperWA in #125 (comment)

CI test with end-to-end

This should use the oteapi container image from ghcr.io/EMMC-ASBL/oteapi as well as the otelib package to test the plugin.

Implement support for DLite

Extend the strategies with support for utilizing DLite to handle the retrieved OPTIMADE resources.
A SOFT/DLite model should be added and a workflow path to create DLite instances should be enabled - especially in the resource strategy.

CI docker connection issues

There are repetitive connection issues with docker images in CI.

I think the issue may be the use of docker compose. Especially since it's using a custom network. This may interfere in unknown ways with the GitHub Actions' own internal docker setup.
A workaround might be to either run the docker compose using the host network - or instead not running the services using docker compose, but rather using the services field or starting each one using regular docker, which should add in the correct network automagically.

Migrate to pydantic v2

Update the repository to support pydantic v2.

Only then can OTEAPI Core >= v0.6 be used.

The main dependency hindering a pydantic v2 upgrade is OPTIMADE Python tools (optimade).

Invalid use of logging

Libraries should not call setLogger and setHandler from the logging module - that should be done by the main application.

See also PR #171

More tests

Add more tests for:

  • Parse strategy
  • Utility functionality
  • Model validators
  • Custom type
  • Resource strategy (more)
  • Filter strategy

Extend examples

Repeating the same example twice it quite boring. Can you split it up into two sub-pages, one for each otelib backend.

Yes and no. As this was a quick'n'dirty example, I didn't have capacity to come up with a more exciting example. Furthermore, it shows that there is no (or should be no) difference between the two methods, other than added information.

Originally posted by @CasperWA in #125 (comment)

Unsemantic datamodel

The species_at_sites property of OPTIMADEStructureAttribute is currently a list of strings, referring to the name of the individual species.

Having species_at_sites being a ref-type to OPTIMADEStructureSpecies would be more semantic and less entangled. This would also be a more efficient way to store the data.

Test example notebooks in CI

The example should be run at a part of the CI testing.

This repository already has an end-2-end test that does exactly this. No need to also run the tutorial.
That said, the mkdocs-jupyter plugin allows for executing the notebooks upon building the documentation, hence this could act as a CI test for whether the notebook works or not.
However, since a separate server is required and the notebook references localhost:80 it might be quite tricky to make it work properly. Hence, I'd consider it out-of-scope for this PR and writing this example, but definitely worth further investigation down the road.

Originally posted by @CasperWA in #125 (comment)

Notebooks:

Update: PR #127 which introduced the dlite.ipynb also added execution test for it when building the documentation.

Minimize SOFT data model to a single file

The SOFT data models can effectively be minimized to a single file, effectively combining attributes and the top data model, while doing away with the species and assemblies data model in favor of simple dict types.

The dedicated parser would need to change accordingly.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.