Skip to content

Releases: aiidateam/aiida-optimade

v0.5.0

25 May 14:26
v0.5.0
Compare
Choose a tag to compare

Highlight:

  • Close AiiDA SQLA sessions after an endpoint has collected its data from the AiiDA database (#34).
    This fixes the issue of the QueuePool being filled up, since the connections were never released.

Changes:

  • Add optimade-python-tools version to Dockerfile (#45)
  • aiida-core version compatibility badge (#46)
  • Use versioned base URLs for endpoint prefixes (#51)
  • Further minimize code-reproduction and reuse code from optimade (#51)
  • Use RedirectSlashedURLs from optimade (#51)
  • Move mapper aliases to config.json file (#51)
  • Subclass ResourceMapper from optimade and incorporate new REQUIRED levels from the spec (#52)

v0.4.1

25 May 14:25
v0.4.1
Compare
Choose a tag to compare

Changes:

  • Use more tools implemented in optimade-python-tools to not copy too
    much code over into this repo.
  • Fold back changes from mcloud branch, specifically concerning
    Docker.
  • Implement changes from optimade-python-tools v0.3.2.

v0.4.0

25 May 14:25
v0.4.0
35ffd08
Compare
Choose a tag to compare

Due to rebase and commit for v0.3.0, some commits will be redone. This
cannot be undone without losing pointers to the v0.3.0 published commit.
One should either merge with --ff-only from command line or make a merge
commit and then merge back into develop using a merge commit as well.
This update is considered from commit 12d2237.

Updates:

  • OPTiMaDe spec v0.10.1.
  • optimade-python-tools v0.3.1 (with grammar for v0.10.1).
  • Redone HTTP middleware to handle session per request.
  • Update to pydantic v1.
  • Add implementation information, i.e., information about which version
    of aiida-optimade the server is using, to all meta responses.
  • Use server.cfg.
  • Fix broken Docker build, and add it to CI (@ltalirz)

v0.3.0

16 Dec 07:42
Compare
Choose a tag to compare

Minimum AiiDA version: 1.0.0
Recommended AiiDA version: 1.0.1

Updates:

  • CI with GitHub Actions
  • Avoid unwilling loading of CONFIG from optimade-python-tools
  • Add codecov coverage and update README with various badges
  • server.cfg config file to tell config.py where to find a configuration file for the server
    • This is needed due to a recent update to optimade-python-tools and a re-configuration of its config.py

v0.2.0

03 Dec 18:53
9516e15
Compare
Choose a tag to compare

Minimum AiiDA version: 1.0.0

First public release of aiida-optimade: An OPTiMaDe API implementation for AiiDA.

README:


Optimade API implementation for AiiDA

This is a RESTful API server created with FastAPI that exposes an AiiDA database according to the OPTiMaDe specification.

The server is based on the test server "template" used in the optimade-python-tools package.
Indeed, the filter grammar and parser and pydantic models from optimade-python-tools are used directly here.

Lastly, the server utilizes the FastAPI concept of routers, which means each endpoint can be "setup" several times, allowing multiple base URLs and more flexibility.

Prerequisites

Environment where AiiDA is installed.
AiiDA database containing StructureData nodes, since these are the only AiiDA nodes that are currently exposed with this API (under the /structures endpoint).

Note: At the moment, aiida-optimade works most optimally with an AiiDA database using the SQLAlchemy backend.

Installation

git clone https://github.com/Materials-Consortia/optimade-python-tools
pip install -e optimade-python-tools/
git clone https://github.com/aiidateam/aiida-optimade
pip install -e aiida-optimade/

Running the server locally

# specify AiiDA profile (will use default otherwise)
export AIIDA_PROFILE=optimade
sh run.sh

Navigate to http://127.0.0.1:5000/optimade/info

Running via docker

Adapt profiles/quicksetup.json and profiles/docker-compose.yml appropriately.

docker-compose -f profiles/docker-compose.yml up --build

Navigate to http://127.0.0.1:3253/optimade/info

Stop by using

docker-compose -f profiles/docker-compose.yml down

Design choices

Q: Why create an individual config.json file instead of just mounting an existing .aiida directory and using that directly?
A: This, currently, wouldn't work because the REPOSITORY_URI needs to point to the right path inside the container, not on the host. Furthermore, storing all configurations in the same file can be fragile.