Skip to content

Commit

Permalink
Merge branch 'main' into feat/4955/color-verdi-process-list
Browse files Browse the repository at this point in the history
  • Loading branch information
sphuber authored Jul 16, 2024
2 parents 84baa7a + a610460 commit 13f63bc
Show file tree
Hide file tree
Showing 150 changed files with 3,917 additions and 1,749 deletions.
5 changes: 0 additions & 5 deletions .docker/aiida-core-base/s6-assets/init/aiida-prepare.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,6 @@ verdi config set warnings.development_version False
# If the environment variable `SETUP_DEFAULT_AIIDA_PROFILE` is not set, set it to `true`.
if [[ ${SETUP_DEFAULT_AIIDA_PROFILE:-true} == true ]] && ! verdi profile show ${AIIDA_PROFILE_NAME} &> /dev/null; then

# For the container that includes the services, this script is called as soon as the RabbitMQ startup script has
# been launched, but it can take a while for the service to come up. If ``verdi presto`` is called straight away
# it is possible it tries to connect to the service before that and it will configure the profile without a broker.
sleep 5

# Create AiiDA profile.
verdi presto \
--verbosity info \
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/bash

rabbitmq-diagnostics ping

if [ $? -ne 0 ]; then
exit 1
fi

rabbitmq-diagnostics check_running

if [ $? -ne 0 ]; then
exit 1
fi

exit 0
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3
13 changes: 11 additions & 2 deletions .docker/aiida-core-with-services/s6-assets/s6-rc.d/rabbitmq/run
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,14 @@

with-contenv

foreground { s6-echo "Calling /etc/init/rabbitmq.sh" }
rabbitmq-server
foreground { s6-echo "Starting RMQ server and notifying back when the service is ready" }


# For the container that includes the services, aiida-prepare.sh script is called as soon as the RabbitMQ startup script has
# been launched, but it can take a while for the RMQ service to come up. If ``verdi presto`` is called straight away
# it is possible it tries to connect to the service before that and it will configure the profile without a broker.
# Here we use s6-notifyoncheck to do the polling healthy check of the readyness of RMQ service.
#
# -w 500: 500 ms between two invocations of ./data/check

s6-notifyoncheck -w 500 rabbitmq-server
2 changes: 1 addition & 1 deletion .github/config/profile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ first_name: Giuseppe
last_name: Verdi
institution: Khedivial
db_backend: core.psql_dos
db_engine: postgresql_psycopg2
db_engine: postgresql_psycopg
db_host: localhost
db_port: 5432
db_name: test_aiida
Expand Down
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
5 changes: 2 additions & 3 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 Expand Up @@ -145,7 +145,6 @@ repos:
src/aiida/orm/utils/builders/computer.py|
src/aiida/orm/utils/calcjob.py|
src/aiida/orm/utils/node.py|
src/aiida/orm/utils/remote.py|
src/aiida/repository/backend/disk_object_store.py|
src/aiida/repository/backend/sandbox.py|
src/aiida/restapi/common/utils.py|
Expand Down
Loading

0 comments on commit 13f63bc

Please sign in to comment.