Repository: catalystneuro/nwb-conversion-tools (language: python)

Issue:
Add Python 3.8 to testing pipeline
related to #303 


Discussion / hints:

Fix patch:
diff --git a/requirements-full.txt b/requirements-full.txt
index cd291953d..c89cacf96 100644
--- a/requirements-full.txt
+++ b/requirements-full.txt
@@ -17,4 +17,4 @@ ndx-events==0.2.0
 parameterized==0.8.1
 pyintan==0.3.0
 pyopenephys==1.1.2
-sonpy==1.7.5
+sonpy


Test patch:
diff --git a/.github/workflows/full-tests-mac.yml b/.github/workflows/full-tests-mac.yml
deleted file mode 100644
index 775c8957b..000000000
--- a/.github/workflows/full-tests-mac.yml
+++ /dev/null
@@ -1,38 +0,0 @@
-name: Full tests on Mac
-on: pull_request
-jobs:
-  run:
-    name: Full tests on ${{ matrix.os }}
-    runs-on: macos-latest
-    strategy:
-      fail-fast: false
-    steps:
-      - uses: actions/checkout@v2
-      - run: git fetch --prune --unshallow --tags
-      - name: Setup Python
-        uses: actions/setup-python@v2
-        with:
-          python-version: 3.7
-      - name: Install this package and pytest, on development mode
-        env:
-            NWB_CONVERSION_INSTALL_MODE: development
-        run: |
-          pip install -r requirements-full.txt
-          pip install -e .
-          pip install pytest
-      - name: Get ephy_testing_data current head hash
-        id: ephys
-        run: echo "::set-output name=HASH_EPHY_DATASET::$(git ls-remote https://gin.g-node.org/NeuralEnsemble/ephy_testing_data.git HEAD | cut -f1)"
-      # - name: Cache ephys dataset - ${{ steps.ephys.outputs.HASH_EPHYS_DATASET }}
-      #   uses: actions/cache@v2
-      #   id: cache-datasets
-      #   with:
-      #     path: /home/runner/work/nwb-conversion-tools/nwb-conversion-tools/ephy_testing_data
-      #     key: ecephys-datasets-3-${{ steps.ephys.outputs.HASH_EPHY_DATASET }}
-      #     restore-keys: ecephys-datasets-3-${{ steps.ephys.outputs.HASH_EPHY_DATASET }}
-      # - name: Run pytest with GIN data
-      #   if: steps.cache-datasets.outputs.cache-hit == true
-      #   run: pytest
-      - name: Run pytest without GIN data
-        # if: steps.cache-datasets.outputs.cache-hit == false
-        run: pytest tests/test_internals
diff --git a/.github/workflows/full-tests-windows.yml b/.github/workflows/full-tests-windows.yml
deleted file mode 100644
index 8bbaaf748..000000000
--- a/.github/workflows/full-tests-windows.yml
+++ /dev/null
@@ -1,38 +0,0 @@
-name: Full tests on Windows
-on: pull_request
-jobs:
-  run:
-    name: Full tests on ${{ matrix.os }}
-    runs-on: windows-latest
-    strategy:
-      fail-fast: false
-    steps:
-      - uses: actions/checkout@v2
-      - run: git fetch --prune --unshallow --tags
-      - name: Setup Python
-        uses: actions/setup-python@v2
-        with:
-          python-version: 3.7
-      - name: Install this package and pytest, on development mode
-        env:
-            NWB_CONVERSION_INSTALL_MODE: development
-        run: |
-          pip install -r requirements-full.txt
-          pip install -e .
-          pip install pytest
-      - name: Get ephy_testing_data current head hash
-        id: ephys
-        run: echo "::set-output name=HASH_EPHY_DATASET::$(git ls-remote https://gin.g-node.org/NeuralEnsemble/ephy_testing_data.git HEAD | cut -f1)"
-      # - name: Cache ephys dataset - ${{ steps.ephys.outputs.HASH_EPHYS_DATASET }}
-      #   uses: actions/cache@v2
-      #   id: cache-datasets
-      #   with:
-      #     path: /home/runner/work/nwb-conversion-tools/nwb-conversion-tools/ephy_testing_data
-      #     key: ecephys-datasets-3-${{ steps.ephys.outputs.HASH_EPHY_DATASET }}
-      #     restore-keys: ecephys-datasets-3-${{ steps.ephys.outputs.HASH_EPHY_DATASET }}
-      # - name: Run pytest with GIN data
-      #   if: steps.cache-datasets.outputs.cache-hit == true
-        # run: pytest
-      - name: Run pytest without GIN data
-        # if: steps.cache-datasets.outputs.cache-hit == false
-        run: pytest tests/test_internals
diff --git a/.github/workflows/partial-tests.yml b/.github/workflows/partial-tests.yml
deleted file mode 100644
index ee9b6aa00..000000000
--- a/.github/workflows/partial-tests.yml
+++ /dev/null
@@ -1,28 +0,0 @@
-name: Partial (lazy) tests on all OS
-on: pull_request
-jobs:
-  run:
-    name: Lazy tests on (${{ matrix.os }})
-    runs-on: ${{ matrix.os }}
-    strategy:
-      fail-fast: false
-      matrix:
-        os: ["ubuntu-latest", "windows-latest", "macos-latest"]
-    steps:
-    - uses: actions/checkout@v2
-    - run: git fetch --prune --unshallow --tags
-    - name: Setup Python
-      uses: actions/setup-python@v2
-      with:
-        python-version: 3.7
-    - name: Install pip
-      run: |
-        python -m pip install --upgrade pip
-    - name: Install this package, on production mode
-      env:
-          NWB_CONVERSION_INSTALL_MODE: production
-      run: |
-        pip install -e .
-        pip install pytest
-    - name: Run tests
-      run: pytest tests/test_internals
diff --git a/.github/workflows/full-tests-linux.yml b/.github/workflows/testing-linux.yml
similarity index 66%
rename from .github/workflows/full-tests-linux.yml
rename to .github/workflows/testing-linux.yml
index e9ea3fe59..0074aec3d 100644
--- a/.github/workflows/full-tests-linux.yml
+++ b/.github/workflows/testing-linux.yml
@@ -1,27 +1,41 @@
-name: Full tests on Linux
+name: Minimal and full tests on Linux
 on: pull_request
 jobs:
   run:
