-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
76 additions
and
0 deletions.
There are no files selected for viewing
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,17 @@ | ||
#!/bin/bash | ||
set -eu | ||
export REPOROOT="$( cd -P "$( dirname "${BASH_SOURCE[0]}" )/../../" && pwd )" | ||
for notebookfile in `find "${REPOROOT}"/notebooks/ -name '*.ipynb'`; do | ||
echo | ||
echo '------------------------------------------------------' | ||
bn=$(basename "${notebookfile}") | ||
echo "Testing ${bn}" | ||
echo "${notebookfile}" | ||
rm -rf "${REPOROOT}/test_tmp_rundir" | ||
mkdir "${REPOROOT}/test_tmp_rundir" | ||
cd "${REPOROOT}/test_tmp_rundir" | ||
echo " .. converting to script" | ||
jupyter nbconvert --to script "${notebookfile}" --output="${PWD}/${bn}_converted" | ||
echo " .. executing script" | ||
time ipython ./${bn}_converted.py | cat | ||
done |
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,59 @@ | ||
name: basictest | ||
|
||
on: | ||
push: | ||
pull_request: | ||
schedule: | ||
- cron: '30 11 * * 2' # 11:30 every Tuesday | ||
|
||
jobs: | ||
build: | ||
# The CMake configure and build commands are platform agnostic and should work equally | ||
# well on Windows or Mac. You can convert this to a matrix build if you need | ||
# cross-platform coverage. | ||
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix | ||
strategy: | ||
matrix: | ||
include: | ||
#Note: Python 3.13 works (Aug 2024) because of the | ||
#"allow-prereleases: true" below. | ||
- { os: ubuntu-latest, python: '3.10' } | ||
- { os: ubuntu-latest, python: '3.11' } | ||
- { os: ubuntu-latest, python: '3.13' } | ||
- { os: macos-latest, python: "3.12" } | ||
name: ${{ matrix.os }}.${{ matrix.CC }}.python-${{ matrix.python }} | ||
runs-on: ${{ matrix.os }} | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
path: src | ||
|
||
- name: Setup python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python }} | ||
allow-prereleases: true #Needed (Aug 2024) for Python 3.13. | ||
|
||
- name: Pip install | ||
run: | | ||
set -eux | ||
python3 -m pip install numpy matplotlib spglib ase gemmi jupyterlab ipympl | ||
python3 -m pip install ncrystal>=3.9.4 | ||
#python3 -m pip install pymatgen | ||
- name: Check versions | ||
run: | | ||
set -eux | ||
which python3 | ||
python3 --version | ||
which cmake | ||
cmake --version | ||
nctool --version | ||
ncrystal-config -s | ||
- name: Launch tests | ||
run: | | ||
set -eu | ||
./src/.github/resources/run_notebooks.x |