Skip to content

Commit

Permalink
Merge branch 'main' into fix/6448/s6-notification-polling-check
Browse files Browse the repository at this point in the history
  • Loading branch information
unkcpz authored Jul 11, 2024
2 parents 8c5f76e + 120c8ac commit 76c87c3
Show file tree
Hide file tree
Showing 124 changed files with 3,679 additions and 1,554 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docker-build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
uses: docker/setup-buildx-action@v3

- name: Build images
uses: docker/bake-action@v4
uses: docker/bake-action@v5
with:
# Load to Docker engine for testing
load: true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:

- name: Build and upload to ghcr.io 📤
id: build
uses: docker/bake-action@v4
uses: docker/bake-action@v5
with:
push: true
workdir: .docker/
Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,12 @@ jobs:
vars=$(cat build.json | jq -c '[.variable | to_entries[] | {"key": .key, "value": .value.default}] | from_entries')
echo "vars=$vars" | tee -a "${GITHUB_OUTPUT}"
- id: get-version
if: ${{ github.ref_type == 'tag' && startsWith(github.ref_name, 'v') }}
run: |
tag="${{ github.ref_name }}"
echo "AIIDA_VERSION=${tag#v}" >> $GITHUB_OUTPUT
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
Expand All @@ -69,7 +75,7 @@ jobs:
type=ref,event=pr
type=ref,event=branch,enable=${{ github.ref_name != 'main' }}
type=edge,enable={{is_default_branch}}
type=raw,value=aiida-${{ env.AIIDA_VERSION }},enable=${{ github.ref_type == 'tag' && startsWith(github.ref_name, 'v') }}
type=raw,value=aiida-${{ steps.get-version.outputs.AIIDA_VERSION }},enable=${{ github.ref_type == 'tag' && startsWith(github.ref_name, 'v') }}
type=raw,value=python-${{ env.PYTHON_VERSION }},enable=${{ github.ref_type == 'tag' && startsWith(github.ref_name, 'v') }}
type=raw,value=postgresql-${{ env.PGSQL_VERSION }},enable=${{ github.ref_type == 'tag' && startsWith(github.ref_name, 'v') }}
type=match,pattern=v(\d{4}\.\d{4}(-.+)?),group=1
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,9 @@ jobs:
- name: Install aiida-core and pre-commit
uses: ./.github/actions/install-aiida-core
with:
python-version: '3.10'
python-version: '3.11'
extras: '[pre-commit]'
from-requirements: 'false'

- name: Run pre-commit
run: pre-commit run --all-files || ( git status --short ; git diff ; exit 1 )
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ jobs:
env:
AIIDA_TEST_PROFILE: test_aiida
AIIDA_WARN_v3: 1
run: pytest --cov aiida --verbose tests -m 'not nightly'
run: pytest --verbose tests -m 'not nightly'

- name: Freeze test environment
run: pip freeze | sed '1d' | tee requirements-py-${{ matrix.python-version }}.txt
Expand Down
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ repos:
exclude: *exclude_pre_commit_hooks

- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.28.2
rev: 0.28.6
hooks:
- id: check-github-workflows

Expand All @@ -37,7 +37,7 @@ repos:
args: [--line-length=120, --fail-on-change]

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.4.1
rev: v0.5.0
hooks:
- id: ruff-format
exclude: &exclude_ruff >
Expand Down
259 changes: 259 additions & 0 deletions CHANGELOG.md

Large diffs are not rendered by default.

107 changes: 107 additions & 0 deletions docs/source/_static/aiida-custom.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,110 @@
/* AiiDA colors in HTML format
blue: #0096d2
orange: #fe7d17
green: #30b808
*/

html[data-theme="light"] {
--pst-color-primary: #0096d2;
--pst-color-secondary: #fe7d17;
--pst-color-surface: #f5f5f5;
}

html[data-theme="dark"] {
--pst-color-primary: #0096d2;
--pst-color-secondary: #fe7d17;
}

code {
--pst-color-inline-code: #0096d2;
font-weight: bold;
}

html[data-theme=light] .highlight .ch,
html[data-theme=light] .highlight .sd {
color: #777777;
font-style: italic
}

html[data-theme=light] .highlight .s1,
html[data-theme=light] .highlight .si {
color: #30b808;
font-weight: bold;
}