-    name: Full tests on Linux
+    name: Minimal and full tests on Linux with Python ${{ matrix.python-version }}
     runs-on: ubuntu-latest
     strategy:
       fail-fast: false
+      matrix:
+          python-version: [3.7, 3.8]
     steps:
       - uses: s-weigand/setup-conda@v1
       - uses: actions/checkout@v2
       - run: git fetch --prune --unshallow --tags
-      - name: Setup Python
+      - name: Setup Python ${{ matrix.python-version }}
         uses: actions/setup-python@v2
         with:
-          python-version: 3.7
-      - name: Install this package and pytest, on development mode
-        env:
-            NWB_CONVERSION_INSTALL_MODE: development
+          python-version: ${{ matrix.python-version }}
+      - name: Install pytest
         run: |
-          pip install -r requirements-full.txt
-          pip install -e .
           pip install pytest
           pip install pytest-cov
+
+      - name: Install nwb-conversion-tools with minimal requirements
+        run: pip install -e .
+      - name: Run minimal pytest with coverage
+        run: pytest tests/test_internals --cov=./ --cov-report xml:/home/runner/work/nwb-conversion-tools/nwb-conversion-tools/minimal-coverage.xml
+      - name: Upload minimal coverage to Codecov
+        uses: codecov/codecov-action@v1
+        with:
+          token: ${{ secrets.CODECOV_TOKEN }}
+          file: /home/runner/work/nwb-conversion-tools/nwb-conversion-tools/minimal-coverage.xml
+          flags: unittests
+          name: codecov-umbrella 
+          yml: /home/runner/work/nwb-conversion-tools/nwb-conversion-tools/codecov.yml
+
+      - name: Install full requirements
+        run: pip install -r requirements-full.txt
       - name: Get ephy_testing_data current head hash
         id: ephys
         run: echo "::set-output name=HASH_EPHY_DATASET::$(git ls-remote https://gin.g-node.org/NeuralEnsemble/ephy_testing_data.git HEAD | cut -f1)"
@@ -50,9 +64,9 @@ jobs:
           datalad get -r ./phy/phy_example_0/
           datalad get -r ./blackrock/
           datalad get -r ./axona/
-      - name: Run pytest with coverage  
+      - name: Run full pytest with coverage
         run: pytest --cov=./ --cov-report xml:/home/runner/work/nwb-conversion-tools/nwb-conversion-tools/coverage.xml
-      - name: Upload coverage to Codecov
+      - name: Upload full coverage to Codecov
         uses: codecov/codecov-action@v1
         with:
           token: ${{ secrets.CODECOV_TOKEN }}
