Skip to content

Commit

Permalink
Merge pull request #77 from BDonnot/bd-dev
Browse files Browse the repository at this point in the history
Ready for version 0.8.0
  • Loading branch information
BDonnot authored Mar 18, 2024
2 parents b735f37 + cdba82a commit d05dede
Show file tree
Hide file tree
Showing 177 changed files with 7,924 additions and 2,734 deletions.
136 changes: 119 additions & 17 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ orbs:


executors:
gcc_13:
docker:
- image: gcc:13
gcc_12:
docker:
- image: gcc:12
Expand All @@ -20,6 +23,18 @@ executors:
gcc_8:
docker:
- image: gcc:8
# clang18:
# docker:
# - image: silkeh/clang:18
clang17:
docker:
- image: silkeh/clang:17
clang16:
docker:
- image: silkeh/clang:16
clang15:
docker:
- image: silkeh/clang:15
clang14:
docker:
- image: silkeh/clang:14
Expand All @@ -40,17 +55,36 @@ executors:
- image: silkeh/clang:9 # no c++ 11, does not work

jobs:
compile_gcc12:
executor: gcc_12
resource_class: small
steps:
- checkout
- run: apt-get update && apt-get install python3-full python3-dev python3-pip python3-virtualenv git -y
- run: python3 -m virtualenv venv_test
- run:
command: |
source venv_test/bin/activate
pip install --upgrade pip setuptools wheel
pip install -U grid2op
pip install -U pybind11
git submodule init
git submodule update
make
CC=gcc python setup.py build
python -m pip install -U .
compile_gcc11:
executor: gcc_11
resource_class: small
steps:
- checkout
- run: apt-get update && apt-get install python3-pip -y
- run: apt-get update && apt-get install python3-pip python3-full -y
- run: python3 -m pip install virtualenv
- run: python3 -m virtualenv venv_test
- run:
command: |
source venv_test/bin/activate
pip install --upgrade pip setuptools wheel
pip install -U grid2op
pip install -U pybind11
git submodule init
Expand All @@ -63,12 +97,13 @@ jobs:
resource_class: small
steps:
- checkout
- run: apt-get update && apt-get install python3-pip -y
- run: apt-get update && apt-get install python3-pip python3-full -y
- run: python3 -m pip install virtualenv
- run: python3 -m virtualenv venv_test
- run:
command: |
source venv_test/bin/activate
pip install --upgrade pip setuptools wheel
pip install -U grid2op
pip install -U pybind11
git submodule init
Expand All @@ -81,12 +116,13 @@ jobs:
resource_class: small
steps:
- checkout
- run: apt-get update && apt-get install python3-pip -y
- run: apt-get update && apt-get install python3-pip python3-full -y
- run: python3 -m pip install virtualenv
- run: python3 -m virtualenv venv_test
- run:
command: |
source venv_test/bin/activate
pip install --upgrade pip setuptools wheel
pip install -U grid2op
pip install -U pybind11
git submodule init
Expand All @@ -105,25 +141,27 @@ jobs:
- run:
command: |
source venv_test/bin/activate
pip install --upgrade pip setuptools wheel
pip install -U grid2op
pip install -U pybind11
git submodule init
git submodule update
make
CC=gcc python setup.py build
python -m pip install -U .
compile_gcc12:
executor: gcc_12
compile_gcc13:
executor: gcc_13
resource_class: small
steps:
- checkout
- run: apt-get update && apt-get install python3-pip python3-virtualenv -y
- run: apt-get update && apt-get install python3-full python3-dev python3-pip python3-virtualenv git -y
# - run: python3 -m pip install virtualenv
- run: python3 -m virtualenv venv_test
- run:
name: "Install grid2op from source"
command: |
source venv_test/bin/activate
pip install --upgrade pip setuptools wheel
git clone https://github.com/rte-france/grid2op.git _grid2op
pip install -e _grid2op
- run:
Expand All @@ -147,12 +185,13 @@ jobs:
resource_class: small
steps:
- checkout
- run: apt-get update && apt-get install python3-pip -y
- run: apt-get update && apt-get install python3-pip python3-full git -y
- run: python3 -m pip install virtualenv
- run: python3 -m virtualenv venv_test
- run:
command: |
source venv_test/bin/activate
pip install --upgrade pip setuptools wheel
pip install -U pybind11
git submodule init
git submodule update
Expand All @@ -164,7 +203,7 @@ jobs:
resource_class: small
steps:
- checkout
- run: apt-get update && apt-get install python3-pip git -y
- run: apt-get update && apt-get install python3-pip python3-full git -y
- run:
command: |
git submodule init
Expand All @@ -175,6 +214,7 @@ jobs:
- run:
command: |
source venv_test/bin/activate
pip install --upgrade pip setuptools wheel
pip install -U pybind11
CC=clang python setup.py build
python -m pip install .
Expand All @@ -183,12 +223,13 @@ jobs:
resource_class: small
steps:
- checkout
- run: apt-get update && apt-get install python3-pip git -y
- run: apt-get update && apt-get install python3-pip python3-full git -y
- run: python3 -m pip install virtualenv
- run: python3 -m virtualenv venv_test
- run:
command: |
source venv_test/bin/activate
pip install --upgrade pip setuptools wheel
pip install -U grid2op
pip install -U pybind11
git submodule init
Expand All @@ -201,12 +242,13 @@ jobs:
resource_class: small
steps:
- checkout
- run: apt-get update && apt-get install python3-pip git -y
- run: apt-get update && apt-get install python3-pip python3-full git -y
- run: python3 -m pip install virtualenv
- run: python3 -m virtualenv venv_test
- run:
command: |
source venv_test/bin/activate
pip install --upgrade pip setuptools wheel
pip install -U grid2op
pip install -U pybind11
git submodule init
Expand All @@ -219,12 +261,13 @@ jobs:
resource_class: small
steps:
- checkout
- run: apt-get update && apt-get install python3-pip git -y
- run: apt-get update && apt-get install python3-pip python3-full git -y
- run: python3 -m pip install virtualenv
- run: python3 -m virtualenv venv_test
- run:
command: |
source venv_test/bin/activate
pip install --upgrade pip setuptools wheel
pip install -U grid2op
pip install -U pybind11
git submodule init
Expand All @@ -237,13 +280,69 @@ jobs:
resource_class: small
steps:
- checkout
- run: apt-get update && apt-get install python3-pip git -y
- run: apt-get update && apt-get install python3-pip python3-full git -y
- run: python3 -m pip install virtualenv
- run: python3 -m virtualenv venv_test
- run:
command: |
source venv_test/bin/activate
pip install --upgrade pip setuptools wheel
pip install -U grid2op
pip install -U pybind11
git submodule init
git submodule update
make
CC=clang python setup.py build
CC=clang python -m pip install -U .
compile_clang15:
executor: clang15
resource_class: small
steps:
- checkout
- run: apt-get update && apt-get install python3-pip python3-full git -y
- run: python3 -m pip install virtualenv
- run: python3 -m virtualenv venv_test
- run:
command: |
source venv_test/bin/activate
pip install --upgrade pip setuptools wheel
pip install -U grid2op
pip install -U pybind11
git submodule init
git submodule update
make
CC=clang python setup.py build
CC=clang python -m pip install -U .
compile_clang16:
executor: clang16
resource_class: small
steps:
- checkout
- run: apt-get update && apt-get install python3-full python3-dev python3-pip python3-virtualenv git -y
- run: python3 -m virtualenv venv_test
- run:
command: |
source venv_test/bin/activate
pip install --upgrade pip setuptools wheel
pip install -U grid2op
pip install -U pybind11
git submodule init
git submodule update
make
CC=clang python setup.py build
CC=clang python -m pip install -U .
compile_clang17:
executor: clang17
resource_class: small
steps:
- checkout
- run: apt-get update && apt-get install python3-full python3-dev python3-pip python3-virtualenv git -y
- run: python3 -m virtualenv venv_test
- run:
name: "Install grid2op from source"
command: |
source venv_test/bin/activate
pip install --upgrade pip setuptools wheel
git clone https://github.com/rte-france/grid2op.git _grid2op
pip install -e _grid2op
- run:
Expand Down Expand Up @@ -301,17 +400,20 @@ jobs:
cd lightsim2grid\tests
python -m unittest discover -v
workflows:
version: 2.1
compile:
jobs:
- compile_gcc8
- compile_gcc10
- compile_gcc11
# - compile_gcc10
# - compile_gcc11
- compile_gcc12
- compile_gcc13
# - compile_clang10 # does not work I don't know why, too lazy to check
- compile_clang11
- compile_clang13
- compile_clang14
# - compile_clang13
# - compile_clang14
# - compile_clang15
- compile_clang16
- compile_clang17
- compile_windows
10 changes: 9 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -195,12 +195,16 @@ jobs:

