Skip to content

Commit

Permalink
Merge branch 'aiidateam:master' into mlip
Browse files Browse the repository at this point in the history
  • Loading branch information
federicazanca authored May 21, 2024
2 parents 768ec45 + 8a97fe0 commit a2ba334
Show file tree
Hide file tree
Showing 5 changed files with 82 additions and 17 deletions.
59 changes: 59 additions & 0 deletions .github/workflows/dev-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,15 @@ concurrency:
cancel-in-progress: true

jobs:
get-pr:
# https://dev.to/suzukishunsuke/secure-github-actions-by-pullrequesttarget-641
outputs:
merge_commit_sha: ${{steps.pr.outputs.merge_commit_sha}}
runs-on: ubuntu-latest
steps:
- uses: suzuki-shunsuke/[email protected]
id: pr

test-utils:
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -51,3 +60,53 @@ jobs:
npm install
npm run build
working-directory: ./aiida-registry-app

preview:
# This job is triggered by from PR from the aiida-registry repo, the developer of aiida-registry need to see the preview page of the PR
needs: [test-webpage-build, get-pr]
if: github.repository == 'aiidateam/aiida-registry'
runs-on: ubuntu-latest
strategy:
fail-fast: false
timeout-minutes: 180
env:
COMMIT_AUTHOR: Deploy Action
COMMIT_AUTHOR_EMAIL: [email protected]
VITE_PR_PREVIEW_PATH: "/aiida-registry/pr-preview/pr-${{ github.event.number }}/"

steps:
- name: Checkout Repo ⚡️
uses: actions/checkout@v4
with:
ref: ${{needs.get-pr.outputs.merge_commit_sha}}
- name: Create dev environment
uses: ./.github/actions/create-dev-env

- name: Generate metadata
uses: ./.github/actions/generate-metadata
with:
gh_token: ${{ secrets.GITHUB_TOKEN }}
cache: false

- uses: actions/setup-node@v3
with:
node-version: '18.x'
- name: Install npm dependencies and build
run: |
echo $VITE_PR_PREVIEW_PATH
npm install
npm run build
working-directory: ./aiida-registry-app

- name: Add plugins file to the build folder
run: cp plugins_metadata.json aiida-registry-app/dist/

- name: Deploy preview
uses: rossjrw/pr-preview-action@v1
with:
source-dir: ./aiida-registry-app/dist
preview-branch: gh-pages
umbrella-dir: pr-preview
action: auto
custom-url:
token: ${{ secrets.BOT_COMMENT_TOKEN }} # use aiida-bot token to deploy the preview
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
rev: v4.6.0
hooks:
- id: end-of-file-fixer
- id: fix-encoding-pragma
Expand All @@ -13,7 +13,7 @@ repos:

- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.3.3
rev: v0.4.2
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix, --show-fixes]
Expand Down
2 changes: 1 addition & 1 deletion aiida_registry/test_install.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ def test_install_one_docker(container_image, plugin):
user=user,
)
install_package = container.exec_run(
f'pip install --constraint /tmp/pip-constraint.txt --pre {plugin["pip_url"]}',
f'pip install --constraint /tmp/pip-constraint.txt {plugin["pip_url"]}',
user=user,
)

Expand Down
6 changes: 6 additions & 0 deletions bin/analyze_entrypoints.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@
from typing import Dict, List

import click
from aiida import load_profile
from aiida.storage.sqlite_temp import SqliteTempBackend

# Load AiiDA profile
temp_profile = SqliteTempBackend.create_profile("temp-profile")
load_profile(temp_profile, allow_switch=True)

