From 35b9a5b60f867bc968359d61b3fb233bde9fe803 Mon Sep 17 00:00:00 2001 From: Yibei Chen Date: Thu, 1 Sep 2022 13:27:14 -0700 Subject: [PATCH 1/6] update notebooks.yml 1. change setup-python to setup-miniconda 2. set up conda env from `.yml` --- .github/workflows/notebooks.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/notebooks.yml b/.github/workflows/notebooks.yml index accbcd3..3d7e0b0 100644 --- a/.github/workflows/notebooks.yml +++ b/.github/workflows/notebooks.yml @@ -20,11 +20,13 @@ jobs: - name: Disable etelemetry run: echo "NO_ET=TRUE" >> $GITHUB_ENV - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 + - uses: conda-incubator/setup-miniconda@v2 with: + activate-environment: pydra-tutorial + environment-file: etc/environment.yml python-version: ${{ matrix.python-version }} - - name: Install requirements - run: python -m pip install -r requirements.txt + auto-activate-base: false + - name: Convert all md files to ipynb run: jupytext notebooks/*.md --to ipynb - name: Test notebooks with pytest From 97cf30799ef77cb562966a1f127781d5032509c2 Mon Sep 17 00:00:00 2001 From: Yibei Chen Date: Thu, 1 Sep 2022 13:34:26 -0700 Subject: [PATCH 2/6] update gh-pages.yml 1. change setup-python to setup-miniconda 2. setup conda env pydra-tutorial --- .github/workflows/gh-pages.yml | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index 54b2939..b2cee06 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -12,16 +12,19 @@ jobs: python: [3.9] steps: - uses: actions/checkout@v3 - - name: Set up Python ${{ matrix.python }} - uses: actions/setup-python@v3 + - name: Disable etelemetry + run: echo "NO_ET=TRUE" >> $GITHUB_ENV + - name: Active conda env pydra-tutorial + uses: conda-incubator/setup-miniconda@v2 with: - python-version: ${{ matrix.python }} + activate-environment: pydra-tutorial + environment-file: etc/environment.yml + python-version: ${{ matrix.python-version }} + auto-activate-base: false - name: Install dependencies run: | pip install --upgrade pip pip install -r jupyterbook/requirements.txt - - name: Disable etelemetry - run: echo "NO_ET=TRUE" >> $GITHUB_ENV - name: Build JupyterBook run: jb build -W jupyterbook - uses: peaceiris/actions-gh-pages@v3 From 174ea26dc18a833bcd526275f502c7e86715141f Mon Sep 17 00:00:00 2001 From: yibeichan Date: Thu, 1 Sep 2022 13:42:03 -0700 Subject: [PATCH 3/6] modify wf actions --- etc/environment.yml | 23 +++++++++++++++++++++++ jupyterbook/requirements.txt | 1 - requirements.txt | 16 ---------------- 3 files changed, 23 insertions(+), 17 deletions(-) create mode 100644 etc/environment.yml delete mode 100644 requirements.txt diff --git a/etc/environment.yml b/etc/environment.yml new file mode 100644 index 0000000..e4ab226 --- /dev/null +++ b/etc/environment.yml @@ -0,0 +1,23 @@ +name: pydra-tutorial +channels: + - conda-forge + - defaults +dependencies: + - datalad + - git-annex + - pip: + - pydra + - jupyter + - jupyter_contrib_nbextensions + - jupytext + - jupyterlab + - nbformat + - nbval + - nest_asyncio + - psutil + - pytest + - numpy + - pandas + - scipy + - nibabel + - nilearn diff --git a/jupyterbook/requirements.txt b/jupyterbook/requirements.txt index b76b6eb..01b3b03 100644 --- a/jupyterbook/requirements.txt +++ b/jupyterbook/requirements.txt @@ -1,3 +1,2 @@ jupyter-book jupytext --r ../requirements.txt diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index 60c24e0..0000000 --- a/requirements.txt +++ /dev/null @@ -1,16 +0,0 @@ -pydra -jupyter -jupyter_contrib_nbextensions -jupytext -jupyterlab -matplotlib -nbformat -nbval -nest_asyncio -nibabel -nilearn -numpy -pandas -psutil -pytest -scipy From ce45d143ab7a03f64ac94324a2d2072df7412f19 Mon Sep 17 00:00:00 2001 From: yibeichan Date: Thu, 1 Sep 2022 14:07:47 -0700 Subject: [PATCH 4/6] fix incompatible packages --- jupyterbook/requirements.txt | 2 -- 1 file changed, 2 deletions(-) delete mode 100644 jupyterbook/requirements.txt diff --git a/jupyterbook/requirements.txt b/jupyterbook/requirements.txt deleted file mode 100644 index 01b3b03..0000000 --- a/jupyterbook/requirements.txt +++ /dev/null @@ -1,2 +0,0 @@ -jupyter-book -jupytext From a41afe2b3909c4dcd72e8df0b5a305b2f4d51cac Mon Sep 17 00:00:00 2001 From: yibeichan Date: Thu, 1 Sep 2022 14:14:55 -0700 Subject: [PATCH 5/6] fix minor errors --- .github/workflows/gh-pages.yml | 5 ++--- .github/workflows/notebooks.yml | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index b2cee06..a2ea35c 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -21,10 +21,9 @@ jobs: environment-file: etc/environment.yml python-version: ${{ matrix.python-version }} auto-activate-base: false + run: conda activate pydra-tutorial - name: Install dependencies - run: | - pip install --upgrade pip - pip install -r jupyterbook/requirements.txt + run: conda install -c conda-forge jupyter-book - name: Build JupyterBook run: jb build -W jupyterbook - uses: peaceiris/actions-gh-pages@v3 diff --git a/.github/workflows/notebooks.yml b/.github/workflows/notebooks.yml index 3d7e0b0..3e9977c 100644 --- a/.github/workflows/notebooks.yml +++ b/.github/workflows/notebooks.yml @@ -26,7 +26,7 @@ jobs: environment-file: etc/environment.yml python-version: ${{ matrix.python-version }} auto-activate-base: false - + run: conda activate pydra-tutorial - name: Convert all md files to ipynb run: jupytext notebooks/*.md --to ipynb - name: Test notebooks with pytest From 156996de847b4e0b30400ebb0555c09ac7461608 Mon Sep 17 00:00:00 2001 From: Chris Markiewicz Date: Thu, 8 Sep 2022 14:22:30 -0400 Subject: [PATCH 6/6] CI: Update environment, install consistently Needs matplotlib in environment Quiet complaints from conda about pip Add debug information to workflows --- .github/workflows/gh-pages.yml | 17 +++++++++-------- .github/workflows/notebooks.yml | 17 +++++++++-------- etc/environment.yml => environment.yml | 4 +++- 3 files changed, 21 insertions(+), 17 deletions(-) rename etc/environment.yml => environment.yml (89%) diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index a2ea35c..0e219ed 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -4,12 +4,13 @@ on: push: {branches: [main, master]} pull_request: {branches: [main, master]} +defaults: + run: + shell: bash -l {0} + jobs: build: runs-on: ubuntu-latest - strategy: - matrix: - python: [3.9] steps: - uses: actions/checkout@v3 - name: Disable etelemetry @@ -18,12 +19,12 @@ jobs: uses: conda-incubator/setup-miniconda@v2 with: activate-environment: pydra-tutorial - environment-file: etc/environment.yml - python-version: ${{ matrix.python-version }} - auto-activate-base: false - run: conda activate pydra-tutorial + environment-file: environment.yml + - run: conda info + - run: conda list + - run: conda config --show - name: Install dependencies - run: conda install -c conda-forge jupyter-book + run: pip install jupyter-book - name: Build JupyterBook run: jb build -W jupyterbook - uses: peaceiris/actions-gh-pages@v3 diff --git a/.github/workflows/notebooks.yml b/.github/workflows/notebooks.yml index 3e9977c..3b46e04 100644 --- a/.github/workflows/notebooks.yml +++ b/.github/workflows/notebooks.yml @@ -4,7 +4,7 @@ on: [push, pull_request] defaults: run: - shell: bash + shell: bash -l {0} jobs: build: @@ -16,17 +16,18 @@ jobs: runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Disable etelemetry - run: echo "NO_ET=TRUE" >> $GITHUB_ENV - - name: Set up Python ${{ matrix.python-version }} - - uses: conda-incubator/setup-miniconda@v2 + run: echo "NO_ET=TRUE" >> $GITHUB_ENV + - name: Active conda env pydra-tutorial + uses: conda-incubator/setup-miniconda@v2 with: activate-environment: pydra-tutorial - environment-file: etc/environment.yml + environment-file: environment.yml python-version: ${{ matrix.python-version }} - auto-activate-base: false - run: conda activate pydra-tutorial + - run: conda info + - run: conda list + - run: conda config --show - name: Convert all md files to ipynb run: jupytext notebooks/*.md --to ipynb - name: Test notebooks with pytest diff --git a/etc/environment.yml b/environment.yml similarity index 89% rename from etc/environment.yml rename to environment.yml index e4ab226..47ca1a7 100644 --- a/etc/environment.yml +++ b/environment.yml @@ -3,14 +3,16 @@ channels: - conda-forge - defaults dependencies: - - datalad - git-annex + - pip - pip: + - datalad - pydra - jupyter - jupyter_contrib_nbextensions - jupytext - jupyterlab + - matplotlib - nbformat - nbval - nest_asyncio