Skip to content

Commit d05dede

Browse files
authored
Merge pull request #77 from BDonnot/bd-dev
Ready for version 0.8.0
2 parents b735f37 + cdba82a commit d05dede

File tree

177 files changed

+7924
-2734
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

177 files changed

+7924
-2734
lines changed

.circleci/config.yml

Lines changed: 119 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ orbs:
55

66

77
executors:
8+
gcc_13:
9+
docker:
10+
- image: gcc:13
811
gcc_12:
912
docker:
1013
- image: gcc:12
@@ -20,6 +23,18 @@ executors:
2023
gcc_8:
2124
docker:
2225
- image: gcc:8
26+
# clang18:
27+
# docker:
28+
# - image: silkeh/clang:18
29+
clang17:
30+
docker:
31+
- image: silkeh/clang:17
32+
clang16:
33+
docker:
34+
- image: silkeh/clang:16
35+
clang15:
36+
docker:
37+
- image: silkeh/clang:15
2338
clang14:
2439
docker:
2540
- image: silkeh/clang:14
@@ -40,17 +55,36 @@ executors:
4055
- image: silkeh/clang:9 # no c++ 11, does not work
4156

4257
jobs:
58+
compile_gcc12:
59+
executor: gcc_12
60+
resource_class: small
61+
steps:
62+
- checkout
63+
- run: apt-get update && apt-get install python3-full python3-dev python3-pip python3-virtualenv git -y
64+
- run: python3 -m virtualenv venv_test
65+
- run:
66+
command: |
67+
source venv_test/bin/activate
68+
pip install --upgrade pip setuptools wheel
69+
pip install -U grid2op
70+
pip install -U pybind11
71+
git submodule init
72+
git submodule update
73+
make
74+
CC=gcc python setup.py build
75+
python -m pip install -U .
4376
compile_gcc11:
4477
executor: gcc_11
4578
resource_class: small
4679
steps:
4780
- checkout
48-
- run: apt-get update && apt-get install python3-pip -y
81+
- run: apt-get update && apt-get install python3-pip python3-full -y
4982
- run: python3 -m pip install virtualenv
5083
- run: python3 -m virtualenv venv_test
5184
- run:
5285
command: |
5386
source venv_test/bin/activate
87+
pip install --upgrade pip setuptools wheel
5488
pip install -U grid2op
5589
pip install -U pybind11
5690
git submodule init
@@ -63,12 +97,13 @@ jobs:
6397
resource_class: small
6498
steps:
6599
- checkout
66-
- run: apt-get update && apt-get install python3-pip -y
100+
- run: apt-get update && apt-get install python3-pip python3-full -y
67101
- run: python3 -m pip install virtualenv
68102
- run: python3 -m virtualenv venv_test
69103
- run:
70104
command: |
71105
source venv_test/bin/activate
106+
pip install --upgrade pip setuptools wheel
72107
pip install -U grid2op
73108
pip install -U pybind11
74109
git submodule init
@@ -81,12 +116,13 @@ jobs:
81116
resource_class: small
82117
steps:
83118
- checkout
84-
- run: apt-get update && apt-get install python3-pip -y
119+
- run: apt-get update && apt-get install python3-pip python3-full -y
85120
- run: python3 -m pip install virtualenv
86121
- run: python3 -m virtualenv venv_test
87122
- run:
88123
command: |
89124
source venv_test/bin/activate
125+
pip install --upgrade pip setuptools wheel
90126
pip install -U grid2op
91127
pip install -U pybind11
92128
git submodule init
@@ -105,25 +141,27 @@ jobs:
105141
- run:
106142
command: |
107143
source venv_test/bin/activate
144+
pip install --upgrade pip setuptools wheel
108145
pip install -U grid2op
109146
pip install -U pybind11
110147
git submodule init
111148
git submodule update
112149
make
113150
CC=gcc python setup.py build
114151
python -m pip install -U .
115-
compile_gcc12:
116-
executor: gcc_12
152+
compile_gcc13:
153+
executor: gcc_13
117154
resource_class: small
118155
steps:
119156
- checkout
120-
- run: apt-get update && apt-get install python3-pip python3-virtualenv -y
157+
- run: apt-get update && apt-get install python3-full python3-dev python3-pip python3-virtualenv git -y
121158
# - run: python3 -m pip install virtualenv
122159
- run: python3 -m virtualenv venv_test
123160
- run:
124161
name: "Install grid2op from source"
125162
command: |
126163
source venv_test/bin/activate
164+
pip install --upgrade pip setuptools wheel
127165
git clone https://github.com/rte-france/grid2op.git _grid2op
128166
pip install -e _grid2op
129167
- run:
@@ -147,12 +185,13 @@ jobs:
147185
resource_class: small
148186
steps:
149187
- checkout
150-
- run: apt-get update && apt-get install python3-pip -y
188+
- run: apt-get update && apt-get install python3-pip python3-full git -y
151189
- run: python3 -m pip install virtualenv
152190
- run: python3 -m virtualenv venv_test
153191
- run:
154192
command: |
155193
source venv_test/bin/activate
194+
pip install --upgrade pip setuptools wheel
156195
pip install -U pybind11
157196
git submodule init
158197
git submodule update
@@ -164,7 +203,7 @@ jobs:
164203
resource_class: small
165204
steps:
166205
- checkout
167-
- run: apt-get update && apt-get install python3-pip git -y
206+
- run: apt-get update && apt-get install python3-pip python3-full git -y
168207
- run:
169208
command: |
170209
git submodule init
@@ -175,6 +214,7 @@ jobs:
175214
- run:
176215
command: |
177216
source venv_test/bin/activate
217+
pip install --upgrade pip setuptools wheel
178218
pip install -U pybind11
179219
CC=clang python setup.py build
180220
python -m pip install .
@@ -183,12 +223,13 @@ jobs:
183223
resource_class: small
184224
steps:
185225
- checkout
186-
- run: apt-get update && apt-get install python3-pip git -y
226+
- run: apt-get update && apt-get install python3-pip python3-full git -y
187227
- run: python3 -m pip install virtualenv
188228
- run: python3 -m virtualenv venv_test
189229
- run:
190230
command: |
191231
source venv_test/bin/activate
232+
pip install --upgrade pip setuptools wheel
192233
pip install -U grid2op
193234
pip install -U pybind11
194235
git submodule init
@@ -201,12 +242,13 @@ jobs:
201242
resource_class: small
202243
steps:
203244
- checkout
204-
- run: apt-get update && apt-get install python3-pip git -y
245+
- run: apt-get update && apt-get install python3-pip python3-full git -y
205246
- run: python3 -m pip install virtualenv
206247
- run: python3 -m virtualenv venv_test
207248
- run:
208249
command: |
209250
source venv_test/bin/activate
251+
pip install --upgrade pip setuptools wheel
210252
pip install -U grid2op
211253
pip install -U pybind11
212254
git submodule init
@@ -219,12 +261,13 @@ jobs:
219261
resource_class: small
220262
steps:
221263
- checkout
222-
- run: apt-get update && apt-get install python3-pip git -y
264+
- run: apt-get update && apt-get install python3-pip python3-full git -y
223265
- run: python3 -m pip install virtualenv
224266
- run: python3 -m virtualenv venv_test
225267
- run:
226268
command: |
227269
source venv_test/bin/activate
270+
pip install --upgrade pip setuptools wheel
228271
pip install -U grid2op
229272
pip install -U pybind11
230273
git submodule init
@@ -237,13 +280,69 @@ jobs:
237280
resource_class: small
238281
steps:
239282
- checkout
240-
- run: apt-get update && apt-get install python3-pip git -y
283+
- run: apt-get update && apt-get install python3-pip python3-full git -y
284+
- run: python3 -m pip install virtualenv
285+
- run: python3 -m virtualenv venv_test
286+
- run:
287+
command: |
288+
source venv_test/bin/activate
289+
pip install --upgrade pip setuptools wheel
290+
pip install -U grid2op
291+
pip install -U pybind11
292+
git submodule init
293+
git submodule update
294+
make
295+
CC=clang python setup.py build
296+
CC=clang python -m pip install -U .
297+
compile_clang15:
298+
executor: clang15
299+
resource_class: small
300+
steps:
301+
- checkout
302+
- run: apt-get update && apt-get install python3-pip python3-full git -y
241303
- run: python3 -m pip install virtualenv
242304
- run: python3 -m virtualenv venv_test
305+
- run:
306+
command: |
307+
source venv_test/bin/activate
308+
pip install --upgrade pip setuptools wheel
309+
pip install -U grid2op
310+
pip install -U pybind11
311+
git submodule init
312+
git submodule update
313+
make
314+
CC=clang python setup.py build
315+
CC=clang python -m pip install -U .
316+
compile_clang16:
317+
executor: clang16
318+
resource_class: small
319+
steps:
320+
- checkout
321+
- run: apt-get update && apt-get install python3-full python3-dev python3-pip python3-virtualenv git -y
322+
- run: python3 -m virtualenv venv_test
323+
- run:
324+
command: |
325+
source venv_test/bin/activate
326+
pip install --upgrade pip setuptools wheel
327+
pip install -U grid2op
328+
pip install -U pybind11
329+
git submodule init
330+
git submodule update
331+
make
332+
CC=clang python setup.py build
333+
CC=clang python -m pip install -U .
334+
compile_clang17:
335+
executor: clang17
336+
resource_class: small
337+
steps:
338+
- checkout
339+
- run: apt-get update && apt-get install python3-full python3-dev python3-pip python3-virtualenv git -y
340+
- run: python3 -m virtualenv venv_test
243341
- run:
244342
name: "Install grid2op from source"
245343
command: |
246344
source venv_test/bin/activate
345+
pip install --upgrade pip setuptools wheel
247346
git clone https://github.com/rte-france/grid2op.git _grid2op
248347
pip install -e _grid2op
249348
- run:
@@ -301,17 +400,20 @@ jobs:
301400
cd lightsim2grid\tests
302401
python -m unittest discover -v
303402
304-
305403
workflows:
306404
version: 2.1
307405
compile:
308406
jobs:
309407
- compile_gcc8
310-
- compile_gcc10
311-
- compile_gcc11
408+
# - compile_gcc10
409+
# - compile_gcc11
312410
- compile_gcc12
411+
- compile_gcc13
313412
# - compile_clang10 # does not work I don't know why, too lazy to check
314413
- compile_clang11
315-
- compile_clang13
316-
- compile_clang14
414+
# - compile_clang13
415+
# - compile_clang14
416+
# - compile_clang15
417+
- compile_clang16
418+
- compile_clang17
317419
- compile_windows

