Skip to content

Commit

Permalink
Merge branch 'feature/compatibility-python-3.11' into fix/#342-BUG-PY…
Browse files Browse the repository at this point in the history
…OMO-update
  • Loading branch information
joda9 committed Jul 16, 2024
2 parents 71283b5 + 5b0df1b commit 91583ed
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 19 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/tests-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,16 @@ jobs:
include:
- name-suffix: "coverage"
os: ubuntu-latest
python-version: 3.8
python-version: 3.9
- name-suffix: "basic"
os: ubuntu-latest
python-version: 3.9
python-version: "3.10"
- name-suffix: "basic"
os: ubuntu-latest
python-version: 3.11
- name-suffix: "basic"
os: windows-latest
python-version: 3.8
python-version: 3.9

steps:
- name: Checkout repo
Expand Down Expand Up @@ -71,7 +74,7 @@ jobs:
python -m pytest --runslow --disable-warnings --color=yes -v
- name: Run tests, coverage and send to coveralls
if: runner.os == 'Linux' && matrix.python-version == 3.8 && matrix.name-suffix == 'coverage'
if: runner.os == 'Linux' && matrix.python-version == 3.9 && matrix.name-suffix == 'coverage'
run: |
pip install pytest pytest-notebook coveralls
coverage run --source=edisgo -m pytest --runslow --runonlinux --disable-warnings --color=yes -v
Expand Down
3 changes: 1 addition & 2 deletions doc/dev_notes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ Installation using Linux
~~~~~~~~~~~~~~~~~~~~~~~~

To set up a source installation using linux simply use a virtual environment and install
the source code with pip. Make sure to use python3.7 or higher (recommended
python3.8). **After** setting up your virtual environment and activating it run the
the source code with pip. Make sure to use python3.9 or higher. **After** setting up your virtual environment and activating it run the
following commands within your eDisGo directory:

.. code-block:: bash
Expand Down
2 changes: 1 addition & 1 deletion doc/quickstart.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Getting started
================

.. warning:: Make sure to use python 3.8 or higher!
.. warning:: Make sure to use python 3.9 or higher!

Installation using Linux
-------------------------
Expand Down
5 changes: 3 additions & 2 deletions eDisGo_env.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ channels:
- conda-forge
- defaults
dependencies:
- python >= 3.8, < 3.10
- python >= 3.9, <= 3.11
- pip
- pandas >= 1.4, < 2.2.0
- conda-forge::fiona
Expand All @@ -16,6 +16,7 @@ dependencies:
- conda-forge::pygeos
- conda-forge::contextily
- conda-forge::descartes
- conda-forge::pypsa >= 0.17.0, <= 0.20.1
- conda-forge::pypsa == 0.26.2
- conda-forge::scikit-learn < 1.3.0
- pip:
- eDisGo
5 changes: 3 additions & 2 deletions eDisGo_env_dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ channels:
- conda-forge
- defaults
dependencies:
- python >= 3.8, < 3.10
- python >= 3.9, <= 3.11
- pip
- pandas >= 1.4, < 2.2.0
- conda-forge::fiona
Expand All @@ -16,6 +16,7 @@ dependencies:
- conda-forge::pygeos
- conda-forge::contextily
- conda-forge::descartes
- conda-forge::pypsa >= 0.17.0, <= 0.20.1
- conda-forge::pypsa == 0.26.2
- conda-forge::scikit-learn < 1.3.0
- pip:
- -e .[dev]
2 changes: 1 addition & 1 deletion edisgo/network/topology.py
Original file line number Diff line number Diff line change
Expand Up @@ -2123,7 +2123,7 @@ def _choose_random_substation_id():
"""
if comp_type == "generator":
random.seed(a=comp_data["generator_id"])
random.seed(a=int(comp_data["generator_id"]))
elif comp_type == "storage_unit":
random.seed(a=len(self.storage_units_df))
else:
Expand Down
7 changes: 3 additions & 4 deletions rtd_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
dash < 2.9.0
demandlib
demandlib < 0.2.0
egoio >= 0.4.7
geopy >= 2.0.0
jupyter_dash
Expand All @@ -8,13 +8,12 @@ multiprocess
networkx >= 2.5.0
pandas >= 1.4.0
plotly
pyomo >= 6.0
pypower
pyproj >= 3.0.0
pypsa >=0.17.0, <=0.20.1
pypsa == 0.26.2
pyyaml
saio
scikit-learn
scikit-learn < 1.3.0
sphinx
sphinx_rtd_theme >=0.5.2
sphinx-autodoc-typehints
Expand Down
6 changes: 3 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

from setuptools import find_packages, setup

if sys.version_info[:2] < (3, 8):
if sys.version_info[:2] < (3, 9):
error = (
"eDisGo requires Python 3.8 or later (%d.%d detected)." % sys.version_info[:2]
"eDisGo requires Python 3.9 or later (%d.%d detected)." % sys.version_info[:2]
)
sys.stderr.write(error + "\n")
sys.exit(1)
Expand Down Expand Up @@ -55,7 +55,7 @@ def read(fname):
"pypsa == 0.26.2",
"pyyaml",
"saio",
"scikit-learn <= 1.1.1",
"scikit-learn < 1.3.0",
"shapely >= 1.7.0",
"sqlalchemy < 1.4.0",
"sshtunnel",
Expand Down

0 comments on commit 91583ed

Please sign in to comment.