Skip to content

Commit 00e1b38

Browse files
fixed ci scripts and formatting
1 parent 4570e13 commit 00e1b38

File tree

113 files changed

+46
-2502
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

113 files changed

+46
-2502
lines changed

ci/build_dd_zip.sh

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,23 @@
33
# Note: this script should be run from the root of the git repository
44

55
# Debuggging:
6-
set -e -o pipefail
6+
if [[ "$(uname -n)" == *"bamboo"* ]]; then
7+
set -e -o pipefail
8+
fi
79
echo "Loading modules..."
810

911
# Set up environment such that module files can be loaded
1012
source /etc/profile.d/modules.sh
1113
module purge
1214
# Modules are supplied as arguments in the CI job:
13-
module load $@
15+
if [ -z "$@" ]; then
16+
module load Python
17+
else
18+
module load $@
19+
fi
1420

1521
# Debuggging:
1622
echo "Done loading modules"
17-
set -x
1823

1924
# Build the DD zip
2025
rm -rf venv # Environment should be clean, but remove directory to be sure

ci/build_docs_and_dist.sh

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33
# Note: this script should be run from the root of the git repository
44

55
# Debuggging:
6-
set -e -o pipefail
6+
if [[ "$(uname -n)" == *"bamboo"* ]]; then
7+
set -e -o pipefail
8+
fi
79
echo "Loading modules:" $@
810

911
# Set up environment such that module files can be loaded
@@ -14,8 +16,6 @@ module load $@
1416

1517
# Debuggging:
1618
echo "Done loading modules"
17-
set -x
18-
1919

2020
# Set up the testing venv
2121
rm -rf venv # Environment should be clean, but remove directory to be sure
@@ -41,3 +41,5 @@ export SPHINXOPTS='-W -n --keep-going'
4141

4242
# Run sphinx to create the documentation
4343
make -C docs clean html
44+
45+
deactivate

ci/linting.sh

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,23 @@
33
# Note: this script should be run from the root of the git repository
44

55
# Debuggging:
6-
set -e -o pipefail
6+
if [[ "$(uname -n)" == *"bamboo"* ]]; then
7+
set -e -o pipefail
8+
fi
79
echo "Loading modules..."
810

911
# Set up environment such that module files can be loaded
1012
source /etc/profile.d/modules.sh
1113
module purge
1214
# Modules are supplied as arguments in the CI job:
13-
module load $@
15+
if [ -z "$@" ]; then
16+
module load Python
17+
else
18+
module load $@
19+
fi
1420

1521
# Debuggging:
1622
echo "Done loading modules"
17-
set -x
1823

1924
# Create a venv
2025
rm -rf venv
@@ -26,3 +31,5 @@ pip install --upgrade 'black >=24,<25' flake8
2631

2732
black --check imas
2833
flake8 imas
34+
35+
deactivate

ci/run_benchmark.sh

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,16 @@ source /etc/profile.d/modules.sh
1717
module purge
1818
# Modules are supplied as arguments in the CI job:
1919
# IMAS-AL-Python/5.2.1-intel-2023b-DD-3.41.0 Saxon-HE/12.4-Java-21
20-
module load IMAS-AL-Core/5.4.3-intel-2023b Saxon-HE/12.4-Java-21
20+
if [ -z "$@" ]; then
21+
module load IMAS-AL-Core
22+
else
23+
module load $@
24+
fi
25+
2126

2227

2328
# Debuggging:
2429
echo "Done loading modules"
25-
set -x
2630

2731
# Export current PYTHONPATH so ASV benchmarks can import imas
2832
export ASV_PYTHONPATH="$PYTHONPATH"
@@ -71,3 +75,5 @@ asv publish
7175
# And persistently store them
7276
cp -rf .asv/{results,html} "$BENCHMARKS_DIR"
7377

78+
deactivate
79+

ci/run_pytest.sh

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,23 @@
33
# Note: this script should be run from the root of the git repository
44

55
# Debuggging:
6-
set -e -o pipefail
6+
if [[ "$(uname -n)" == *"bamboo"* ]]; then
7+
set -e -o pipefail
8+
fi
79
echo "Loading modules:" $@
810

911
# Set up environment such that module files can be loaded
1012
source /etc/profile.d/modules.sh
1113
module purge
1214
# Modules are supplied as arguments in the CI job:
13-
module load $@
15+
if [ -z "$@" ]; then
16+
module load IMAS-AL-Core
17+
else
18+
module load $@
19+
fi
1420

1521
# Debuggging:
1622
echo "Done loading modules"
17-
set -x
18-
1923

2024
# Set up the testing venv
2125
rm -rf venv # Environment should be clean, but remove directory to be sure
@@ -33,5 +37,8 @@ pip freeze
3337
# Clean artifacts created by pytest
3438
rm -f junit.xml
3539
rm -rf htmlcov
40+
mkdir -p ~/tmp
41+
export PYTEST_DEBUG_TEMPROOT=~/tmp
42+
python -m pytest -n=auto --cov=imas --cov-report=term-missing --cov-report=html --junit-xml=junit.xml -x
3643

37-
python -m pytest -n=auto --cov=imas --cov-report=term-missing --cov-report=html --junit-xml=junit.xml
44+
deactivate

imas/assets/IDSDef/identifiers/core_instant_changes/core_instant_changes_identifier.xml

Lines changed: 0 additions & 15 deletions
This file was deleted.

imas/assets/IDSDef/identifiers/core_sources/core_source_identifier.xml

Lines changed: 0 additions & 76 deletions
This file was deleted.

imas/assets/IDSDef/identifiers/core_transport/core_transport_identifier.xml

Lines changed: 0 additions & 25 deletions
This file was deleted.

imas/assets/IDSDef/identifiers/edge_sources/edge_source_identifier.xml

Lines changed: 0 additions & 31 deletions
This file was deleted.

imas/assets/IDSDef/identifiers/edge_transport/edge_transport_identifier.xml

Lines changed: 0 additions & 25 deletions
This file was deleted.

0 commit comments

Comments
 (0)