diff --git a/.github/workflows/testing-mac.yml b/.github/workflows/testing-mac.yml
new file mode 100644
index 000000000..39fc03a2b
--- /dev/null
+++ b/.github/workflows/testing-mac.yml
@@ -0,0 +1,53 @@
+name: Minimal and full tests on Mac
+on: pull_request
+jobs:
+  run:
+    name: Minimal and full tests on Mac with Python ${{ matrix.python-version }}
+    runs-on: macos-latest
+    strategy:
+      fail-fast: false
+      matrix:
+        python-version: [3.7, 3.8]
+    steps:
+      - uses: actions/checkout@v2
+      - run: git fetch --prune --unshallow --tags
+      - name: Setup Python ${{ matrix.python-version }}
+        uses: actions/setup-python@v2
+        with:
+          python-version: ${{ matrix.python-version }}
+      - name: Install pytest
+        run: |
+          pip install pytest
+          pip install pytest-cov
+
+      - name: Install nwb-conversion-tools with minimal requirements
+        run: pip install -e .
+      - name: Run minimal pytest with coverage
+        run: pytest tests/test_internals --cov=./ --cov-report xml:./nwb-conversion-tools/nwb-conversion-tools/minimal-coverage.xml
+      - name: Upload minimal coverage to Codecov
+        uses: codecov/codecov-action@v1
+        with:
+          token: ${{ secrets.CODECOV_TOKEN }}
+          file: ./nwb-conversion-tools/nwb-conversion-tools/minimal-coverage.xml
+          flags: unittests
+          name: codecov-umbrella 
+          yml: ./nwb-conversion-tools/nwb-conversion-tools/codecov.yml
+
+      - name: Install full requirements
+        run: pip install -r requirements-full.txt
+      # - name: Get ephy_testing_data current head hash
+      #   id: ephys
+      #   run: echo "::set-output name=HASH_EPHY_DATASET::$(git ls-remote https://gin.g-node.org/NeuralEnsemble/ephy_testing_data.git HEAD | cut -f1)"
+      # - name: Cache ephys dataset - ${{ steps.ephys.outputs.HASH_EPHYS_DATASET }}
+      #   uses: actions/cache@v2
+      #   id: cache-datasets
+      #   with:
+      #     path: /home/runner/work/nwb-conversion-tools/nwb-conversion-tools/ephy_testing_data
+      #     key: ecephys-datasets-3-${{ steps.ephys.outputs.HASH_EPHY_DATASET }}
+      #     restore-keys: ecephys-datasets-3-${{ steps.ephys.outputs.HASH_EPHY_DATASET }}
+      # - name: Run pytest with GIN data
+      #   if: steps.cache-datasets.outputs.cache-hit == true
+      #   run: pytest
+      - name: Run pytest without GIN data
+        # if: steps.cache-datasets.outputs.cache-hit == false
+        run: pytest tests/test_internals
diff --git a/.github/workflows/testing-windows.yml b/.github/workflows/testing-windows.yml
new file mode 100644
index 000000000..2b5e92b77
--- /dev/null
+++ b/.github/workflows/testing-windows.yml
@@ -0,0 +1,53 @@
+name: Minimal and full tests on Windows
+on: pull_request
+jobs:
+  run:
+    name: Minimal and full tests on Windows with Python ${{ matrix.python-version }}
+    runs-on: windows-latest
+    strategy:
+      fail-fast: false
+      matrix:
+        python-version: [3.7, 3.8]
+    steps:
+      - uses: actions/checkout@v2
+      - run: git fetch --prune --unshallow --tags
+      - name: Setup Python ${{ matrix.python-version }}
+        uses: actions/setup-python@v2
+        with:
+          python-version: ${{ matrix.python-version }}
+      - name: Install pytest
+        run: |
+          pip install pytest
+          pip install pytest-cov
+
+      - name: Install nwb-conversion-tools with minimal requirements
+        run: pip install -e .
+      - name: Run minimal pytest with coverage
+        run: pytest tests/test_internals --cov=./ --cov-report xml:./nwb-conversion-tools/nwb-conversion-tools/minimal-coverage.xml
+      - name: Upload minimal coverage to Codecov
+        uses: codecov/codecov-action@v1
+        with:
+          token: ${{ secrets.CODECOV_TOKEN }}
+          file: ./nwb-conversion-tools/nwb-conversion-tools/minimal-coverage.xml
+          flags: unittests
+          name: codecov-umbrella 
+          yml: ./nwb-conversion-tools/nwb-conversion-tools/codecov.yml
+
+      - name: Install full requirements
+        run: pip install -r requirements-full.txt
+      # - name: Get ephy_testing_data current head hash
+      #   id: ephys
+      #   run: echo "::set-output name=HASH_EPHY_DATASET::$(git ls-remote https://gin.g-node.org/NeuralEnsemble/ephy_testing_data.git HEAD | cut -f1)"
+      # - name: Cache ephys dataset - ${{ steps.ephys.outputs.HASH_EPHYS_DATASET }}
+      #   uses: actions/cache@v2
+      #   id: cache-datasets
+      #   with:
+      #     path: /home/runner/work/nwb-conversion-tools/nwb-conversion-tools/ephy_testing_data
+      #     key: ecephys-datasets-3-${{ steps.ephys.outputs.HASH_EPHY_DATASET }}
+      #     restore-keys: ecephys-datasets-3-${{ steps.ephys.outputs.HASH_EPHY_DATASET }}
+      # - name: Run pytest with GIN data
+      #   if: steps.cache-datasets.outputs.cache-hit == true
+        # run: pytest
+      - name: Run pytest without GIN data
+        # if: steps.cache-datasets.outputs.cache-hit == false
+        run: pytest tests/test_internals