Skip to content

Commit

Permalink
improve python3.11 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
joda9 committed Jul 16, 2024
1 parent 6228966 commit 10026fc
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 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
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
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def read(fname):
"pypsa",
"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 10026fc

Please sign in to comment.