Skip to content
Daniel Hollas edited this page Mar 20, 2024 · 22 revisions

AiiDAlab overview for devs

This Wiki is intended for developers of the AiiDAlab platform itself and covers topics such as the overall architecture, release workflow.

For App developers and for those developing widgets, tips and rules are collected at widget develpoment guide.

Key AiiDAlab components

The key components of AiiDAlab are:

The aiidalab package is used to implement the back-end application logic for the AiiDAlab environment. This includes the installation and removal of apps, their discovery, and the app store.

An app is a collection of Jupyter notebooks (with optional dependencies which are either directly vendored or declared as dependencies in a setup.py or requirements.txt file.

Note In the current implementation, only Python dependencies that can be installed by pip are automatically installed with the app. Any other dependencies must be pre-installed as part of the Docker image.

The aiidalab-home package implements the front-end for the AiiDAlab environment in the form of the so-called home app. That includes, for example, the start page, the terminal, the app store, and the app management interfaces. The aiidalab-home package depends on the aiidalab package. Unlike other apps, it is not intended for users to uninstall the home app or change the installed version. That is to ensure that the AiiDAlab environment remains functional for a specific docker image and to make it possible to release backward incompatible changes to the environment (e.g., a new version of the aiidalab package or other dependencies), without breaking existing user environments.

The aiidalab-home app is installed into the system environment and then linked into the user's user space via a symbolic link. This ensures that the system package is largely immutable but is still available as an app in user space. For development purposes, developers can remove the symbolic link and replace it with a different version of aiidalab-home; an eventual user installation of aiidalab-home will be automatically moved to a backup location and replaced with the symbolic link upon updating the environment's docker image.

The AiiDAlab environment is released and deployed through the aiidalab-docker-stack Docker images. Those images install specific versions of aiidalab, aiidalab-home, and other system-wide dependencies that are expected to be compatible. Continuous integration tests for compatibility are executed upon each commit of the aiidalab-docker-stack image.