Skip to content

Commit

Permalink
Merge pull request #199 from PowerGridModel/feature/fix-conda-build
Browse files Browse the repository at this point in the history
bump python 3.12
  • Loading branch information
petersalemink95 authored Oct 9, 2023
2 parents 085bd91 + a678a66 commit eca9024
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 11 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build-test-and-sonar.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python: ["3.8", "3.9", "3.10", "3.11"]
python: ["3.8", "3.9", "3.10", "3.11", "3.12"]
fail-fast: false
runs-on: ${{ matrix.os }}

Expand Down Expand Up @@ -120,7 +120,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python: ["3.8", "3.9", "3.10", "3.11"]
python: ["3.8", "3.9", "3.10", "3.11", "3.12"]
fail-fast: false
runs-on: ${{ matrix.os }}

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check-code-quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.9
python-version: 3.11

- name: Upgrade pip
run: pip install --upgrade pip
Expand Down
14 changes: 10 additions & 4 deletions docs/examples/arrow_example.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,13 @@
"\n",
"It is by no means intended to provide complete documentation on the topic, but only to show how such conversions could be done.\n",
"\n",
"In particular, this example restricts itself to PyArrow Tables, but for more advanced cases, RecordBatches obviously are a better solution."
"In particular, this example restricts itself to PyArrow Tables, but for more advanced cases, RecordBatches obviously are a better solution.\n",
"\n",
"**NOTE:** To run this example, the optional `examples` dependencies are required:\n",
"\n",
"```sh\n",
"pip install .[examples]\n",
"```"
]
},
{
Expand Down Expand Up @@ -688,9 +694,9 @@
"u_pu_a: [[1.0003248257977395,1.0028803762176168,1.004114300817404]]\n",
"u_pu_b: [[1.000324376948685,1.0028710993140397,1.0041033583077168]]\n",
"u_pu_c: [[1.00032436416241,1.002873078902152,1.0041004935738533]]\n",
"u_a: [[6064.146978239601,6079.639179329461,6087.119449677853]]\n",
"u_b: [[6064.144257236814,6079.582941090297,6087.053114238261]]\n",
"u_c: [[6064.144179724142,6079.594941705457,6087.035747712154]]\n",
"u_a: [[6064.146978239599,6079.639179329459,6087.119449677851]]\n",
"u_b: [[6064.144257236812,6079.582941090295,6087.053114238259]]\n",
"u_c: [[6064.1441797241405,6079.594941705455,6087.035747712152]]\n",
"u_angle_a: [[-0.00006651848125692708,-0.0029298831864833634,-0.004337685507209539]]\n",
"u_angle_b: [[-2.0944615736658134,-2.0973219974462594,-2.098732840554144]]\n",
"..."
Expand Down
8 changes: 7 additions & 1 deletion docs/examples/pandapower_example.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,13 @@
"# PandaPower conversion\n",
"\n",
"This example illustrates conversion from PandaPower to power-grid-model input data. \n",
"We can then calculate power-flow with it or convert to a different formats like PGM JSON."
"We can then calculate power-flow with it or convert to a different formats like PGM JSON.\n",
"\n",
"**NOTE:** To run this example, the optional `examples` dependencies are required:\n",
"\n",
"```sh\n",
"pip install .[examples]\n",
"```"
]
},
{
Expand Down
5 changes: 4 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,15 @@ dynamic = ["version"]
dev = [
"pandapower>2.11.1",
"pre-commit",
"pyarrow",
"pylint",
"pytest",
"pytest-cov",
"pydantic", # Used in unit tests
]
examples = [
"pandapower>2.11.1",
"pyarrow", # Pyarrow support for Python 3.12 scheduled for 14.0.0: https://github.com/apache/arrow/issues/37880
]
doc = [
"sphinx",
"myst-nb",
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/converters/test_base_converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def converter():


def test_abstract_methods():
with pytest.raises(TypeError, match=r"with abstract methods _parse_data, _serialize_data"):
with pytest.raises(TypeError, match=r"abstract methods .*_parse_data.* .*_serialize_data.*"):
BaseConverter()


Expand Down
2 changes: 1 addition & 1 deletion tests/unit/data_stores/test_base_data_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@


def test_abstract_methods():
with pytest.raises(TypeError, match=r"with abstract methods load, save"):
with pytest.raises(TypeError, match=r"abstract methods .*load.* .*save.*"):
BaseDataStore()

0 comments on commit eca9024

Please sign in to comment.