Repository: theislab/scib (language: python)

Issue:
Update louvain to 0.8
A new version of louvain has been released after quite some time. This PR updates scIB to use the new version, unpinning igraph.


Discussion / hints:
Codecov is failing, recommend you switch to the Codecov Action with repo token as we did for [openproblems](https://github.com/openproblems-bio/openproblems/blob/main/.github/workflows/run_tests.yml#L200)

Fix patch:
diff --git a/.gitignore b/.gitignore
index d0c449db..18dcbfa2 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,6 +1,7 @@
 scratch/
 
 htmlcov/
+coverage.xml
 .coverage*
 **.h5ad
 *test_output*


Test patch:
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index 2e60aff7..8bba1a14 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -10,13 +10,13 @@ jobs:
     lint:
         runs-on: ubuntu-latest
         steps:
-        -   uses: actions/checkout@v2
+        -   uses: actions/checkout@v3
         -   name: Set up Python
-            uses: actions/setup-python@v2
+            uses: actions/setup-python@v4
             with:
                 python-version: 3.9
 
-        -   uses: actions/cache@v2
+        -   uses: actions/cache@v3
             with:
                 path: ~/.cache/pre-commit
                 key: precommit-${{ env.pythonLocation }}-${{ hashFiles('**/.pre-commit-config.yaml') }}
@@ -34,10 +34,11 @@ jobs:
             matrix:
                 python: [3.7, 3.9]
                 os: [ubuntu-latest, macos-latest]
+
         steps:
-        -   uses: actions/checkout@v2
+        -   uses: actions/checkout@v3
         -   name: Set up Python ${{ matrix.python }}
-            uses: actions/setup-python@v2
+            uses: actions/setup-python@v4
             with:
                 python-version: ${{ matrix.python }}
 
@@ -59,17 +60,14 @@ jobs:
         -   name: Test with pytest
             if: ${{ matrix.os != 'macos-latest'}}
             run: |
-                python -m pytest --cov --cov-append \
-                    --cov-report=term-missing \
-                    --ignore=tests/integration/ \
-                    --ignore=tests/metrics/rpy2 -vv
+                pytest --cov=scib --cov-report=xml -vv --ignore=tests/integration/ --ignore=tests/metrics/rpy2 -vv
+                mv coverage.xml "$(echo 'coverage_metrics_${{ matrix.os }}_${{ matrix.python }}.xml' | sed 's/[^a-z0-9\.\/]/_/g')"
 
-        -   name: Upload coverage
-            if: ${{ matrix.os != 'macos-latest' }}
-            env:
-                CODECOV_NAME: ${{ matrix.os }}-${{ matrix.python }}
-            run: |
-                codecov --no-color --required --flags unittest
+        -   name: Upload coverage to GitHub Actions
+            uses: actions/upload-artifact@v3
+            with:
+                name: metrics
+                path: coverage_*.xml
 
     rpy2:
         runs-on: ${{ matrix.os }}
@@ -79,9 +77,9 @@ jobs:
                 python: [3.9]
                 os: [ubuntu-latest]
         steps:
-        -   uses: actions/checkout@v2
+        -   uses: actions/checkout@v3
         -   name: Set up Python ${{ matrix.python }}
-            uses: actions/setup-python@v2
+            uses: actions/setup-python@v4
             with:
                 python-version: ${{ matrix.python }}
         -   name: Set up R
@@ -100,12 +98,14 @@ jobs:
 
         -   name: Test with pytest
             run: |
-                python -m pytest --cov --cov-append --cov-report=term-missing -k rpy2 -vv
-        -   name: Upload coverage
-            env:
-                CODECOV_NAME: ${{ matrix.os }}-${{ matrix.python }}
-            run: |
-                codecov --no-color --required --flags unittest
+                pytest --cov=scib --cov-report=xml -vv --tb=native -k rpy2
+                mv coverage.xml "$(echo 'coverage_rpy2_${{ matrix.os }}_${{ matrix.python }}.xml' | sed 's/[^a-z0-9\.\/]/_/g')"
+
+        -   name: Upload coverage to GitHub Actions
+            uses: actions/upload-artifact@v3
+            with:
+                name: rpy2
+                path: coverage_*.xml
 
 
     integration:
@@ -114,10 +114,11 @@ jobs:
             matrix:
                 python: [3.7, 3.9]
                 os: [ubuntu-latest]
+
         steps:
-        -   uses: actions/checkout@v2
+        -   uses: actions/checkout@v3
         -   name: Set up Python ${{ matrix.python }}
-            uses: actions/setup-python@v2
+            uses: actions/setup-python@v4
             with:
                 python-version: ${{ matrix.python }}
 
@@ -128,9 +129,35 @@ jobs:
 
         -   name: Test with pytest
             run: |
-                python -m pytest --cov --cov-append --cov-report=term-missing -k integration -vv
+                pytest --cov=scib --cov-report=xml -vv --tb=native -k integration
+                mv coverage.xml "$(echo 'coverage_integration_${{ matrix.os }}_${{ matrix.python }}.xml' | sed 's/[^a-z0-9\.\/]/_/g')"
+
+        -   name: Upload coverage to GitHub Actions
+            uses: actions/upload-artifact@v3
+            with:
+                name: integration
+                path: coverage_*.xml
+
+
+    upload-codecov:
+        needs: [metrics, rpy2, integration]
+        runs-on: ubuntu-latest
+
+        steps:
+        -   uses: actions/checkout@v3
+            with:
+                fetch-depth: 0
+
+        -   name: Download coverage from GitHub Actions
+            uses: actions/download-artifact@v3
+
         -   name: Upload coverage
-            env:
-                CODECOV_NAME: ${{ matrix.os }}-${{ matrix.python }}
-            run: |
-                codecov --no-color --required --flags unittest
+            uses: codecov/codecov-action@v3
+            with:
+                token: ${{ secrets.CODECOV_TOKEN }}
+                flags: unittests
+                fail_ci_if_error: ${{ github.repository == 'theislab/scib' }}
+                verbose: true
+
+        -   name: Delete coverage artifacts
+            uses: geekyeggo/delete-artifact@v2