- name: Check package can be imported
run: |
mkdir tmp_for_import_checking
cd tmp_for_import_checking
python -c "import lightsim2grid"
python -c "from lightsim2grid import *"
python -c "from lightsim2grid.newtonpf import newtonpf"
cd ..
- name: Check LightSimBackend can be imported
run: |
cd tmp_for_import_checking
python -m pip install grid2op
python -c "from lightsim2grid import LightSimBackend"
python -c "from lightsim2grid import LightSimBackend; import grid2op; env = grid2op.make('l2rpn_case14_sandbox', test=True, backend=LightSimBackend())"
Expand Down Expand Up @@ -253,16 +257,20 @@ jobs:

- name: Check package can be imported
run: |
mkdir tmp_for_import_checking
cd tmp_for_import_checking
python -c "import lightsim2grid"
python -c "from lightsim2grid import *"
python -c "from lightsim2grid.newtonpf import newtonpf"
cd ..
- name: Check LightSimBackend can be imported
run: |
cd tmp_for_import_checking
python -m pip install grid2op
python -c "from lightsim2grid import LightSimBackend"
python -c "from lightsim2grid import LightSimBackend; import grid2op; env = grid2op.make('l2rpn_case14_sandbox', test=True, backend=LightSimBackend())"
- name: Upload wheel
uses: actions/upload-artifact@v3
with:
Expand Down
11 changes: 11 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -269,3 +269,14 @@ test_issue_58.py
test_issue_58_old.py
lightsim2grid/gridmodel/pypowsybl.ipynb
lightsim2grid/tests/test.mat
output_test.txt
req_test.txt
test.txt
test_output.txt
test_pypower_fdpf.py
lightsim2grid/tests/_grid2op_for_test/
bug_sparselu
bug_sparselu_eigen.cpp
test_segfault.sh
nohup.out
test_rte/
Loading

0 comments on commit d05dede

Please sign in to comment.