html[data-theme=light] .highlight .k,
html[data-theme=light] .highlight .kc,
html[data-theme=light] .highlight .kn,
html[data-theme=light] .highlight .ow,
html[data-theme=light] .highlight .mf,
html[data-theme=light] .highlight .mi {
color: #0096d2;
font-weight: bold;
}

html[data-theme=dark] .highlight .ch,
html[data-theme=dark] .highlight .sd {
color: #999999;
font-style: italic
}

html[data-theme=dark] .highlight .s1,
html[data-theme=dark] .highlight .si {
color: #30b808;
font-weight: bold;
}

html[data-theme=dark] .highlight .k,
html[data-theme=dark] .highlight .kc,
html[data-theme=dark] .highlight .kn,
html[data-theme=dark] .highlight .ow,
html[data-theme=dark] .highlight .mf,
html[data-theme=dark] .highlight .mi {
color: #0096d2;
font-weight: bold;
}

.sd-card-hover:hover {
border-color: var(--pst-color-primary);
transform: none;
}

.aiida-green {
color: #30b808;
}

.aiida-blue {
color: #0096d2;
}

.aiida-orange {
color: #fe7d17;
}

.aiida-red {
color: rgb(192, 11, 80);
}

img.logo-shell {
width: 20px;
padding-bottom: 3px;
margin-right: 3px;
}

.sd-card-footer {
padding-top: 0rem;
border-top: none !important;
}

.sd-card-footer table {
margin-bottom: 0rem;
border-color: transparent;
}

.sd-card-footer table td:last-child {
text-align: right;
}

