From 3c4fe76b181b315bb69cbda321c178d43e619a2e Mon Sep 17 00:00:00 2001 From: zmaalick Date: Mon, 8 Mar 2021 10:53:41 +0000 Subject: [PATCH 01/37] rewrite test.yml with dafault current and next envs --- .github/workflows/tests.yml | 58 ++++++++++++++++++++++--------------- 1 file changed, 35 insertions(+), 23 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 0179f42..9e10091 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -1,33 +1,45 @@ -name: Python Package using Conda - -on: [push] +name: Tests +on: [pull_request] jobs: - build-linux: + Sphinx-Pytest-flake8: runs-on: ubuntu-latest - timeout-minutes: 5 - + strategy: + fail-fast: false + matrix: + env: [current, next] steps: - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v2 + - uses: actions/cache@v2 + id: cache + env: + # Increase this value to reset cache + CACHE_NUMBER: 2 with: - python-version: 3.6 - - name: Install dependencies + path: /usr/share/miniconda/envs/default-${{ matrix.env }} + key: ${{ format('{0}-conda-default-{1}-{2}-{3}', runner.os, env.CACHE_NUMBER, matrix.env, hashFiles(format('envs/environment_{0}.yml', matrix.env))) }} + - name: conda env update + if: steps.cache.outputs.cache-hit != 'true' run: | - # $CONDA is an environment variable pointing to the root of the miniconda directory - # note that most requirements are dependencies of iris so don't need to explicitly include - $CONDA/bin/conda install -c conda-forge python=3.6 iris=2.2.0 numpy=1.15 cartopy=0.17.0 cftime=1.0.0b1 mo_pack imagehash - - name: Lint with flake8 + source '/usr/share/miniconda/etc/profile.d/conda.sh' + conda install -c conda-forge mamba + mamba env update -q --file envs/environment_${{ matrix.env }}.yml --name default-${{ matrix.env }} + - name: conda info run: | - $CONDA/bin/conda install flake8 - # stop the build if there are Python syntax errors or undefined names - # TODO: Add/sub more codes below - $CONDA/bin/flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics - # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide - $CONDA/bin/flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics - - name: Test with pytest + source '/usr/share/miniconda/etc/profile.d/conda.sh' + conda activate default-${{ matrix.env }} + conda info + conda list + - name: pytest run: | - conda install pytest + source '/usr/share/miniconda/etc/profile.d/conda.sh' + conda activate default-${{ matrix.env }} cd lib - $CONDA/bin/pytest + pytest + - name: flake8 + run: | + source '/usr/share/miniconda/etc/profile.d/conda.sh' + conda activate default-${{ matrix.env }} + flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics + # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide + flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics From fd8ac8cf8063eae2cf7d7af5a37db0c5a1c38d6f Mon Sep 17 00:00:00 2001 From: zmaalick Date: Mon, 8 Mar 2021 10:54:12 +0000 Subject: [PATCH 02/37] add dafault current and next yml's --- envs/default-current.yml | 13 +++++++++++++ envs/default-next.yml | 13 +++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 envs/default-current.yml create mode 100644 envs/default-next.yml diff --git a/envs/default-current.yml b/envs/default-current.yml new file mode 100644 index 0000000..877a1b9 --- /dev/null +++ b/envs/default-current.yml @@ -0,0 +1,13 @@ +# Use this file to create a conda environment using: +# conda env create --file envs/default-current.yml + +name: default-current +channels: + - conda-forge +dependencies: + - python=3.6 + - iris=2.2 + - numpy=1.15.4 + - scipy=1.3.3 + - cftime=1.0.1 + - pytest diff --git a/envs/default-next.yml b/envs/default-next.yml new file mode 100644 index 0000000..f54ccd4 --- /dev/null +++ b/envs/default-next.yml @@ -0,0 +1,13 @@ +# Use this file to create a conda environment using: +# conda env create --file envs/default-next.yml + +name: default-next +channels: + - conda-forge +dependencies: + - python=3.7 + - iris=2.4 + - numpy=1.15.4 + - scipy=1.3.3 + - cftime=1.0.1 + - pytest From 6543ffd49a1b57fcdccf0ca7f073693a44d48a09 Mon Sep 17 00:00:00 2001 From: zmaalick Date: Mon, 8 Mar 2021 11:26:02 +0000 Subject: [PATCH 03/37] update conda channels --- .github/workflows/tests.yml | 58 ++++++++++++++----------------------- 1 file changed, 22 insertions(+), 36 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 9e10091..6e38abf 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -1,45 +1,31 @@ -name: Tests +name: Python Package Using Anaconda + +on: [push] -on: [pull_request] jobs: - Sphinx-Pytest-flake8: + build-linux: runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - env: [current, next] + matrix: + env: [current, next] steps: - uses: actions/checkout@v2 - - uses: actions/cache@v2 - id: cache - env: - # Increase this value to reset cache - CACHE_NUMBER: 2 + - name: conda envs setups + uses: actions/setup-python@v2 with: - path: /usr/share/miniconda/envs/default-${{ matrix.env }} - key: ${{ format('{0}-conda-default-{1}-{2}-{3}', runner.os, env.CACHE_NUMBER, matrix.env, hashFiles(format('envs/environment_{0}.yml', matrix.env))) }} - - name: conda env update - if: steps.cache.outputs.cache-hit != 'true' - run: | - source '/usr/share/miniconda/etc/profile.d/conda.sh' - conda install -c conda-forge mamba - mamba env update -q --file envs/environment_${{ matrix.env }}.yml --name default-${{ matrix.env }} - - name: conda info + update-conda: true + conda-channels: conda-forge + - name: Install dependencies run: | - source '/usr/share/miniconda/etc/profile.d/conda.sh' - conda activate default-${{ matrix.env }} - conda info - conda list - - name: pytest + # $CONDA is an environment variable pointing to the root of the miniconda directory + $CONDA/bin/conda env update --file /envs/default-${{ matrix.env }}.yml --name default-${{ matrix.env }} + - name: Lint with flake8 run: | - source '/usr/share/miniconda/etc/profile.d/conda.sh' - conda activate default-${{ matrix.env }} - cd lib - pytest - - name: flake8 - run: | - source '/usr/share/miniconda/etc/profile.d/conda.sh' - conda activate default-${{ matrix.env }} - flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics + $CONDA/bin/conda install flake8 + # stop the build if there are Python syntax errors or undefined names + $CONDA/bin/flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide - flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics + $CONDA/bin/flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics + - name: Test with pytest + run: | + conda install pytest + $CONDA/bin/pytest From 0987fa154948a7d31a130ad6d053c4dc3da29c4c Mon Sep 17 00:00:00 2001 From: zmaalick Date: Mon, 8 Mar 2021 11:27:51 +0000 Subject: [PATCH 04/37] update conda channels --- .github/workflows/tests.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 6e38abf..e4c1c61 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -5,8 +5,9 @@ on: [push] jobs: build-linux: runs-on: ubuntu-latest - matrix: - env: [current, next] + strategy: + matrix: + env: [current, next] steps: - uses: actions/checkout@v2 - name: conda envs setups From 40f1cb4705f06b22144f23bee0d46362cc399cbf Mon Sep 17 00:00:00 2001 From: zmaalick Date: Mon, 8 Mar 2021 11:31:16 +0000 Subject: [PATCH 05/37] test with Shin's setup --- .github/workflows/tests.yml | 34 +++++++++------------------------- 1 file changed, 9 insertions(+), 25 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index e4c1c61..9f01d4d 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -3,30 +3,14 @@ name: Python Package Using Anaconda on: [push] jobs: - build-linux: - runs-on: ubuntu-latest - strategy: - matrix: - env: [current, next] + build-and-run: steps: - - uses: actions/checkout@v2 - - name: conda envs setups - uses: actions/setup-python@v2 + - uses: actions/checkout@v1 + - name: Update Conda environment with "requirements.yml" + uses: matthewrmshin/conda-action@v1 with: - update-conda: true - conda-channels: conda-forge - - name: Install dependencies - run: | - # $CONDA is an environment variable pointing to the root of the miniconda directory - $CONDA/bin/conda env update --file /envs/default-${{ matrix.env }}.yml --name default-${{ matrix.env }} - - name: Lint with flake8 - run: | - $CONDA/bin/conda install flake8 - # stop the build if there are Python syntax errors or undefined names - $CONDA/bin/flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics - # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide - $CONDA/bin/flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics - - name: Test with pytest - run: | - conda install pytest - $CONDA/bin/pytest + args: conda env update -f envs/default-current.yml + - name: Run "pytest" with the Conda environment + uses: matthewrmshin/conda-action@v1 + with: + args: pytest From 2fe44bb0d39fa241781bb68b39cefcbc39b3b101 Mon Sep 17 00:00:00 2001 From: zmaalick Date: Mon, 8 Mar 2021 11:34:22 +0000 Subject: [PATCH 06/37] numba test --- .github/workflows/tests.yml | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 9f01d4d..a8d702d 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -3,14 +3,24 @@ name: Python Package Using Anaconda on: [push] jobs: - build-and-run: + example-6: + name: Ex6 Mamba + runs-on: "ubuntu-latest" steps: - - uses: actions/checkout@v1 - - name: Update Conda environment with "requirements.yml" - uses: matthewrmshin/conda-action@v1 - with: - args: conda env update -f envs/default-current.yml - - name: Run "pytest" with the Conda environment - uses: matthewrmshin/conda-action@v1 - with: - args: pytest + - uses: actions/checkout@v2 + - uses: conda-incubator/setup-miniconda@v2 + with: + mamba-version: "*" + channels: conda-forge,defaults + channel-priority: true + activate-environment: anaconda-client-env + environment-file: envs/default-current.yml + - shell: bash -l {0} + run: | + conda info + conda list + conda config --show-sources + conda config --show + printenv | sort + - shell: bash -l {0} + run: mamba install jupyterlab From 3823c96fd87b8d7dc85fe7657fdcc31ce447aca7 Mon Sep 17 00:00:00 2001 From: zmaalick Date: Mon, 8 Mar 2021 11:37:33 +0000 Subject: [PATCH 07/37] original yml --- .github/workflows/tests.yml | 49 +++++++++++++++++++++---------------- 1 file changed, 28 insertions(+), 21 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index a8d702d..0179f42 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -1,26 +1,33 @@ -name: Python Package Using Anaconda +name: Python Package using Conda on: [push] jobs: - example-6: - name: Ex6 Mamba - runs-on: "ubuntu-latest" + build-linux: + runs-on: ubuntu-latest + timeout-minutes: 5 + steps: - - uses: actions/checkout@v2 - - uses: conda-incubator/setup-miniconda@v2 - with: - mamba-version: "*" - channels: conda-forge,defaults - channel-priority: true - activate-environment: anaconda-client-env - environment-file: envs/default-current.yml - - shell: bash -l {0} - run: | - conda info - conda list - conda config --show-sources - conda config --show - printenv | sort - - shell: bash -l {0} - run: mamba install jupyterlab + - uses: actions/checkout@v2 + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: 3.6 + - name: Install dependencies + run: | + # $CONDA is an environment variable pointing to the root of the miniconda directory + # note that most requirements are dependencies of iris so don't need to explicitly include + $CONDA/bin/conda install -c conda-forge python=3.6 iris=2.2.0 numpy=1.15 cartopy=0.17.0 cftime=1.0.0b1 mo_pack imagehash + - name: Lint with flake8 + run: | + $CONDA/bin/conda install flake8 + # stop the build if there are Python syntax errors or undefined names + # TODO: Add/sub more codes below + $CONDA/bin/flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics + # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide + $CONDA/bin/flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics + - name: Test with pytest + run: | + conda install pytest + cd lib + $CONDA/bin/pytest From e985b7b38123e42931539706384cde9bd3483dfd Mon Sep 17 00:00:00 2001 From: zmaalick Date: Mon, 8 Mar 2021 11:49:01 +0000 Subject: [PATCH 08/37] add matrix --- .github/workflows/tests.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 0179f42..fc6175a 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -6,7 +6,10 @@ jobs: build-linux: runs-on: ubuntu-latest timeout-minutes: 5 - + strategy: + fail-fast: false + matrix: + env: [py36_iris22, py37_iris24] steps: - uses: actions/checkout@v2 - name: Set up Python From 3cc19fc7d85690b687d6ae16f4913511fa2703b0 Mon Sep 17 00:00:00 2001 From: zmaalick Date: Mon, 8 Mar 2021 11:56:41 +0000 Subject: [PATCH 09/37] add env --- .github/workflows/tests.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index fc6175a..e0a6f60 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -9,7 +9,7 @@ jobs: strategy: fail-fast: false matrix: - env: [py36_iris22, py37_iris24] + env: [current, next] steps: - uses: actions/checkout@v2 - name: Set up Python @@ -20,7 +20,8 @@ jobs: run: | # $CONDA is an environment variable pointing to the root of the miniconda directory # note that most requirements are dependencies of iris so don't need to explicitly include - $CONDA/bin/conda install -c conda-forge python=3.6 iris=2.2.0 numpy=1.15 cartopy=0.17.0 cftime=1.0.0b1 mo_pack imagehash + $CONDA/bin/conda env update --file envs/default-current.yml --name base + #$CONDA/bin/conda install -c conda-forge python=3.6 iris=2.2.0 numpy=1.15 cartopy=0.17.0 cftime=1.0.0b1 mo_pack imagehash - name: Lint with flake8 run: | $CONDA/bin/conda install flake8 From 6699e7a71f0b9ac45bec17eaf4f16d7f1e6d9163 Mon Sep 17 00:00:00 2001 From: zmaalick Date: Mon, 8 Mar 2021 12:11:35 +0000 Subject: [PATCH 10/37] remove matrix --- .github/workflows/tests.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index e0a6f60..03603e5 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -6,10 +6,10 @@ jobs: build-linux: runs-on: ubuntu-latest timeout-minutes: 5 - strategy: - fail-fast: false - matrix: - env: [current, next] + #strategy: + #fail-fast: false + #matrix: + #env: [current, next] steps: - uses: actions/checkout@v2 - name: Set up Python From 7369f4f3f627cec1318f9c3a5c8295f50dc7cd8b Mon Sep 17 00:00:00 2001 From: zmaalick Date: Mon, 8 Mar 2021 12:20:39 +0000 Subject: [PATCH 11/37] using envronment-file key --- .github/workflows/tests.yml | 28 ++++++++-------------------- 1 file changed, 8 insertions(+), 20 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 03603e5..aaea0b7 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -15,23 +15,11 @@ jobs: - name: Set up Python uses: actions/setup-python@v2 with: - python-version: 3.6 - - name: Install dependencies - run: | - # $CONDA is an environment variable pointing to the root of the miniconda directory - # note that most requirements are dependencies of iris so don't need to explicitly include - $CONDA/bin/conda env update --file envs/default-current.yml --name base - #$CONDA/bin/conda install -c conda-forge python=3.6 iris=2.2.0 numpy=1.15 cartopy=0.17.0 cftime=1.0.0b1 mo_pack imagehash - - name: Lint with flake8 - run: | - $CONDA/bin/conda install flake8 - # stop the build if there are Python syntax errors or undefined names - # TODO: Add/sub more codes below - $CONDA/bin/flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics - # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide - $CONDA/bin/flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics - - name: Test with pytest - run: | - conda install pytest - cd lib - $CONDA/bin/pytest + channels: conda-forge + channel-priority: true + activate-environment: anaconda-client-env + environment-file: envs/default-current.yml + - shell: bash -l {0} + run: | + conda info + conda list From d0e6f2ac1724f424c9b460b2726e81041ca6922f Mon Sep 17 00:00:00 2001 From: zmaalick Date: Mon, 8 Mar 2021 12:24:36 +0000 Subject: [PATCH 12/37] change yml --- envs/default-current.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/envs/default-current.yml b/envs/default-current.yml index 877a1b9..4bb0fdb 100644 --- a/envs/default-current.yml +++ b/envs/default-current.yml @@ -7,7 +7,3 @@ channels: dependencies: - python=3.6 - iris=2.2 - - numpy=1.15.4 - - scipy=1.3.3 - - cftime=1.0.1 - - pytest From 0902baf0a240cf67f6ca4696dde9f293b96cabca Mon Sep 17 00:00:00 2001 From: zmaalick Date: Mon, 8 Mar 2021 12:27:48 +0000 Subject: [PATCH 13/37] fix error --- .github/workflows/tests.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index aaea0b7..b5ed191 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -20,6 +20,4 @@ jobs: activate-environment: anaconda-client-env environment-file: envs/default-current.yml - shell: bash -l {0} - run: | - conda info - conda list + run: conda --version From a7e12ed53b9ec061044832abb83680cf8800a283 Mon Sep 17 00:00:00 2001 From: zmaalick Date: Mon, 8 Mar 2021 12:29:49 +0000 Subject: [PATCH 14/37] error fixed --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index b5ed191..360ec74 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -20,4 +20,4 @@ jobs: activate-environment: anaconda-client-env environment-file: envs/default-current.yml - shell: bash -l {0} - run: conda --version + run: $CONDA/bin/conda --version From 51d06f8168cc05fe3dd81d233e49a202c39c98ae Mon Sep 17 00:00:00 2001 From: zmaalick Date: Mon, 8 Mar 2021 12:31:57 +0000 Subject: [PATCH 15/37] change run --- .github/workflows/tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 360ec74..93100ab 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -19,5 +19,5 @@ jobs: channel-priority: true activate-environment: anaconda-client-env environment-file: envs/default-current.yml - - shell: bash -l {0} - run: $CONDA/bin/conda --version + - name: checking info + run: conda --version From 90dffb446615ab41e13dac655488f0c3dcc2f19f Mon Sep 17 00:00:00 2001 From: zmaalick Date: Mon, 8 Mar 2021 15:35:17 +0000 Subject: [PATCH 16/37] add matrix --- .github/workflows/tests.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 93100ab..e3bbbcc 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -6,10 +6,10 @@ jobs: build-linux: runs-on: ubuntu-latest timeout-minutes: 5 - #strategy: + strategy: #fail-fast: false - #matrix: - #env: [current, next] + matrix: + env: [current, next] steps: - uses: actions/checkout@v2 - name: Set up Python @@ -18,6 +18,6 @@ jobs: channels: conda-forge channel-priority: true activate-environment: anaconda-client-env - environment-file: envs/default-current.yml + environment-file: envs/default-${{ matrix.env }}.yml - name: checking info run: conda --version From 187f8c789177606dce722ed8d8c9e6ae6b5efc07 Mon Sep 17 00:00:00 2001 From: zmaalick Date: Mon, 8 Mar 2021 15:38:51 +0000 Subject: [PATCH 17/37] update yml with more libraries --- envs/default-current.yml | 7 +++++++ envs/default-next.yml | 9 ++++++--- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/envs/default-current.yml b/envs/default-current.yml index 4bb0fdb..ad39327 100644 --- a/envs/default-current.yml +++ b/envs/default-current.yml @@ -7,3 +7,10 @@ channels: dependencies: - python=3.6 - iris=2.2 + - numpy=1.15 + - cartopy=0.17.0 + - cftime=1.0.0b1 + - mo_pack + - imagehash + - pytest + - flake8 diff --git a/envs/default-next.yml b/envs/default-next.yml index f54ccd4..7a83178 100644 --- a/envs/default-next.yml +++ b/envs/default-next.yml @@ -7,7 +7,10 @@ channels: dependencies: - python=3.7 - iris=2.4 - - numpy=1.15.4 - - scipy=1.3.3 - - cftime=1.0.1 + - numpy=1.15 + - cartopy=0.17.0 + - cftime=1.0.0b1 + - mo_pack + - imagehash - pytest + - flake8 From 3d84fd769f4cdcf1bc242d073ffc592340745045 Mon Sep 17 00:00:00 2001 From: zmaalick Date: Mon, 8 Mar 2021 15:40:58 +0000 Subject: [PATCH 18/37] add pytest --- .github/workflows/tests.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index e3bbbcc..5447c60 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -19,5 +19,9 @@ jobs: channel-priority: true activate-environment: anaconda-client-env environment-file: envs/default-${{ matrix.env }}.yml - - name: checking info + - name: checking conda info run: conda --version + - name: Test with pytest + run: | + cd lib + $CONDA/bin/pytest From c8430635f2e435f4f2e5cf5eebaa22541801618b Mon Sep 17 00:00:00 2001 From: zmaalick Date: Mon, 8 Mar 2021 15:44:26 +0000 Subject: [PATCH 19/37] add conda list --- .github/workflows/tests.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 5447c60..060b280 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -22,6 +22,4 @@ jobs: - name: checking conda info run: conda --version - name: Test with pytest - run: | - cd lib - $CONDA/bin/pytest + run: conda list From 283687d52d42d44e2fa01e8156918e510154abe9 Mon Sep 17 00:00:00 2001 From: zmaalick Date: Mon, 8 Mar 2021 15:46:07 +0000 Subject: [PATCH 20/37] add conda list --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 060b280..7984866 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -22,4 +22,4 @@ jobs: - name: checking conda info run: conda --version - name: Test with pytest - run: conda list + run: conda env list From 82fce94c2a77419291e8edd2ff26cdc4837b6e14 Mon Sep 17 00:00:00 2001 From: zmaalick Date: Mon, 8 Mar 2021 17:19:25 +0000 Subject: [PATCH 21/37] add conda activate --- .github/workflows/tests.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 7984866..9f11994 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -20,6 +20,10 @@ jobs: activate-environment: anaconda-client-env environment-file: envs/default-${{ matrix.env }}.yml - name: checking conda info - run: conda --version - - name: Test with pytest - run: conda env list + run: | + conda activate default-${{ matrix.env }} + conda --version + - name: checking conda list + run: | + conda activate default-${{ matrix.env }} + conda list From 9aa7d9587c6965438bd707ccaeb7f8fb06db3d3a Mon Sep 17 00:00:00 2001 From: zmaalick Date: Mon, 8 Mar 2021 17:25:39 +0000 Subject: [PATCH 22/37] add shel --- .github/workflows/tests.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 9f11994..95ae881 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -20,10 +20,12 @@ jobs: activate-environment: anaconda-client-env environment-file: envs/default-${{ matrix.env }}.yml - name: checking conda info + shell: bash run: | conda activate default-${{ matrix.env }} conda --version - name: checking conda list + shell: bash run: | conda activate default-${{ matrix.env }} conda list From a72c874097a139a4abbe8cb5701ed20eb8d90646 Mon Sep 17 00:00:00 2001 From: zmaalick Date: Mon, 8 Mar 2021 17:29:18 +0000 Subject: [PATCH 23/37] add source --- .github/workflows/tests.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 95ae881..624b86e 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -22,10 +22,12 @@ jobs: - name: checking conda info shell: bash run: | + source '/usr/share/miniconda/etc/profile.d/conda.sh' conda activate default-${{ matrix.env }} conda --version - name: checking conda list shell: bash run: | + source '/usr/share/miniconda/etc/profile.d/conda.sh' conda activate default-${{ matrix.env }} conda list From 56d36ea828fc5357b621057b6bdd479bac3ab195 Mon Sep 17 00:00:00 2001 From: zmaalick Date: Mon, 8 Mar 2021 17:30:58 +0000 Subject: [PATCH 24/37] comment out conda activate for test --- .github/workflows/tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 624b86e..e1c3065 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -23,11 +23,11 @@ jobs: shell: bash run: | source '/usr/share/miniconda/etc/profile.d/conda.sh' - conda activate default-${{ matrix.env }} + #conda activate default-${{ matrix.env }} conda --version - name: checking conda list shell: bash run: | source '/usr/share/miniconda/etc/profile.d/conda.sh' - conda activate default-${{ matrix.env }} + #conda activate default-${{ matrix.env }} conda list From 6a6b3eb3f479b66dda780ae5a4a5b5f34bb9000d Mon Sep 17 00:00:00 2001 From: zmaalick Date: Mon, 8 Mar 2021 17:33:18 +0000 Subject: [PATCH 25/37] comment out channels --- .github/workflows/tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index e1c3065..221bd8e 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -15,8 +15,8 @@ jobs: - name: Set up Python uses: actions/setup-python@v2 with: - channels: conda-forge - channel-priority: true + #channels: conda-forge + #channel-priority: true activate-environment: anaconda-client-env environment-file: envs/default-${{ matrix.env }}.yml - name: checking conda info From 67c7d2f1191383d490a0c14c7683603847bb8ef3 Mon Sep 17 00:00:00 2001 From: zmaalick Date: Mon, 8 Mar 2021 17:36:39 +0000 Subject: [PATCH 26/37] add conda create --- .github/workflows/tests.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 221bd8e..90d8514 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -22,8 +22,9 @@ jobs: - name: checking conda info shell: bash run: | + conda env update -f envs/default-${{ matrix.env }}.yml source '/usr/share/miniconda/etc/profile.d/conda.sh' - #conda activate default-${{ matrix.env }} + conda activate default-${{ matrix.env }} conda --version - name: checking conda list shell: bash From 30b4137a2b703576087b443868c7506a5a57834f Mon Sep 17 00:00:00 2001 From: zmaalick Date: Mon, 8 Mar 2021 17:43:50 +0000 Subject: [PATCH 27/37] comment out python --- .github/workflows/tests.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 90d8514..e79b3eb 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -12,13 +12,13 @@ jobs: env: [current, next] steps: - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v2 - with: + #- name: Set up Python + #uses: actions/setup-python@v2 + #with: #channels: conda-forge #channel-priority: true - activate-environment: anaconda-client-env - environment-file: envs/default-${{ matrix.env }}.yml + #activate-environment: anaconda-client-env + #environment-file: envs/default-${{ matrix.env }}.yml - name: checking conda info shell: bash run: | From 354e70ebaa1cc8b58ced1e9265c9ab155060c79a Mon Sep 17 00:00:00 2001 From: zmaalick Date: Mon, 8 Mar 2021 17:52:55 +0000 Subject: [PATCH 28/37] install mamba --- .github/workflows/tests.yml | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index e79b3eb..2530b7d 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -22,13 +22,12 @@ jobs: - name: checking conda info shell: bash run: | - conda env update -f envs/default-${{ matrix.env }}.yml source '/usr/share/miniconda/etc/profile.d/conda.sh' - conda activate default-${{ matrix.env }} - conda --version - - name: checking conda list - shell: bash - run: | - source '/usr/share/miniconda/etc/profile.d/conda.sh' - #conda activate default-${{ matrix.env }} - conda list + conda install -c conda-forge mamba + mamba env update -q --file envs/default-${{ matrix.env }}.yml --name default-${{ matrix.env }} + #- name: checking conda list + # shell: bash + # run: | + # source '/usr/share/miniconda/etc/profile.d/conda.sh' + # #conda activate default-${{ matrix.env }} + # conda list From f7dd3b74486d7bc29b07fe5fa575e291bb34db07 Mon Sep 17 00:00:00 2001 From: zmaalick Date: Mon, 8 Mar 2021 17:57:14 +0000 Subject: [PATCH 29/37] add conda list --- .github/workflows/tests.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 2530b7d..b6c807d 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -19,15 +19,15 @@ jobs: #channel-priority: true #activate-environment: anaconda-client-env #environment-file: envs/default-${{ matrix.env }}.yml - - name: checking conda info + - name: update conda env shell: bash run: | source '/usr/share/miniconda/etc/profile.d/conda.sh' conda install -c conda-forge mamba mamba env update -q --file envs/default-${{ matrix.env }}.yml --name default-${{ matrix.env }} - #- name: checking conda list - # shell: bash - # run: | - # source '/usr/share/miniconda/etc/profile.d/conda.sh' - # #conda activate default-${{ matrix.env }} - # conda list + - name: conda info + run: | + source '/usr/share/miniconda/etc/profile.d/conda.sh' + conda activate default-${{ matrix.env }} + conda info + conda list From 126015bf518b3113ddddce4d5f08b3d9956f427c Mon Sep 17 00:00:00 2001 From: zmaalick Date: Mon, 8 Mar 2021 19:19:06 +0000 Subject: [PATCH 30/37] add pytest --- .github/workflows/tests.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index b6c807d..a624645 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -31,3 +31,9 @@ jobs: conda activate default-${{ matrix.env }} conda info conda list + - name: pytest + run: | + source '/usr/share/miniconda/etc/profile.d/conda.sh' + conda activate default-${{ matrix.env }} + cd lib + $CONDA/bin/pytest From 9e8ffea0c6e7d7a68827f2f3f01c2b3b5fbb671e Mon Sep 17 00:00:00 2001 From: zmaalick Date: Mon, 8 Mar 2021 19:24:12 +0000 Subject: [PATCH 31/37] add pytest verbosity --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index a624645..bf96de0 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -36,4 +36,4 @@ jobs: source '/usr/share/miniconda/etc/profile.d/conda.sh' conda activate default-${{ matrix.env }} cd lib - $CONDA/bin/pytest + pytest -p no:warnings -v From 4440afbf471c5f87e8bbddc6664b273c32ea2444 Mon Sep 17 00:00:00 2001 From: zmaalick Date: Mon, 8 Mar 2021 19:32:44 +0000 Subject: [PATCH 32/37] add flake 8 test --- .github/workflows/tests.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index bf96de0..4b3c640 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -37,3 +37,10 @@ jobs: conda activate default-${{ matrix.env }} cd lib pytest -p no:warnings -v + - name: flake8 + run: | + source '/usr/share/miniconda/etc/profile.d/conda.sh' + conda activate default-${{ matrix.env }} + flake8 . --count --ignore = E123,E133,E226,W503,F405,E721,E402,F403,F401 --show-source --statistics + # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide + flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics From a55d57b31a1778a7019b2051a5322946253f1a01 Mon Sep 17 00:00:00 2001 From: zmaalick Date: Mon, 8 Mar 2021 19:38:24 +0000 Subject: [PATCH 33/37] add flake 8 test --- .github/workflows/tests.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 4b3c640..16a8747 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -41,6 +41,5 @@ jobs: run: | source '/usr/share/miniconda/etc/profile.d/conda.sh' conda activate default-${{ matrix.env }} - flake8 . --count --ignore = E123,E133,E226,W503,F405,E721,E402,F403,F401 --show-source --statistics - # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide - flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics + flake8 . --count --ignore = E123,E133,E226,W503,F405,E721,E402,F403,F401 --show-source --statistics --exit-zero --max-complexity=10 --max-line-length=127 + From 376e3613f6a38e274c0e068b0dfd0ee0cc05a148 Mon Sep 17 00:00:00 2001 From: zmaalick Date: Mon, 8 Mar 2021 19:43:53 +0000 Subject: [PATCH 34/37] add flake 8 test --- .github/workflows/tests.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 16a8747..5115a2f 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -41,5 +41,4 @@ jobs: run: | source '/usr/share/miniconda/etc/profile.d/conda.sh' conda activate default-${{ matrix.env }} - flake8 . --count --ignore = E123,E133,E226,W503,F405,E721,E402,F403,F401 --show-source --statistics --exit-zero --max-complexity=10 --max-line-length=127 - + flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics --exit-zero --max-complexity=10 --max-line-length=127 From 80bf05c41fc0d5389fd34cf8ab73126b1be73d94 Mon Sep 17 00:00:00 2001 From: zmaalick Date: Mon, 8 Mar 2021 19:49:47 +0000 Subject: [PATCH 35/37] add sphinx test --- .github/workflows/tests.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 5115a2f..8895d27 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -42,3 +42,9 @@ jobs: source '/usr/share/miniconda/etc/profile.d/conda.sh' conda activate default-${{ matrix.env }} flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics --exit-zero --max-complexity=10 --max-line-length=127 + - name: Sphinx + run: | + source '/usr/share/miniconda/etc/profile.d/conda.sh' + conda activate default-${{ matrix.env }} + cd docsrc + make github From 5149e73567eea608c41611e5bed39425e4cfde07 Mon Sep 17 00:00:00 2001 From: zmaalick Date: Mon, 8 Mar 2021 19:55:44 +0000 Subject: [PATCH 36/37] add sphinx library in env --- envs/default-current.yml | 1 + envs/default-next.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/envs/default-current.yml b/envs/default-current.yml index ad39327..fa2704a 100644 --- a/envs/default-current.yml +++ b/envs/default-current.yml @@ -14,3 +14,4 @@ dependencies: - imagehash - pytest - flake8 + - sphinx=3.4.3 diff --git a/envs/default-next.yml b/envs/default-next.yml index 7a83178..ef5e01b 100644 --- a/envs/default-next.yml +++ b/envs/default-next.yml @@ -14,3 +14,4 @@ dependencies: - imagehash - pytest - flake8 + - sphinx=3.4.3 From 6dbc9a7f5c054b0567df0824f773172877e0194d Mon Sep 17 00:00:00 2001 From: zmaalick Date: Fri, 12 Mar 2021 08:00:42 +0000 Subject: [PATCH 37/37] remove comments --- .github/workflows/tests.yml | 8 -------- 1 file changed, 8 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 8895d27..6c336f2 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -7,18 +7,10 @@ jobs: runs-on: ubuntu-latest timeout-minutes: 5 strategy: - #fail-fast: false matrix: env: [current, next] steps: - uses: actions/checkout@v2 - #- name: Set up Python - #uses: actions/setup-python@v2 - #with: - #channels: conda-forge - #channel-priority: true - #activate-environment: anaconda-client-env - #environment-file: envs/default-${{ matrix.env }}.yml - name: update conda env shell: bash run: |