.github/workflows/main.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,12 +195,16 @@ jobs:
195195

196196
- name: Check package can be imported
197197
run: |
198+
mkdir tmp_for_import_checking
199+
cd tmp_for_import_checking
198200
python -c "import lightsim2grid"
199201
python -c "from lightsim2grid import *"
200202
python -c "from lightsim2grid.newtonpf import newtonpf"
203+
cd ..
201204
202205
- name: Check LightSimBackend can be imported
203206
run: |
207+
cd tmp_for_import_checking
204208
python -m pip install grid2op
205209
python -c "from lightsim2grid import LightSimBackend"
206210
python -c "from lightsim2grid import LightSimBackend; import grid2op; env = grid2op.make('l2rpn_case14_sandbox', test=True, backend=LightSimBackend())"
@@ -253,16 +257,20 @@ jobs:
253257

254258
- name: Check package can be imported
255259
run: |
260+
mkdir tmp_for_import_checking
261+
cd tmp_for_import_checking
256262
python -c "import lightsim2grid"
257263
python -c "from lightsim2grid import *"
258264
python -c "from lightsim2grid.newtonpf import newtonpf"
265+
cd ..
259266
260267
- name: Check LightSimBackend can be imported
261268
run: |
269+
cd tmp_for_import_checking
262270
python -m pip install grid2op
263271
python -c "from lightsim2grid import LightSimBackend"
264272
python -c "from lightsim2grid import LightSimBackend; import grid2op; env = grid2op.make('l2rpn_case14_sandbox', test=True, backend=LightSimBackend())"
265-
273+
266274
- name: Upload wheel
267275
uses: actions/upload-artifact@v3
268276
with:

.gitignore

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,3 +269,14 @@ test_issue_58.py
269269
test_issue_58_old.py
270270
lightsim2grid/gridmodel/pypowsybl.ipynb
271271
lightsim2grid/tests/test.mat
272+
output_test.txt
273+
req_test.txt
274+
test.txt
275+
test_output.txt
276+
test_pypower_fdpf.py
277+
lightsim2grid/tests/_grid2op_for_test/
278+
bug_sparselu
279+
bug_sparselu_eigen.cpp
280+
test_segfault.sh
281+
nohup.out
282+
test_rte/

0 commit comments

Comments
 (0)