-
Notifications
You must be signed in to change notification settings - Fork 192
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into fix/5261/exposed-outputs-non-existing-nam…
…espace
- Loading branch information
Showing
102 changed files
with
2,317 additions
and
1,294 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/usr/bin/env bash | ||
set -ev | ||
|
||
# Make sure the folder containing the workchains is in the python path before the daemon is started | ||
MODULE_POLISH="${GITHUB_WORKSPACE}/.molecule/default/files/polish" | ||
CLI_SCRIPT="${MODULE_POLISH}/cli.py" | ||
|
||
declare -a EXPRESSIONS=("1 -2 -1 4 -5 -5 * * * * +" "2 1 3 3 -1 + ^ ^ +" "3 -5 -1 -4 + * ^" "2 4 2 -4 * * +" "3 1 1 5 ^ ^ ^" "3 1 3 4 -4 2 * + + ^ ^") | ||
NUMBER_WORKCHAINS=5 | ||
TIMEOUT=600 | ||
CODE='add!' # Note the exclamation point is necessary to force the value to be interpreted as LABEL type identifier | ||
|
||
# Get the absolute path for verdi | ||
VERDI=$(which verdi) | ||
|
||
if [ -n "$EXPRESSIONS" ]; then | ||
for expression in "${EXPRESSIONS[@]}"; do | ||
$VERDI -p test_${AIIDA_TEST_BACKEND} run "${CLI_SCRIPT}" -X $CODE -C -F -d -t $TIMEOUT "$expression" | ||
done | ||
else | ||
for i in $(seq 1 $NUMBER_WORKCHAINS); do | ||
$VERDI -p test_${AIIDA_TEST_BACKEND} run "${CLI_SCRIPT}" -X $CODE -C -F -d -t $TIMEOUT | ||
done | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,31 @@ | ||
# -*- coding: utf-8 -*- | ||
"""Check that the GitHub release tag matches the package version.""" | ||
import argparse | ||
import json | ||
import ast | ||
from pathlib import Path | ||
|
||
|
||
def get_version_from_module(content: str) -> str: | ||
"""Get the __version__ value from a module.""" | ||
# adapted from setuptools/config.py | ||
try: | ||
module = ast.parse(content) | ||
except SyntaxError as exc: | ||
raise IOError(f'Unable to parse module: {exc}') | ||
try: | ||
return next( | ||
ast.literal_eval(statement.value) for statement in module.body if isinstance(statement, ast.Assign) | ||
for target in statement.targets if isinstance(target, ast.Name) and target.id == '__version__' | ||
) | ||
except StopIteration: | ||
raise IOError('Unable to find __version__ in module') | ||
|
||
|
||
if __name__ == '__main__': | ||
parser = argparse.ArgumentParser() | ||
parser.add_argument('GITHUB_REF', help='The GITHUB_REF environmental variable') | ||
parser.add_argument('SETUP_PATH', help='Path to the setup.json') | ||
args = parser.parse_args() | ||
assert args.GITHUB_REF.startswith('refs/tags/v'), f'GITHUB_REF should start with "refs/tags/v": {args.GITHUB_REF}' | ||
tag_version = args.GITHUB_REF[11:] | ||
with open(args.SETUP_PATH, encoding='utf8') as handle: | ||
data = json.load(handle) | ||
pypi_version = data['version'] | ||
assert tag_version == pypi_version, f'The tag version {tag_version} != {pypi_version} specified in `setup.json`' | ||
pypi_version = get_version_from_module(Path('aiida/__init__.py').read_text(encoding='utf-8')) | ||
assert tag_version == pypi_version, f'The tag version {tag_version} != {pypi_version} specified in `pyproject.toml`' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.