ENTRY_POINT_GROUPS = [
"aiida.calculations",
Expand Down
28 changes: 14 additions & 14 deletions plugins.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ aiida-ddec:
code_home: https://github.com/lsmo-epfl/aiida-ddec
entry_point_prefix: ddec
pip_url: git+https://github.com/yakutovicha/aiida-ddec
plugin_info: https://raw.githubusercontent.com/lsmo-epfl/aiida-ddec/master/setup.json
plugin_info: https://raw.githubusercontent.com/lsmo-epfl/aiida-ddec/master/pyproject.toml
aiida-defects:
code_home: https://github.com/epfl-theos/aiida-defects
entry_point_prefix: defects
Expand All @@ -129,18 +129,18 @@ aiida-environ:
code_home: https://github.com/environ-developers/aiida-environ
entry_point_prefix: environ
pip_url: git+https://github.com/environ-developers/aiida-environ
plugin_info: https://raw.github.com/environ-developers/aiida-environ/master/setup.json
plugin_info: https://raw.github.com/environ-developers/aiida-environ/master/pyproject.toml
aiida-eon:
code_home: https://github.com/HaoZeke/aiida-eon
entry_point_prefix: eon
aiida-eonclient:
code_home: https://github.com/HaoZeke/aiida-eonclient
entry_point_prefix: eonclient
aiida-fenics:
code_home: https://github.com/sphuber/aiida-fenics/tree/master
code_home: https://github.com/broeder-j/aiida-fenics/tree/master
entry_point_prefix: fenics
pip_url: git+https://github.com/sphuber/aiida-fenics
plugin_info: https://raw.github.com/sphuber/aiida-fenics/master/setup.json
pip_url: git+https://github.com/broeder-j/aiida-fenics
plugin_info: https://raw.github.com/broeder-j/aiida-fenics/master/setup.json
aiida-firecrest:
code_home: https://github.com/aiidateam/aiida-firecrest
entry_point_prefix: firecrest
Expand All @@ -164,7 +164,7 @@ aiida-flexpart:
code_home: https://github.com/aiidaplugins/aiida-flexpart
entry_point_prefix: flexpart
pip_url: git+https://github.com/aiidaplugins/aiida-flexpart
plugin_info: https://raw.githubusercontent.com/aiidaplugins/aiida-flexpart/main/setup.json
plugin_info: https://raw.githubusercontent.com/aiidaplugins/aiida-flexpart/main/pyproject.toml
aiida-gaussian:
code_home: https://github.com/nanotech-empa/aiida-gaussian
entry_point_prefix: gaussian
Expand Down Expand Up @@ -218,7 +218,7 @@ aiida-lammps:
development_status: beta
entry_point_prefix: lammps
pip_url: git+https://github.com/aiidaplugins/aiida-lammps
plugin_info: https://raw.githubusercontent.com/aiidaplugins/aiida-lammps/master/setup.json
plugin_info: https://raw.githubusercontent.com/aiidaplugins/aiida-lammps/master/pyproject.toml
aiida-lsmo:
code_home: https://github.com/lsmo-epfl/aiida-lsmo
development_status: stable
Expand All @@ -243,14 +243,14 @@ aiida-nanotech-empa:
development_status: beta
entry_point_prefix: nanotech_empa
pip_url: git+https://github.com/nanotech-empa/aiida-nanotech-empa
plugin_info: https://raw.githubusercontent.com/nanotech-empa/aiida-nanotech-empa/master/setup.json
plugin_info: https://raw.githubusercontent.com/nanotech-empa/aiida-nanotech-empa/master/pyproject.toml
aiida-nims-scheduler:
code_home: https://github.com/atztogo/aiida-nims-scheduler
development_status: stable
documentation_url: https://github.com/atztogo/aiida-nims-scheduler
entry_point_prefix: nims_scheduler
pip_url: git+https://github.com/atztogo/aiida-nims-scheduler
plugin_info: https://raw.githubusercontent.com/atztogo/aiida-nims-scheduler/master/setup.json
plugin_info: https://raw.githubusercontent.com/atztogo/aiida-nims-scheduler/master/pyproject.toml
aiida-nwchem:
code_home: https://github.com/aiidateam/aiida-nwchem
documentation_url: https://aiida-nwchem.readthedocs.io/
Expand Down Expand Up @@ -332,10 +332,10 @@ aiida-quantumespresso:
pip_url: aiida-quantumespresso
plugin_info: https://raw.github.com/aiidateam/aiida-quantumespresso/master/setup.json
aiida-quantumespresso-hp:
code_home: https://github.com/sphuber/aiida-quantumespresso-hp
code_home: https://github.com/aiidateam/aiida-quantumespresso-hp
entry_point_prefix: quantumespresso.hp
pip_url: git+https://github.com/sphuber/aiida-quantumespresso-hp
plugin_info: https://raw.githubusercontent.com/sphuber/aiida-quantumespresso-hp/master/setup.json
pip_url: git+https://github.com/aiidateam/aiida-quantumespresso-hp
plugin_info: https://raw.githubusercontent.com/aiidateam/aiida-quantumespresso-hp/master/pyproject.toml
aiida-raspa:
code_home: https://github.com/yakutovicha/aiida-raspa
entry_point_prefix: raspa
Expand Down Expand Up @@ -451,12 +451,12 @@ aiida-yascheduler:
documentation_url: https://github.com/tilde-lab/yascheduler
entry_point_prefix: yascheduler
pip_url: yascheduler
plugin_info: https://raw.githubusercontent.com/tilde-lab/yascheduler/master/setup.json
plugin_info: https://raw.githubusercontent.com/tilde-lab/yascheduler/master/pyproject.toml
aiida-z2pack:
code_home: https://github.com/AntimoMarrazzo/aiida-z2pack
entry_point_prefix: z2pack
pip_url: git+https://github.com/AntimoMarrazzo/aiida-z2pack
plugin_info: https://raw.githubusercontent.com/antimomarrazzo/aiida-z2pack/master/setup.json
plugin_info: https://raw.githubusercontent.com/antimomarrazzo/aiida-z2pack/master/pyproject.toml
aiida-zeopp:
code_home: https://github.com/lsmo-epfl/aiida-zeopp
development_status: stable
Expand Down

0 comments on commit a2ba334

Please sign in to comment.