Repository: openego/eDisGo (language: python)

Issue:
[FEATURE] Change requirements from multiple versions to standard and dev
There are multiple requirements existing: extras = "geoplot", "examples", "dev", "full" and standard.

Suggestion: Change the requirements to standard and dev. Where dev is the new full. This reduces the variability of the different requirement versions.



Discussion / hints:

Fix patch:
diff --git a/eDisGo_env.yml b/eDisGo_env.yml
index 3b6eec002..e2bfcdf17 100644
--- a/eDisGo_env.yml
+++ b/eDisGo_env.yml
@@ -1,4 +1,4 @@
-name: eDisGo_env
+name: eDisGo_env_dev
 channels:
   - conda-forge
   - defaults
@@ -17,4 +17,4 @@ dependencies:
   - conda-forge::contextily
   - conda-forge::descartes
   - pip:
-      - eDisGo[full]
+      - eDisGo
diff --git a/eDisGo_env_dev.yml b/eDisGo_env_dev.yml
index e539fbb16..8a8fb05e3 100644
--- a/eDisGo_env_dev.yml
+++ b/eDisGo_env_dev.yml
@@ -17,4 +17,4 @@ dependencies:
   - conda-forge::contextily
   - conda-forge::descartes
   - pip:
-      - -e .[full]
+      - -e .[dev]
diff --git a/setup.py b/setup.py
index 40052998d..888f253f6 100644
--- a/setup.py
+++ b/setup.py
@@ -4,9 +4,9 @@
 
 from setuptools import find_packages, setup
 
-if sys.version_info[:2] < (3, 7):
+if sys.version_info[:2] < (3, 8):
     error = (
-        "eDisGo requires Python 3.7 or later (%d.%d detected)." % sys.version_info[:2]
+        "eDisGo requires Python 3.8 or later (%d.%d detected)." % sys.version_info[:2]
     )
     sys.stderr.write(error + "\n")
     sys.exit(1)
@@ -50,16 +50,8 @@ def read(fname):
     "sklearn",
     "pydot",
     "pygeos",
-]
-
-geo_plot_requirements = [
     "contextily",
     "descartes",
-    "plotly",
-    "dash==2.6.0",
-    "werkzeug==2.2.0",
-]
-examples_requirements = [
     "jupyter",
     "jupyterlab",
     "plotly",
@@ -67,6 +59,7 @@ def read(fname):
     "jupyter_dash",
     "werkzeug==2.2.0",
 ]
+
 dev_requirements = [
     "pytest",
     "jupyter_contrib_nbextensions",
@@ -79,16 +72,8 @@ def read(fname):
     "flake8",
     "pylint",
 ]
-full_requirements = list(
-    set(geo_plot_requirements + examples_requirements + dev_requirements)
-)
 
-extras = {
-    "geoplot": geo_plot_requirements,
-    "examples": examples_requirements,
-    "dev": dev_requirements,
-    "full": full_requirements,
-}
+extras = {"dev": dev_requirements}
 
 setup(
     name="eDisGo",
@@ -96,7 +81,8 @@ def read(fname):
     packages=find_packages(),
     url="https://github.com/openego/eDisGo",
     license="GNU Affero General Public License v3.0",
-    author="birgits, AnyaHe, khelfen, gplssm, nesnoj, jaappedersen, Elias, boltbeard",
+    author="birgits, AnyaHe, khelfen, gplssm, nesnoj, jaappedersen, Elias, boltbeard, "
+    "mltja",
     author_email="anya.heider@rl-institut.de",
     description="A python package for distribution network analysis and optimization",
     long_description=read("README.md"),


Test patch:
diff --git a/.github/workflows/tests-coverage.yml b/.github/workflows/tests-coverage.yml
index 297ae5aae..e83a1b297 100644
--- a/.github/workflows/tests-coverage.yml
+++ b/.github/workflows/tests-coverage.yml
@@ -1,33 +1,78 @@
 # Tests with pytest the package and monitors the covarage and sends it to coveralls.io
 # Coverage is only send to coveralls.io when no pytest tests fail
-name: "Tests & coverage"
+name: "Tests & Coverage"
 
 on: [push]
 
+# Cancel jobs on new push
+concurrency:
+  group: ${{ github.workflow }}-${{ github.ref || github.run_id }}
+  cancel-in-progress: true
+
 jobs:
   build:
-    runs-on: ubuntu-latest
+    name: "eDisGo-${{ matrix.name-suffix }} at Python ${{ matrix.python-version }} on ${{ matrix.os }}"
+    runs-on: ${{ matrix.os }}
+
     strategy:
+      fail-fast: false
       matrix:
-        python-version: [ '3.7', '3.8', '3.9' ]
+        include:
+          - name-suffix: "basic"
+            os: ubuntu-latest
+            python-version: 3.8
+          - name-suffix: "dev"
+            os: ubuntu-latest
+            python-version: 3.8
+          - name-suffix: "basic"
+            os: ubuntu-latest
+            python-version: 3.9
+          - name-suffix: "dev"
+            os: windows-latest
+            python-version: 3.8
+
     steps:
-    - name: Checkout repo
-      uses: actions/checkout@v2
-    - name: Set up Python
-      uses: actions/setup-python@v2
-      with:
-        python-version: ${{ matrix.python-version }}
-    - name: Install dependencies
-      run: |
-        pip3 install --upgrade pip
-        pip3 install -e $GITHUB_WORKSPACE[full]
-        pip3 install coveralls
-    - name: Run coverage
-      run: |
-        coverage run --source=edisgo -m pytest --runslow -vv
-    - name: Run coveralls
-      run: |
-        coveralls
-      env:
-        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
-        COVERALLS_SERVICE_NAME: github
+      - name: Checkout repo
+        uses: actions/checkout@v3
+
+      - name: Set up Python
+        uses: actions/setup-python@v4
+        with:
+          python-version: ${{ matrix.python-version }}
+
+      - name: Install packages (Linux - Basic)
+        if: runner.os == 'Linux' && matrix.name-suffix == 'basic'
+        run: |
+          pip install --upgrade pip wheel setuptools
+          pip install -e "."
+
+      - name: Install packages (Linux - Dev)
+        if: runner.os == 'Linux' && matrix.name-suffix == 'dev'
+        run: |
+          pip install --upgrade pip wheel setuptools
+          pip install -e ".[dev]"
+
+      - name: Install packages (Windows)
+        if: runner.os == 'Windows'
+        uses: conda-incubator/setup-miniconda@v2
+        with:
+          miniconda-version: "latest"
+          activate-environment: edisgo_env
+          environment-file: eDisGo_env_dev.yml
+          python-version: ${{ matrix.python-version }}
+
+      - name: Run tests
+        if: ${{ !(runner.os == 'Linux' && matrix.python-version == 3.8 && matrix.name-suffix == 'dev') }}
+        run: |
+          python -m pip install pytest
+          python -m pytest --runslow -vv
+
+      - name: Run tests, coverage and send to coveralls
+        if: runner.os == 'Linux' && matrix.python-version == 3.8 && matrix.name-suffix == 'dev'
+        run: |
+          pip install coveralls
+          coverage run --source=edisgo -m pytest --runslow -vv
+          coveralls
+        env:
+          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+          COVERALLS_SERVICE_NAME: github