/* Fix CSS of top bar link icons */
a.nav-link.nav-external i {
padding-left: 0.3em !important;
Expand Down
11 changes: 4 additions & 7 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,9 @@
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
exclude_patterns = [
'datatypes/**',
'developer_guide/**',
'get_started/**',
'howto/installation_more/index.rst',
'import_export/**',
'internals/global_design.rst',
'internals/orm.rst',
'scheduler/index.rst',
'working_with_aiida/**',
]

# The name of the Pygments (syntax highlighting) style to use.
Expand Down Expand Up @@ -103,7 +97,7 @@
ipython_mplbackend = ''

myst_enable_extensions = ['colon_fence', 'deflist']
myst_heading_anchors = 3
myst_heading_anchors = 4
nb_execution_show_tb = 'READTHEDOCS' in os.environ
nb_merge_streams = True
nb_mime_priority_overrides = [
Expand Down Expand Up @@ -177,6 +171,9 @@
# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
html_show_copyright = False

# This is to tell search engines to index only stable and latest version
html_extra_path = ['robots.txt']

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']

Expand Down
2 changes: 1 addition & 1 deletion docs/source/howto/archive_profile.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ See {ref}`how-to:share:archives` for information on how to create and migrate an
The easiest way to inspect the contents of an archive is to create a profile that "mounts" the archive as its data storage:

```{code-cell} ipython3
!verdi profile setup core.sqlite_zip -n --profile archive --filepath process.aiida
!verdi profile setup core.sqlite_zip -n --profile-name archive --filepath process.aiida
```

You can now inspect the contents of the `process.aiida` archive by using the `archive` profile in the same way you would a standard AiiDA profile.
Expand Down
13 changes: 13 additions & 0 deletions docs/source/howto/daemon.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@

.. _how-to:manage-daemon:

How to manage the daemon
------------------------

The AiiDA daemon process runs in the background and takes care of processing your submitted calculations and workflows, checking their status, retrieving their results once they are finished and storing them in the AiiDA database.

The AiiDA daemon is controlled using three simple commands:

* ``verdi daemon start``: start the daemon
* ``verdi daemon status``: check the status of the daemon
* ``verdi daemon stop``: stop the daemon
1 change: 1 addition & 0 deletions docs/source/howto/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ How-To Guides
:maxdepth: 1

interact
daemon
plugins_install
run_codes
run_workflows
Expand Down
10 changes: 5 additions & 5 deletions docs/source/howto/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Creating profiles
-----------------
Each AiiDA installation can have multiple profiles, each of which can have its own individual database and file repository to store the contents of the :ref:`provenance graph<topics:provenance:concepts>`.
Profiles allow you to run multiple projects completely independently from one another with just a single AiiDA installation and at least one profile is required to run AiiDA.
A new profile can be created using :ref:`verdi quicksetup<reference:command-line:verdi-quicksetup>` or :ref:`verdi setup<reference:command-line:verdi-setup>`, which works similar to the former but gives more control to the user.
A new profile can be created using :ref:`verdi presto<reference:command-line:verdi-presto>` or :ref:`verdi profile setup<reference:command-line:verdi-profile>`, which works similar to the former but gives more control to the user.

Listing profiles
----------------
Expand Down Expand Up @@ -296,7 +296,7 @@ Isolating multiple instances
An AiiDA instance is defined as the installed source code plus the configuration folder that stores the configuration files with all the configured profiles.
It is possible to run multiple AiiDA instances on a single machine, simply by isolating the code and configuration in a virtual environment.

To isolate the code, make sure to install AiiDA into a virtual environment, e.g., with conda or venv, as described :ref:`here <intro:get_started:setup>`.
To isolate the code, make sure to install AiiDA into a virtual environment, e.g., with conda or venv.
Whenever you activate this particular environment, you will be running the particular version of AiiDA (and all the plugins) that you installed specifically for it.

This is separate from the configuration of AiiDA, which is stored in the configuration directory which is always named ``.aiida`` and by default is stored in the home directory.
Expand Down Expand Up @@ -619,12 +619,12 @@ Alternatively to the CLI command, one can also manually create a backup. This re
.. _how-to:installation:backup:restore:

Restoring data from a backup
==================================
============================

Restoring a backed up AiiDA profile requires:

* restoring the profile information in the AiiDA ``config.json`` file. Simply copy the`profiles` entry from
the backed up `config.json`to the one of the running AiiDA instance (see `verdi status` for exact location).
the backed up ``config.json`` to the one of the running AiiDA instance (see ``verdi status`` for exact location).
Some information (e.g. the database parameters) might need to be updated.

* restoring the data of of the backed up profile according to the ``config.json`` entry.
Expand All @@ -642,7 +642,7 @@ To test if the restoration worked, run ``verdi -p <profile-name> status`` to ver

**PostgreSQL database**

To restore the PostgreSQL database from the ``db.psql`` file that was backed up, first you should create an empty database following the instructions described in :ref:`database <intro:install:database>` skipping the ``verdi setup`` phase.
To restore the PostgreSQL database from the ``db.psql`` file that was backed up, first you should create an empty database following the instructions described in :ref:`the installation guide <installation:guide-complete:create-profile:core-psql-dos>`.
The backed up data can then be imported by calling:

.. code-block:: console
Expand Down
22 changes: 20 additions & 2 deletions docs/source/howto/interact.rst
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,18 @@ Interactive notebooks
=====================

Similar to :ref:`interactive shells <how-to:interact-shell>`, AiiDA is also directly compatbile with interactive Python notebooks, such as `Jupyter <https://jupyter.org/>`_.
To install the required Python packages, install ``aiida-core`` with the ``notebook`` extra, e.g. run:

.. code-block:: console
pip install aiida-core[notebook]
You should now be able to start a Jupyter notebook server:

.. code-block:: console
jupyter notebook
To use AiiDA's Python API in a notebook, first a profile has to be loaded:

.. code-block:: ipython
Expand All @@ -142,8 +154,14 @@ The same can be accomplished using the following magic statement:
%load_ext aiida
%aiida
This magic line will replicate the same environment as :ref:`the interactive shell <how-to:interact-shell>` provided by ``verdi shell``.
However, it does require some one-time installation, as detailed in the section on how to :ref:`intro:install:jupyter`.
This magic line replicates the same environment as :ref:`the interactive shell <how-to:interact-shell>` provided by ``verdi shell``.

It is also possible to run ``verdi`` commands inside the notebook, for example:

.. code-block:: ipython
%verdi status
.. _how-to:interact-restapi:
Expand Down
2 changes: 1 addition & 1 deletion docs/source/howto/ssh.rst
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,6 @@ Using kerberos tokens
If the remote machine requires authentication through a Kerberos token (that you need to obtain before using ssh), you typically need to

* install ``libffi`` (``sudo apt-get install libffi-dev`` under Ubuntu)
* install the ``ssh_kerberos`` extra during the installation of aiida-core (see :ref:`intro:install:setup`).
* install the ``ssh_kerberos`` extra during the installation of aiida-core (see :ref:`installation:guide-complete:python-package:optional-requirements`).

If you provide all necessary ``GSSAPI`` options in your ``~/.ssh/config`` file, ``verdi computer configure`` should already pick up the appropriate values for all the gss-related options.
Loading

0 comments on commit 76c87c3

Please sign in to comment.