From 31b4f6ea7d897ab612617b4993bed7146e4cd4f9 Mon Sep 17 00:00:00 2001 From: Thomas Samuel Binns Date: Thu, 12 Sep 2024 15:15:09 +0200 Subject: [PATCH 1/4] Add environment.yml --- environment.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 environment.yml diff --git a/environment.yml b/environment.yml new file mode 100644 index 0000000..ed53b55 --- /dev/null +++ b/environment.yml @@ -0,0 +1,11 @@ +name: pybispectra +channels: + - conda-forge +dependencies: + - python>=3.10 + - joblib + - matplotlib + - mne>1.6 + - numba + - numpy + - scipy From 10f1fbbc3f0364dfc4f1a3ad71620421884b84ee Mon Sep 17 00:00:00 2001 From: Thomas Samuel Binns Date: Thu, 12 Sep 2024 15:16:00 +0200 Subject: [PATCH 2/4] Test conda unit tests --- .github/workflows/unit_tests.yml | 36 ++++++++++++++++++++++++++++++-- 1 file changed, 34 insertions(+), 2 deletions(-) diff --git a/.github/workflows/unit_tests.yml b/.github/workflows/unit_tests.yml index f518591..d295544 100644 --- a/.github/workflows/unit_tests.yml +++ b/.github/workflows/unit_tests.yml @@ -12,7 +12,7 @@ on: jobs: # Run unit tests - test: + test_pip: runs-on: ${{ matrix.os }} defaults: run: @@ -58,4 +58,36 @@ jobs: which python - run: pip install -e . - run: python -c "import pybispectra; import mne; print(f'PyBispectra {pybispectra.__version__}\n'); mne.sys_info()" - - run: python -m coverage run --source=pybispectra -m pytest -v tests && coverage report -m + - name: Run pytest + run: python -m coverage run --source=pybispectra -m pytest -v tests && coverage report -m + + test_conda: + timeout-minutes: 90 + name: 'py3.12' + runs-on: ubuntu-20.04 + defaults: + run: + shell: bash -el {0} + env: + MKL_NUM_THREADS: '1' + PYTHONUNBUFFERED: '1' + PYTHON_VERSION: '3.12' + steps: + - uses: actions/checkout@v4 + - uses: pyvista/setup-headless-display-action@main + with: + qt: true + pyvista: false + - uses: mamba-org/setup-micromamba@v1 + with: + environment-file: environment.yml + create-args: >- # beware the >- instead of |, we don't split on newlines but on spaces + python=${{ env.PYTHON_VERSION }} + - name: Install dependencies + run: pip install .[test] + - run: pip install git+https://github.com/braindatalab/PyBispectra@main + - run: pip install -e . + - name: Display versions and environment information + run: python -c "import pybispectra; import mne; print(f'PyBispectra {pybispectra.__version__}\n'); mne.sys_info()" + - name: Run pytest + run: python -m coverage run --source=pybispectra -m pytest -v tests && coverage report -m From ee94782eb1d0dc6bf0bfeb98ce3ee0bcd9b22349 Mon Sep 17 00:00:00 2001 From: Thomas Samuel Binns Date: Thu, 12 Sep 2024 15:22:51 +0200 Subject: [PATCH 3/4] Update conda test --- .github/workflows/unit_tests.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/unit_tests.yml b/.github/workflows/unit_tests.yml index d295544..cba64b3 100644 --- a/.github/workflows/unit_tests.yml +++ b/.github/workflows/unit_tests.yml @@ -83,10 +83,10 @@ jobs: environment-file: environment.yml create-args: >- # beware the >- instead of |, we don't split on newlines but on spaces python=${{ env.PYTHON_VERSION }} - - name: Install dependencies - run: pip install .[test] - - run: pip install git+https://github.com/braindatalab/PyBispectra@main - - run: pip install -e . + - name: Install package and test dependencies + run: | + pip install -e . + pip install .[test] - name: Display versions and environment information run: python -c "import pybispectra; import mne; print(f'PyBispectra {pybispectra.__version__}\n'); mne.sys_info()" - name: Run pytest From 8f3e1ccbf46edb583fce5665bc3e65ccf94796a3 Mon Sep 17 00:00:00 2001 From: Thomas Samuel Binns Date: Thu, 12 Sep 2024 15:24:24 +0200 Subject: [PATCH 4/4] Update conda test --- .github/workflows/unit_tests.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/unit_tests.yml b/.github/workflows/unit_tests.yml index cba64b3..40c686a 100644 --- a/.github/workflows/unit_tests.yml +++ b/.github/workflows/unit_tests.yml @@ -63,7 +63,6 @@ jobs: test_conda: timeout-minutes: 90 - name: 'py3.12' runs-on: ubuntu-20.04 defaults: run: