From a511bc411b2fbe5b0415fe5ec9d543ef072c8330 Mon Sep 17 00:00:00 2001 From: Leclerc Clement Date: Mon, 23 Sep 2024 16:39:54 +0200 Subject: [PATCH 001/120] Snapshot CI Signed-off-by: Leclerc Clement --- .github/workflows/dependencies-ci.yml | 151 ++++++++++++++++++++++++++ README.md | 2 +- 2 files changed, 152 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/dependencies-ci.yml diff --git a/.github/workflows/dependencies-ci.yml b/.github/workflows/dependencies-ci.yml new file mode 100644 index 000000000..df0290dcb --- /dev/null +++ b/.github/workflows/dependencies-ci.yml @@ -0,0 +1,151 @@ +name: Update Dependency + +on: + schedule: + - cron: '0 0 */2 * *' # Exécute tous les deux jours à minuit + workflow_dispatch: # Permet l'exécution manuelle + +jobs: + build_dependencies: + name: Build OS ${{ matrix.os }} + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest, windows-latest, macos-latest] + + + steps: + + #SETUP JDK + - name: Set up JDK 17 + - uses: actions/setup-java@v4 + with: + distribution: 'temurin' + java-version: '17' + + #SETUP PYTHON + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: '3.8' + + - name: Install Python dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt + + #SETUP GRAALVM + - name: Setup GraalVM + uses: graalvm/setup-graalvm@v1.1.5 + with: + java-version: '17' + distribution: 'graalvm' + github-token: ${{ secrets.GITHUB_TOKEN }} + + #CHECK_DEPENCIES_VERSION + - name: Checkout powsybl-depencies + uses: actions/checkout@v4 + with: + repository: powsybl-dependencies + ref: main + - name: create versions file + run : touch version.txt + + #BUILD CORE + - name: Checkout core-sources + uses: actions/checkout@v4 + with: + repository: powsybl/powsybl-core + ref: main + - name: Build with Maven + run: | + mvn --batch-mode clean install + echo "powsybl-core.version=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> ../version.txt + + #BUILD LOADFLOW + - name: Checkout loadflow-sources + uses: actions/checkout@v4 + with: + repository: powsybl/powsybl-open-loadflow + ref: main + - name: Build with Maven + run: | + mvn --batch-mode clean install + echo "powsybl-open-loadflow.version=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> ../version.txt + + #BUILD DIAGRAM + - name: Checkout diagram-sources + uses: actions/checkout@v4 + with: + repository: powsybl/powsybl-diagram + ref: main + - name: Build with Maven + run: | + mvn --batch-mode clean install + echo "powsybl-diagram.versio=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> ../version.txt + + + #BUILD ENTSOE + - name: Checkout entsoe-sources + uses: actions/checkout@v4 + with: + repository: powsybl/powsybl-entsoe + ref: main + - name: Build with Maven + run: | + mvn clean --batch-mode clean install + echo "powsybl-entsoe.version=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> ../version.txt + + + #BUILD DYNAWO + - name: Checkout dynawo-sources + uses: actions/checkout@v4 + with: + repository: powsybl/powsybl-dynawo + ref: main + - name: Build with Maven + run: | + mvn --batch-mode clean install + echo "powsybl-dynawo.version=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> ../version.txt + + + #BUILD PYPOWSYBL + - name: Checkout pypowsybl-sources + uses: actions/checkout@v4 + with: + repository: powsybl/pypowsybl + ref: main + - name: Install and build + run: | + pip install --upgrade setuptools pip + pip install -r requirements.txt + pip install . + - name: Run test + run: pytest tests + + + #UPDATE VERSION DEPENDCIES + - name: Update powsybl-dependencies + run: | + cd powsybl-dependencies + if [ ! -s ../versions.txt ]; then + echo "Error: versions.txt is empty or does not exist" + exit 1 + fi + + # Backup original pom.xml + cp pom.xml pom.xml.bak + + # Update version + while IFS= read -r line; do + key=$(echo $line | cut -d'=' -f1) + value=$(echo $line | cut -d'=' -f2) + sed -i "s/^$key.version=.*/$key.version=$value/" pom.xml + done < ../versions.txt + + # Check if any changes were made + if diff -q pom.xml pom.xml.bak > /dev/null; then + echo "No changes were made to pom.xml" + else + echo "pom.xml has been updated" + fi \ No newline at end of file diff --git a/README.md b/README.md index 58baeac31..c0e391a79 100644 --- a/README.md +++ b/README.md @@ -107,7 +107,7 @@ mode of installation: ```bash pip install -e . -# or, to build the C extension with debug symbols: +# or, to build the C extension with debug $JAVAsymbols: python setup.py build --debug develop --user ``` From 1802c4af1469cec1f78fd924f5e86f7dce78d11c Mon Sep 17 00:00:00 2001 From: Leclerc Clement Date: Mon, 23 Sep 2024 17:12:39 +0200 Subject: [PATCH 002/120] Snapshot CI Signed-off-by: Leclerc Clement --- .github/workflows/dependencies-ci.yml | 54 ++++++++++++++------------- .github/workflows/dev-ci.yml | 15 +++++--- 2 files changed, 38 insertions(+), 31 deletions(-) diff --git a/.github/workflows/dependencies-ci.yml b/.github/workflows/dependencies-ci.yml index df0290dcb..607f81349 100644 --- a/.github/workflows/dependencies-ci.yml +++ b/.github/workflows/dependencies-ci.yml @@ -1,9 +1,11 @@ -name: Update Dependency +name: Snapshot ci on: - schedule: - - cron: '0 0 */2 * *' # Exécute tous les deux jours à minuit - workflow_dispatch: # Permet l'exécution manuelle + push: + branches: + # on all branches except main where full build will be run + - '*' + - '!main' jobs: build_dependencies: @@ -11,14 +13,13 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-latest, windows-latest, macos-latest] + os: [ubuntu-latest] steps: - #SETUP JDK - name: Set up JDK 17 - - uses: actions/setup-java@v4 + uses: actions/setup-java@v4 with: distribution: 'temurin' java-version: '17' @@ -49,7 +50,7 @@ jobs: repository: powsybl-dependencies ref: main - name: create versions file - run : touch version.txt + run : touch versions.txt #BUILD CORE - name: Checkout core-sources @@ -82,7 +83,7 @@ jobs: - name: Build with Maven run: | mvn --batch-mode clean install - echo "powsybl-diagram.versio=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> ../version.txt + echo "powsybl-diagram.version=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> ../version.txt #BUILD ENTSOE @@ -108,22 +109,6 @@ jobs: mvn --batch-mode clean install echo "powsybl-dynawo.version=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> ../version.txt - - #BUILD PYPOWSYBL - - name: Checkout pypowsybl-sources - uses: actions/checkout@v4 - with: - repository: powsybl/pypowsybl - ref: main - - name: Install and build - run: | - pip install --upgrade setuptools pip - pip install -r requirements.txt - pip install . - - name: Run test - run: pytest tests - - #UPDATE VERSION DEPENDCIES - name: Update powsybl-dependencies run: | @@ -148,4 +133,21 @@ jobs: echo "No changes were made to pom.xml" else echo "pom.xml has been updated" - fi \ No newline at end of file + fi + + + #BUILD PYPOWSYBL + - name: Checkout pypowsybl-sources + uses: actions/checkout@v4 + with: + repository: powsybl/pypowsybl + ref: main + - name: Install and build + run: | + pip install --upgrade setuptools pip + pip install -r requirements.txt + pip install . + - name: Run test + run: pytest tests + + diff --git a/.github/workflows/dev-ci.yml b/.github/workflows/dev-ci.yml index f54338e23..7441d05da 100644 --- a/.github/workflows/dev-ci.yml +++ b/.github/workflows/dev-ci.yml @@ -1,12 +1,17 @@ name: Dev CI -on: - push: - branches: +#on: + # push: + # branches: # on all branches except main where full build will be run - - '*' - - '!main' + # - '*' + # - '!main' + +on: + schedule: + - cron: '0 0 */2 * *' # Exécute tous les deux jours à minuit + workflow_dispatch: # Permet l'exécution manuelle jobs: manylinux_build: name: Build linux ${{ matrix.python.name }} wheel From 04eaea1a4375457315958712b182953a6c5ac2b6 Mon Sep 17 00:00:00 2001 From: Leclerc Clement Date: Mon, 23 Sep 2024 17:21:56 +0200 Subject: [PATCH 003/120] Snapshot CI Signed-off-by: Leclerc Clement --- .github/workflows/dependencies-ci.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/dependencies-ci.yml b/.github/workflows/dependencies-ci.yml index 607f81349..fe049a99a 100644 --- a/.github/workflows/dependencies-ci.yml +++ b/.github/workflows/dependencies-ci.yml @@ -31,9 +31,7 @@ jobs: python-version: '3.8' - name: Install Python dependencies - run: | - python -m pip install --upgrade pip - pip install -r requirements.txt + run: python -m pip install --upgrade pip #SETUP GRAALVM - name: Setup GraalVM From 9c113c6d1a4e2097bac4223b8fecbb01f6f4ff3b Mon Sep 17 00:00:00 2001 From: Leclerc Clement Date: Mon, 23 Sep 2024 17:21:56 +0200 Subject: [PATCH 004/120] Snapshot CI Signed-off-by: Leclerc Clement --- .github/workflows/dependencies-ci.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/dependencies-ci.yml b/.github/workflows/dependencies-ci.yml index 607f81349..4cf557e4d 100644 --- a/.github/workflows/dependencies-ci.yml +++ b/.github/workflows/dependencies-ci.yml @@ -31,9 +31,7 @@ jobs: python-version: '3.8' - name: Install Python dependencies - run: | - python -m pip install --upgrade pip - pip install -r requirements.txt + run: python -m pip install --upgrade pip #SETUP GRAALVM - name: Setup GraalVM @@ -47,7 +45,7 @@ jobs: - name: Checkout powsybl-depencies uses: actions/checkout@v4 with: - repository: powsybl-dependencies + repository: powsybl/powsybl-dependencies ref: main - name: create versions file run : touch versions.txt From fcdb4a54941a4e019e2409b7940e7c5ec9772b8e Mon Sep 17 00:00:00 2001 From: Leclerc Clement Date: Mon, 23 Sep 2024 17:29:39 +0200 Subject: [PATCH 005/120] Snapshot CI Signed-off-by: Leclerc Clement --- .github/workflows/dependencies-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dependencies-ci.yml b/.github/workflows/dependencies-ci.yml index 4cf557e4d..bcb2539f3 100644 --- a/.github/workflows/dependencies-ci.yml +++ b/.github/workflows/dependencies-ci.yml @@ -1,4 +1,4 @@ -name: Snapshot ci +name: Snapshot CI on: push: From 9a25b3313f4769c06b1f5ea8460be2e3e1c6e5e1 Mon Sep 17 00:00:00 2001 From: Leclerc Clement Date: Tue, 24 Sep 2024 09:36:26 +0200 Subject: [PATCH 006/120] Snapshot CI Signed-off-by: Leclerc Clement --- .github/workflows/dependencies-ci.yml | 85 ++++++++++++--------------- 1 file changed, 39 insertions(+), 46 deletions(-) diff --git a/.github/workflows/dependencies-ci.yml b/.github/workflows/dependencies-ci.yml index bcb2539f3..c93116b07 100644 --- a/.github/workflows/dependencies-ci.yml +++ b/.github/workflows/dependencies-ci.yml @@ -1,4 +1,10 @@ name: Snapshot CI +env : + CORE_VERSION : "" + LOADFLOW_VERSION : "" + DIAGRAM_VERSION : "" + ENTSOE_VERSION : "" + DYNAFLOW_VERSION: "" on: push: @@ -15,7 +21,6 @@ jobs: matrix: os: [ubuntu-latest] - steps: #SETUP JDK - name: Set up JDK 17 @@ -41,14 +46,6 @@ jobs: distribution: 'graalvm' github-token: ${{ secrets.GITHUB_TOKEN }} - #CHECK_DEPENCIES_VERSION - - name: Checkout powsybl-depencies - uses: actions/checkout@v4 - with: - repository: powsybl/powsybl-dependencies - ref: main - - name: create versions file - run : touch versions.txt #BUILD CORE - name: Checkout core-sources @@ -57,9 +54,10 @@ jobs: repository: powsybl/powsybl-core ref: main - name: Build with Maven - run: | - mvn --batch-mode clean install - echo "powsybl-core.version=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> ../version.txt + run: mvn --batch-mode clean install -DskipTests + - name : Get core version + run : echo "CORE_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_ENV + #BUILD LOADFLOW - name: Checkout loadflow-sources @@ -69,8 +67,10 @@ jobs: ref: main - name: Build with Maven run: | - mvn --batch-mode clean install - echo "powsybl-open-loadflow.version=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> ../version.txt + mvn --batch-mode clean install -DskipTests + - name: Get loadflow version + run : echo "LOADFLOW_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_ENV + #BUILD DIAGRAM - name: Checkout diagram-sources @@ -80,9 +80,9 @@ jobs: ref: main - name: Build with Maven run: | - mvn --batch-mode clean install - echo "powsybl-diagram.version=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> ../version.txt - + mvn --batch-mode clean install -DskipTests + - name: Get diagram version + run : echo "DIAGRAM_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_ENV #BUILD ENTSOE - name: Checkout entsoe-sources @@ -92,9 +92,9 @@ jobs: ref: main - name: Build with Maven run: | - mvn clean --batch-mode clean install - echo "powsybl-entsoe.version=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> ../version.txt - + mvn clean --batch-mode clean install -DskipTests + - name: Get entsoe version + run : echo "ENTSOE_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_ENV #BUILD DYNAWO - name: Checkout dynawo-sources @@ -104,34 +104,27 @@ jobs: ref: main - name: Build with Maven run: | - mvn --batch-mode clean install - echo "powsybl-dynawo.version=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> ../version.txt + mvn --batch-mode clean install -DskipTests + - name: Get diagram version + run : echo "DINAWO_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_ENV + + #CHECKOUT_PYPOWSYBL_DEPENCIES + - name: Checkout powsybl-depencies + uses: actions/checkout@v4 + with: + repository: powsybl/powsybl-dependencies + ref: main - #UPDATE VERSION DEPENDCIES - - name: Update powsybl-dependencies + #UPDATE/INSTALL_PYPOWSYBL_DEPENCIES + - name: Update dependencies versions run: | - cd powsybl-dependencies - if [ ! -s ../versions.txt ]; then - echo "Error: versions.txt is empty or does not exist" - exit 1 - fi - - # Backup original pom.xml - cp pom.xml pom.xml.bak - - # Update version - while IFS= read -r line; do - key=$(echo $line | cut -d'=' -f1) - value=$(echo $line | cut -d'=' -f2) - sed -i "s/^$key.version=.*/$key.version=$value/" pom.xml - done < ../versions.txt - - # Check if any changes were made - if diff -q pom.xml pom.xml.bak > /dev/null; then - echo "No changes were made to pom.xml" - else - echo "pom.xml has been updated" - fi + mvn versions:set-property -Dproperty=powsybl-core.version -DnewVersion=$CORE_VERSION -DgenerateBackupPoms=false + mvn versions:set-property -Dproperty=powsybl-open-loadflow.version -DnewVersion=$LOADFLOW_VERSION -DgenerateBackupPoms=false + mvn versions:set-property -Dproperty=powsybl-diagram.version -DnewVersion=$DIAGRAM_VERSION -DgenerateBackupPoms=false + mvn versions:set-property -Dproperty=powsybl-dynawo.version -DnewVersion=$DYNAWO_VERSION -DgenerateBackupPoms=false + mvn versions:set-property -Dproperty=powsybl-entsoe.version -DnewVersion=$ENTSOE_VERSION -DgenerateBackupPoms=false + - name: Install powsybl-dependencies + run: mvn clean install #BUILD PYPOWSYBL From 4a36ab37a81a60783fc085eb9e8f5f0264075914 Mon Sep 17 00:00:00 2001 From: Leclerc Clement Date: Tue, 24 Sep 2024 09:52:58 +0200 Subject: [PATCH 007/120] Snapshot CI Signed-off-by: Leclerc Clement --- .github/workflows/dependencies-ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/dependencies-ci.yml b/.github/workflows/dependencies-ci.yml index c93116b07..a800ae5eb 100644 --- a/.github/workflows/dependencies-ci.yml +++ b/.github/workflows/dependencies-ci.yml @@ -4,7 +4,7 @@ env : LOADFLOW_VERSION : "" DIAGRAM_VERSION : "" ENTSOE_VERSION : "" - DYNAFLOW_VERSION: "" + DYNAWO_VERSION: "" on: push: @@ -105,8 +105,8 @@ jobs: - name: Build with Maven run: | mvn --batch-mode clean install -DskipTests - - name: Get diagram version - run : echo "DINAWO_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_ENV + - name: Get dynawo version + run : echo "DYNAWO_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_ENV #CHECKOUT_PYPOWSYBL_DEPENCIES - name: Checkout powsybl-depencies From 13d9c105b9bd3333a234e62edfd9879709cc42d2 Mon Sep 17 00:00:00 2001 From: Leclerc Clement Date: Tue, 24 Sep 2024 11:18:36 +0200 Subject: [PATCH 008/120] Snapshot CI Signed-off-by: Leclerc Clement --- .github/workflows/dependencies-ci.yml | 33 +++++++++++++++++++-------- 1 file changed, 23 insertions(+), 10 deletions(-) diff --git a/.github/workflows/dependencies-ci.yml b/.github/workflows/dependencies-ci.yml index a800ae5eb..9bf613d16 100644 --- a/.github/workflows/dependencies-ci.yml +++ b/.github/workflows/dependencies-ci.yml @@ -59,6 +59,7 @@ jobs: run : echo "CORE_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_ENV + #BUILD LOADFLOW - name: Checkout loadflow-sources uses: actions/checkout@v4 @@ -123,22 +124,34 @@ jobs: mvn versions:set-property -Dproperty=powsybl-diagram.version -DnewVersion=$DIAGRAM_VERSION -DgenerateBackupPoms=false mvn versions:set-property -Dproperty=powsybl-dynawo.version -DnewVersion=$DYNAWO_VERSION -DgenerateBackupPoms=false mvn versions:set-property -Dproperty=powsybl-entsoe.version -DnewVersion=$ENTSOE_VERSION -DgenerateBackupPoms=false + cat pom.xml || true - name: Install powsybl-dependencies run: mvn clean install #BUILD PYPOWSYBL - - name: Checkout pypowsybl-sources + - name: Checkout sources uses: actions/checkout@v4 with: - repository: powsybl/pypowsybl - ref: main - - name: Install and build - run: | - pip install --upgrade setuptools pip - pip install -r requirements.txt - pip install . - - name: Run test - run: pytest tests + submodules: true + + - name: Install dependencies + run: pip3 install -r requirements.txt + + - name: Build wheel + run: | + python3 setup.py bdist_wheel + auditwheel repair dist/*.whl + + - name: Install wheel + run: pip3 install wheelhouse/*.whl --user + + - name: Run basic pypowsybl import + working-directory: ./tests + run: python3 basic_import_test.py + + - name: Run tests + working-directory: ./tests # Run in subdir to use installed lib, not sources + run: pytest From 601d309f27113b7d3daaf7cf0f0c777372be217c Mon Sep 17 00:00:00 2001 From: Leclerc Clement Date: Tue, 24 Sep 2024 11:53:20 +0200 Subject: [PATCH 009/120] Snapshot CI Signed-off-by: Leclerc Clement --- .github/workflows/dependencies-ci.yml | 6 +- .github/workflows/dev-ci.yml | 195 -------------------- .github/workflows/full-ci.yml | 247 -------------------------- .github/workflows/release-ci.yml | 138 -------------- 4 files changed, 4 insertions(+), 582 deletions(-) delete mode 100644 .github/workflows/dev-ci.yml delete mode 100644 .github/workflows/full-ci.yml delete mode 100644 .github/workflows/release-ci.yml diff --git a/.github/workflows/dependencies-ci.yml b/.github/workflows/dependencies-ci.yml index 9bf613d16..e1d7edd4a 100644 --- a/.github/workflows/dependencies-ci.yml +++ b/.github/workflows/dependencies-ci.yml @@ -1,5 +1,6 @@ name: Snapshot CI env : + DEPENDENCIES_VERSION : "" CORE_VERSION : "" LOADFLOW_VERSION : "" DIAGRAM_VERSION : "" @@ -115,6 +116,8 @@ jobs: with: repository: powsybl/powsybl-dependencies ref: main + - name: Get dependencies version + run: echo "DEPENDENCIES_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_ENV #UPDATE/INSTALL_PYPOWSYBL_DEPENCIES - name: Update dependencies versions @@ -141,10 +144,9 @@ jobs: - name: Build wheel run: | python3 setup.py bdist_wheel - auditwheel repair dist/*.whl - name: Install wheel - run: pip3 install wheelhouse/*.whl --user + run: pip3 install dist/*.whl --user - name: Run basic pypowsybl import working-directory: ./tests diff --git a/.github/workflows/dev-ci.yml b/.github/workflows/dev-ci.yml deleted file mode 100644 index 7441d05da..000000000 --- a/.github/workflows/dev-ci.yml +++ /dev/null @@ -1,195 +0,0 @@ -name: Dev CI - -#on: - # push: - # branches: - # on all branches except main where full build will be run - # - '*' - # - '!main' - - -on: - schedule: - - cron: '0 0 */2 * *' # Exécute tous les deux jours à minuit - workflow_dispatch: # Permet l'exécution manuelle -jobs: - manylinux_build: - name: Build linux ${{ matrix.python.name }} wheel - runs-on: ubuntu-latest - container: quay.io/pypa/manylinux2014_x86_64:2024-07-01-8dac23b - env: - ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true - strategy: - matrix: - python: - - { - name: cp38, - abi: cp38, - version: '3.8', - } - - steps: - - name: Install Maven - run: | - curl --fail --silent --show-error https://dlcdn.apache.org/maven/maven-3/3.9.6/binaries/apache-maven-3.9.6-bin.tar.gz -o /tmp/apache-maven-3.9.6-bin.tar.gz - tar xf /tmp/apache-maven-*.tar.gz -C /opt - echo /opt/apache-maven-3.9.6/bin >> $GITHUB_PATH - - - name: Setup GraalVM - uses: graalvm/setup-graalvm@v1.1.5 # !!! this is last version compatible with manylinux 2014 - with: - java-version: '17' - distribution: 'graalvm' - github-token: ${{ secrets.GITHUB_TOKEN }} - - - name: Checkout sources - uses: actions/checkout@v3 - with: - submodules: true - - - name: Setup path - run: echo "/opt/python/${{ matrix.python.name }}-${{ matrix.python.abi }}/bin/" >> $GITHUB_PATH - - - name: Install dependencies - run: pip3 install -r requirements.txt - - - name: Build wheel - run: | - python3 setup.py bdist_wheel - auditwheel repair dist/*.whl - - - name: Install wheel - run: pip3 install wheelhouse/*.whl --user - - - name: Run basic pypowsybl import - working-directory: ./tests - run: python3 basic_import_test.py - - - name: Run tests - working-directory: ./tests # Run in subdir to use installed lib, not sources - run: | - pytest - - - name: Type checking - run: mypy -p pypowsybl - - - name: Dev install # In order to generate coverage and linting, we need to install in sources - run: | - pip3 uninstall -y pypowsybl - python3 setup.py develop - - - name: Generate coverage - run: | - coverage run -m pytest tests/ - coverage xml - - - name: Linting - run: pylint pypowsybl - - - name: Sonar analysis - uses: sonarsource/sonarcloud-github-action@v2.0.2 - env: - GITHUB_TOKEN: ${{ secrets.REPO_ACCESS_TOKEN }} - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - with: - args: | - -Dsonar.python.coverage.reportPaths=coverage.xml - - - name: Run doc examples - working-directory: ./docs - run: make html doctest SPHINXOPTS="-W" - - - name: Test standalone cpp build - shell: bash - working-directory: ./dist - run: | #Unzip binaries.zip produced by setup.py and try to build only the cpp API and bindings with it - unzip binaries.zip && mkdir build && cd build - cmake $GITHUB_WORKSPACE/cpp -DBUILD_PYPOWSYBL_JAVA=OFF -DPYPOWSYBL_JAVA_LIBRARY_DIR=$GITHUB_WORKSPACE/dist/lib -DPYPOWSYBL_JAVA_INCLUDE_DIR=$GITHUB_WORKSPACE/dist/include - cmake --build . --config Release - - macos_windows_build: - name: Build ${{ matrix.config.name }} ${{ matrix.python.name }} wheel - runs-on: ${{ matrix.config.os }} - strategy: - matrix: - config: - - { - name: darwin, - os: macos-12, - macosx_deployment_target: "10.16", # to ensure pip finds wheel when Big Sur is configured to return 10.16 as version instead of 11.0 - bdist_wheel_args: "--plat-name macosx-11.0-x86_64", # needed to avoid the wheel to be named -universal2 - } - - { - name: darwin-arm64, - os: macos-14, - macosx_deployment_target: "11", # first arm64 version of macosx - bdist_wheel_args: "--plat-name macosx-11.0-arm64", # needed to avoid the wheel to be named -universal2 - } - - { - name: windows, - os: windows-2022, - } - python: - - { - name: cp38, - version: '3.8', - } - - steps: - - name: Setup GraalVM - uses: graalvm/setup-graalvm@v1 - with: - java-version: '17' - distribution: 'graalvm' - github-token: ${{ secrets.GITHUB_TOKEN }} - - - name: Checkout sources - uses: actions/checkout@v3 - with: - submodules: true - - - name: Setup Python - uses: actions/setup-python@v4 - with: - python-version: ${{ matrix.python.version }} - - - name: Install Python dependencies - run: | - python -m pip install --upgrade pip - python -m pip install -r requirements.txt - - - name: Build wheel - env: - MACOSX_DEPLOYMENT_TARGET: ${{ matrix.config.macosx_deployment_target }} - run: python setup.py bdist_wheel ${{ matrix.config.bdist_wheel_args }} - - - name: Install wheel - shell: bash - run: python -m pip install dist/*.whl --user - - - name: Run basic pypowsybl import - working-directory: ./tests - run: python3 basic_import_test.py - - - name: Run tests - working-directory: ./tests - run: python3 -m pytest - - - name: Type checking - run: mypy -p pypowsybl - - - name: Run doc examples - working-directory: ./docs - run: make html doctest SPHINXOPTS="-W" - - - name: Test standalone cpp build - shell: bash - working-directory: ./dist - run: | #Unzip binaries.zip produced by setup.py and try to build only the cpp API and bindings with it - unzip binaries.zip && mkdir build && cd build - cmake $GITHUB_WORKSPACE/cpp -DBUILD_PYPOWSYBL_JAVA=OFF -DPYPOWSYBL_JAVA_LIBRARY_DIR=$GITHUB_WORKSPACE/dist/lib -DPYPOWSYBL_JAVA_INCLUDE_DIR=$GITHUB_WORKSPACE/dist/include - cmake --build . --config Release - - - - diff --git a/.github/workflows/full-ci.yml b/.github/workflows/full-ci.yml deleted file mode 100644 index d9fdf9e82..000000000 --- a/.github/workflows/full-ci.yml +++ /dev/null @@ -1,247 +0,0 @@ -name: Full CI - -on: - push: - branches: - - main - tags: - - 'v*.*.*' - -jobs: - manylinux_build: - name: Build linux ${{ matrix.python.name }} wheel - runs-on: ubuntu-latest - container: quay.io/pypa/manylinux2014_x86_64:2024-07-01-8dac23b - env: - ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true - strategy: - matrix: - python: - - { - name: cp38, - abi: cp38, - version: '3.8' - } - - { - name: cp39, - abi: cp39, - version: '3.9' - } - - { - name: cp310, - abi: cp310, - version: '3.10' - } - - { - name: cp311, - abi: cp311, - version: '3.11' - } - - { - name: cp312, - abi: cp312, - version: '3.12' - } - - steps: - - name: Install Maven - run: | - curl --fail --silent --show-error https://dlcdn.apache.org/maven/maven-3/3.9.6/binaries/apache-maven-3.9.6-bin.tar.gz -o /tmp/apache-maven-3.9.6-bin.tar.gz - tar xf /tmp/apache-maven-*.tar.gz -C /opt - echo /opt/apache-maven-3.9.6/bin >> $GITHUB_PATH - - - name: Setup GraalVM - uses: graalvm/setup-graalvm@v1.1.5 # !!! this is last version compatible with manylinux 2014 - with: - java-version: '17' - distribution: 'graalvm' - github-token: ${{ secrets.GITHUB_TOKEN }} - - - name: Checkout sources - uses: actions/checkout@v3 - with: - submodules: true - - - name: Setup path - run: echo "/opt/python/${{ matrix.python.name }}-${{ matrix.python.abi }}/bin/" >> $GITHUB_PATH - - - name: Install dependencies - run: pip3 install -r requirements.txt - - - name: Build wheel - run: | - python3 setup.py bdist_wheel - auditwheel repair dist/*.whl - - - name: Install wheel - run: pip3 install wheelhouse/*.whl --user - - - name: Run basic pypowsybl import - working-directory: ./tests - run: python3 basic_import_test.py - - - name: Run tests - working-directory: ./tests # Run in subdir to use installed lib, not sources - run: | - pytest - - - name: Type checking - run: mypy -p pypowsybl - - - name: Dev install # In order to generate coverage and linting, we need to install in sources - if: matrix.python.name == 'cp39' - run: | - pip3 uninstall -y pypowsybl - python3 setup.py develop - - - name: Generate coverage - if: matrix.python.name == 'cp39' - run: | - coverage run -m pytest tests/ - coverage xml - - - name: Linting - if: matrix.python.name == 'cp39' - run: pylint pypowsybl - - - name: Sonar analysis - if: matrix.python.name == 'cp39' - uses: sonarsource/sonarcloud-github-action@v2.0.2 - env: - GITHUB_TOKEN: ${{ secrets.REPO_ACCESS_TOKEN }} - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - with: - args: | - -Dsonar.python.coverage.reportPaths=coverage.xml - - - name: Run doc examples - working-directory: ./docs - run: make html doctest SPHINXOPTS="-W" - - - name: Upload wheel - uses: actions/upload-artifact@v3 - with: - name: pypowsybl-wheel-linux-${{ matrix.python.name }} - path: wheelhouse/*.whl - - macos_windows_build: - name: Build ${{ matrix.config.name }} ${{ matrix.python.name }} wheel - runs-on: ${{ matrix.config.os }} - strategy: - matrix: - config: - - { - name: darwin, - os: macos-12, - macosx_deployment_target: "10.16", # to ensure pip finds wheel when Big Sur is configured to return 10.16 as version instead of 11.0 - bdist_wheel_args: "--plat-name macosx-11.0-x86_64", # needed to avoid the wheel to be named -universal2 - } - - { - name: darwin-arm64, - os: macos-14, - macosx_deployment_target: "11", # first arm64 version of macosx - bdist_wheel_args: "--plat-name macosx-11.0-arm64", # needed to avoid the wheel to be named -universal2 - } - - { - name: windows, - os: windows-2022, - } - python: - - { - name: cp38, - version: '3.8', - } - - { - name: cp39, - version: '3.9', - } - - { - name: cp310, - version: '3.10', - } - - { - name: cp311, - version: '3.11', - } - - { - name: cp312, - version: '3.12', - } - - steps: - - name: Setup GraalVM - uses: graalvm/setup-graalvm@v1 - with: - java-version: '17' - distribution: 'graalvm' - github-token: ${{ secrets.GITHUB_TOKEN }} - - - name: Checkout sources - uses: actions/checkout@v3 - with: - submodules: true - - - name: Setup Python - uses: actions/setup-python@v4 - with: - python-version: ${{ matrix.python.version }} - - - name: Install Python dependencies - run: | - python -m pip install --upgrade pip - python -m pip install -r requirements.txt - - - name: Build wheel - env: - MACOSX_DEPLOYMENT_TARGET: ${{ matrix.config.macosx_deployment_target }} - run: python setup.py bdist_wheel ${{ matrix.config.bdist_wheel_args }} - - - name: Install wheel - shell: bash - run: python -m pip install dist/*.whl --user - - - name: Run basic pypowsybl import - working-directory: ./tests - run: python3 basic_import_test.py - - - name: Run tests - working-directory: ./tests - run: python3 -m pytest - - - name: Type checking - run: mypy -p pypowsybl - - - name: Run doc examples - working-directory: ./docs - run: make html doctest SPHINXOPTS="-W" - - - name: Upload wheel - uses: actions/upload-artifact@v3 - with: - name: pypowsybl-wheel-${{ matrix.config.name }}-${{ matrix.python.name }} - path: dist/*.whl - - package: - name: Package wheels - runs-on: ubuntu-latest - needs: [manylinux_build, macos_windows_build] - - steps: - - name: Download wheels - uses: actions/download-artifact@v3 - with: - path: download - - - name: Upload wheels - uses: actions/upload-artifact@v3 - with: - name: pypowsybl-wheels - path: | - download/**/*.whl - - - name: Release on PyPi - if: startsWith(github.ref, 'refs/tags/') - shell: bash - run: | - python -m pip install --user --upgrade twine - python -m twine upload --username __token__ --password ${{ secrets.PYPI_TOKEN }} download/*/*.whl diff --git a/.github/workflows/release-ci.yml b/.github/workflows/release-ci.yml deleted file mode 100644 index 8baf4114f..000000000 --- a/.github/workflows/release-ci.yml +++ /dev/null @@ -1,138 +0,0 @@ -name: Release - -on: - release: - types: - - created - -permissions: - contents: write - -jobs: - manylinux_build: - name: Build linux ${{ matrix.python.name }} wheel - runs-on: ubuntu-latest - container: quay.io/pypa/manylinux2014_x86_64:2024-07-01-8dac23b - env: - ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true - strategy: - matrix: - python: - - { - name: cp38, - abi: cp38, - version: '3.8', - } - - steps: - - name: Install Maven - run: | - curl --fail --silent --show-error https://dlcdn.apache.org/maven/maven-3/3.9.6/binaries/apache-maven-3.9.6-bin.tar.gz -o /tmp/apache-maven-3.9.6-bin.tar.gz - tar xf /tmp/apache-maven-*.tar.gz -C /opt - echo /opt/apache-maven-3.9.6/bin >> $GITHUB_PATH - - - name: Setup GraalVM - uses: graalvm/setup-graalvm@v1.1.5 # !!! this is last version compatible with manylinux 2014 - with: - java-version: '17' - distribution: 'graalvm' - github-token: ${{ secrets.GITHUB_TOKEN }} - - - name: Checkout sources - uses: actions/checkout@v3 - with: - submodules: true - - - name: Setup path - run: echo "/opt/python/${{ matrix.python.name }}-${{ matrix.python.abi }}/bin/" >> $GITHUB_PATH - - - name: Install dependencies - run: pip3 install -r requirements.txt - - - name: Build wheel - run: | - python3 setup.py bdist_wheel - auditwheel repair dist/*.whl - - - name: Install wheel - run: pip3 install wheelhouse/*.whl --user - - - name: Run basic pypowsybl import - working-directory: ./tests - run: python3 basic_import_test.py - - - name: Upload binaries - uses: actions/upload-release-asset@v1.0.1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ github.event.release.upload_url }} - asset_path: ./dist/binaries.zip - asset_name: binaries-${{ github.event.release.tag_name }}-linux.zip - asset_content_type: application/zip - - macos_windows_build: - name: Build ${{ matrix.config.name }} ${{ matrix.python.name }} wheel - runs-on: ${{ matrix.config.os }} - strategy: - matrix: - config: - - { - name: darwin, - os: macos-12, - } - - { - name: windows, - os: windows-2022, - } - python: - - { - name: cp38, - version: '3.8', - } - - steps: - - name: Setup GraalVM - uses: graalvm/setup-graalvm@v1 - with: - java-version: '17' - distribution: 'graalvm' - github-token: ${{ secrets.GITHUB_TOKEN }} - - - name: Checkout sources - uses: actions/checkout@v3 - with: - submodules: true - - - name: Setup Python - uses: actions/setup-python@v4 - with: - python-version: ${{ matrix.python.version }} - - - name: Install Python dependencies - run: | - python -m pip install --upgrade pip - python -m pip install -r requirements.txt - - - name: Build wheel - env: - MACOSX_DEPLOYMENT_TARGET: "10.16" # to ensure pip finds wheel when Big Sur is configured to return 10.16 as version instead of 11.0 - run: python setup.py bdist_wheel - - - name: Install wheel - shell: bash - run: python -m pip install dist/*.whl --user - - - name: Run basic pypowsybl import - working-directory: ./tests - run: python3 basic_import_test.py - - - name: Upload binaries - uses: actions/upload-release-asset@v1.0.1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ github.event.release.upload_url }} - asset_path: ./dist/binaries.zip - asset_name: binaries-${{ github.event.release.tag_name }}-${{ matrix.config.name }}.zip - asset_content_type: application/zip \ No newline at end of file From 651580e765b4cbc9bfcbf9acefbccf537e09d8d9 Mon Sep 17 00:00:00 2001 From: Leclerc Clement Date: Tue, 24 Sep 2024 14:36:33 +0200 Subject: [PATCH 010/120] Snapshot CI Signed-off-by: Leclerc Clement --- .github/workflows/dependencies-ci.yml | 32 ++++++++++++++++++++++----- 1 file changed, 27 insertions(+), 5 deletions(-) diff --git a/.github/workflows/dependencies-ci.yml b/.github/workflows/dependencies-ci.yml index e1d7edd4a..8aef4f7e3 100644 --- a/.github/workflows/dependencies-ci.yml +++ b/.github/workflows/dependencies-ci.yml @@ -57,9 +57,9 @@ jobs: - name: Build with Maven run: mvn --batch-mode clean install -DskipTests - name : Get core version - run : echo "CORE_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_ENV - - + run : | + echo "CORE_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_ENV* + cat pom.xml || true #BUILD LOADFLOW - name: Checkout loadflow-sources @@ -67,8 +67,11 @@ jobs: with: repository: powsybl/powsybl-open-loadflow ref: main + - name: Change core version + run : mvn versions:set-property -Dproperty=powsybl-core.version -DnewVersion=$CORE_VERSION -DgenerateBackupPoms=false - name: Build with Maven run: | + cat pom.xml || true mvn --batch-mode clean install -DskipTests - name: Get loadflow version run : echo "LOADFLOW_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_ENV @@ -80,8 +83,11 @@ jobs: with: repository: powsybl/powsybl-diagram ref: main + - name: Change core version + run : mvn versions:set-property -Dproperty=powsybl-core.version -DnewVersion=$CORE_VERSION -DgenerateBackupPoms=false - name: Build with Maven - run: | + run: | + cat pom.xml || true mvn --batch-mode clean install -DskipTests - name: Get diagram version run : echo "DIAGRAM_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_ENV @@ -92,8 +98,13 @@ jobs: with: repository: powsybl/powsybl-entsoe ref: main + - name: Change core version + run : mvn versions:set-property -Dproperty=powsybl-core.version -DnewVersion=$CORE_VERSION -DgenerateBackupPoms=false + - name: Change open-loadflow version + run : mvn versions:set-property -Dproperty=powsyblopenloadflow.version -DnewVersion=$CORE_VERSION -DgenerateBackupPoms=false - name: Build with Maven - run: | + run: | + cat pom.xml || true mvn clean --batch-mode clean install -DskipTests - name: Get entsoe version run : echo "ENTSOE_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_ENV @@ -104,8 +115,11 @@ jobs: with: repository: powsybl/powsybl-dynawo ref: main + - name: Change core version + run : mvn versions:set-property -Dproperty=powsybl-core.version -DnewVersion=$CORE_VERSION -DgenerateBackupPoms=false - name: Build with Maven run: | + cat pom.xml || true mvn --batch-mode clean install -DskipTests - name: Get dynawo version run : echo "DYNAWO_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_ENV @@ -138,6 +152,12 @@ jobs: with: submodules: true + - name: Change java-pom.xml + working-directory: ./java + run : | + mvn versions:set-property -Dproperty=powsybl-dependencies.version -DnewVersion=$DEPENDENCIES_VERSION -DgenerateBackupPoms=false + cat pom.xml || true + - name: Install dependencies run: pip3 install -r requirements.txt @@ -157,3 +177,5 @@ jobs: run: pytest + + From 2d6693a6fca7fe6580efc666db0d39268519b4d9 Mon Sep 17 00:00:00 2001 From: Leclerc Clement Date: Tue, 24 Sep 2024 16:47:08 +0200 Subject: [PATCH 011/120] Snapshot CI Signed-off-by: Leclerc Clement --- .github/workflows/dependencies-ci.yml | 57 +++++++++++++++++++++++++-- 1 file changed, 53 insertions(+), 4 deletions(-) diff --git a/.github/workflows/dependencies-ci.yml b/.github/workflows/dependencies-ci.yml index 8aef4f7e3..648a71ce2 100644 --- a/.github/workflows/dependencies-ci.yml +++ b/.github/workflows/dependencies-ci.yml @@ -62,11 +62,23 @@ jobs: cat pom.xml || true #BUILD LOADFLOW + - name: Check for SNAPSHOT branch + run: | + SNAPSHOT_BRANCH=$(git ls-remote --heads powsybl/powsybl-open-loadflow | grep 'refs/heads/.*SNAPSHOT' | sed 's/.*refs\/heads\///') + if [ -n "$SNAPSHOT_BRANCH" ]; then + echo "SNAPSHOT VERSION EXIST: $SNAPSHOT_BRANCH" + echo "SNAPSHOT_EXIST=true" >> $GITHUB_ENV + echo "SNAPSHOT_BRANCH=$SNAPSHOT_BRANCH" >> $GITHUB_ENV + else + echo "No SNAPSHOT branch found" + echo "SNAPSHOT_EXIST=false" >> $GITHUB_ENV + echo "SNAPSHOT_BRANCH=main" >> $GITHUB_ENV + fi - name: Checkout loadflow-sources uses: actions/checkout@v4 with: repository: powsybl/powsybl-open-loadflow - ref: main + ref: ${{ env.SNAPSHOT_BRANCH }} - name: Change core version run : mvn versions:set-property -Dproperty=powsybl-core.version -DnewVersion=$CORE_VERSION -DgenerateBackupPoms=false - name: Build with Maven @@ -78,11 +90,24 @@ jobs: #BUILD DIAGRAM + - name: Check for SNAPSHOT branch + run: | + SNAPSHOT_BRANCH=$(git ls-remote --heads powsybl/powsybl-diagram | grep 'refs/heads/.*SNAPSHOT' | sed 's/.*refs\/heads\///') + if [ -n "$SNAPSHOT_BRANCH" ]; then + echo "SNAPSHOT VERSION EXIST: $SNAPSHOT_BRANCH" + echo "SNAPSHOT_EXIST=true" >> $GITHUB_ENV + echo "SNAPSHOT_BRANCH=$SNAPSHOT_BRANCH" >> $GITHUB_ENV + else + echo "No SNAPSHOT branch found" + echo "SNAPSHOT_EXIST=false" >> $GITHUB_ENV + echo "SNAPSHOT_BRANCH=main" >> $GITHUB_ENV + fi + - name: Checkout diagram-sources uses: actions/checkout@v4 with: repository: powsybl/powsybl-diagram - ref: main + ref: ${{ env.SNAPSHOT_BRANCH }} - name: Change core version run : mvn versions:set-property -Dproperty=powsybl-core.version -DnewVersion=$CORE_VERSION -DgenerateBackupPoms=false - name: Build with Maven @@ -93,11 +118,23 @@ jobs: run : echo "DIAGRAM_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_ENV #BUILD ENTSOE + - name: Check for SNAPSHOT branch + run: | + SNAPSHOT_BRANCH=$(git ls-remote --heads powsybl/powsybl-entsoe | grep 'refs/heads/.*SNAPSHOT' | sed 's/.*refs\/heads\///') + if [ -n "$SNAPSHOT_BRANCH" ]; then + echo "SNAPSHOT VERSION EXIST: $SNAPSHOT_BRANCH" + echo "SNAPSHOT_EXIST=true" >> $GITHUB_ENV + echo "SNAPSHOT_BRANCH=$SNAPSHOT_BRANCH" >> $GITHUB_ENV + else + echo "No SNAPSHOT branch found" + echo "SNAPSHOT_EXIST=false" >> $GITHUB_ENV + echo "SNAPSHOT_BRANCH=main" >> $GITHUB_ENV + fi - name: Checkout entsoe-sources uses: actions/checkout@v4 with: repository: powsybl/powsybl-entsoe - ref: main + ref: ${{ env.SNAPSHOT_BRANCH }} - name: Change core version run : mvn versions:set-property -Dproperty=powsybl-core.version -DnewVersion=$CORE_VERSION -DgenerateBackupPoms=false - name: Change open-loadflow version @@ -110,11 +147,23 @@ jobs: run : echo "ENTSOE_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_ENV #BUILD DYNAWO + - name: Check for SNAPSHOT branch + run: | + SNAPSHOT_BRANCH=$(git ls-remote --heads powsybl/powsybl-dynawo | grep 'refs/heads/.*SNAPSHOT' | sed 's/.*refs\/heads\///') + if [ -n "$SNAPSHOT_BRANCH" ]; then + echo "SNAPSHOT VERSION EXIST: $SNAPSHOT_BRANCH" + echo "SNAPSHOT_EXIST=true" >> $GITHUB_ENV + echo "SNAPSHOT_BRANCH=$SNAPSHOT_BRANCH" >> $GITHUB_ENV + else + echo "No SNAPSHOT branch found" + echo "SNAPSHOT_EXIST=false" >> $GITHUB_ENV + echo "SNAPSHOT_BRANCH=main" >> $GITHUB_ENV + fi - name: Checkout dynawo-sources uses: actions/checkout@v4 with: repository: powsybl/powsybl-dynawo - ref: main + ref: ${{ env.SNAPSHOT_BRANCH }} - name: Change core version run : mvn versions:set-property -Dproperty=powsybl-core.version -DnewVersion=$CORE_VERSION -DgenerateBackupPoms=false - name: Build with Maven From 1695ff9987a3155befd2a474223c3def3f5a9232 Mon Sep 17 00:00:00 2001 From: Leclerc Clement Date: Tue, 24 Sep 2024 17:22:11 +0200 Subject: [PATCH 012/120] Snapshot CI Signed-off-by: Leclerc Clement --- .github/workflows/dependencies-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dependencies-ci.yml b/.github/workflows/dependencies-ci.yml index 648a71ce2..446e823f3 100644 --- a/.github/workflows/dependencies-ci.yml +++ b/.github/workflows/dependencies-ci.yml @@ -64,7 +64,7 @@ jobs: #BUILD LOADFLOW - name: Check for SNAPSHOT branch run: | - SNAPSHOT_BRANCH=$(git ls-remote --heads powsybl/powsybl-open-loadflow | grep 'refs/heads/.*SNAPSHOT' | sed 's/.*refs\/heads\///') + SNAPSHOT_BRANCH=$(git ls-remote --heads https://github.com/powsybl/powsybl-open-loadflow.git| grep 'refs/heads/.*SNAPSHOT' | sed 's/.*refs\/heads\///') if [ -n "$SNAPSHOT_BRANCH" ]; then echo "SNAPSHOT VERSION EXIST: $SNAPSHOT_BRANCH" echo "SNAPSHOT_EXIST=true" >> $GITHUB_ENV @@ -92,7 +92,7 @@ jobs: #BUILD DIAGRAM - name: Check for SNAPSHOT branch run: | - SNAPSHOT_BRANCH=$(git ls-remote --heads powsybl/powsybl-diagram | grep 'refs/heads/.*SNAPSHOT' | sed 's/.*refs\/heads\///') + SNAPSHOT_BRANCH=$(git ls-remote --heads https://github.com/powsybl/powsybl-diagram.git | grep 'refs/heads/.*SNAPSHOT' | sed 's/.*refs\/heads\///') if [ -n "$SNAPSHOT_BRANCH" ]; then echo "SNAPSHOT VERSION EXIST: $SNAPSHOT_BRANCH" echo "SNAPSHOT_EXIST=true" >> $GITHUB_ENV From 0d8017ef352921ae52bd51f1453e423ddb6bccd8 Mon Sep 17 00:00:00 2001 From: Leclerc Clement Date: Tue, 24 Sep 2024 17:33:08 +0200 Subject: [PATCH 013/120] Snapshot CI Signed-off-by: Leclerc Clement --- .github/workflows/dependencies-ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/dependencies-ci.yml b/.github/workflows/dependencies-ci.yml index 446e823f3..524cd6ea1 100644 --- a/.github/workflows/dependencies-ci.yml +++ b/.github/workflows/dependencies-ci.yml @@ -120,7 +120,7 @@ jobs: #BUILD ENTSOE - name: Check for SNAPSHOT branch run: | - SNAPSHOT_BRANCH=$(git ls-remote --heads powsybl/powsybl-entsoe | grep 'refs/heads/.*SNAPSHOT' | sed 's/.*refs\/heads\///') + SNAPSHOT_BRANCH=$(git ls-remote --heads https://github.com/powsybl/powsybl-entsoe.git | grep 'refs/heads/.*SNAPSHOT' | sed 's/.*refs\/heads\///') if [ -n "$SNAPSHOT_BRANCH" ]; then echo "SNAPSHOT VERSION EXIST: $SNAPSHOT_BRANCH" echo "SNAPSHOT_EXIST=true" >> $GITHUB_ENV @@ -138,7 +138,7 @@ jobs: - name: Change core version run : mvn versions:set-property -Dproperty=powsybl-core.version -DnewVersion=$CORE_VERSION -DgenerateBackupPoms=false - name: Change open-loadflow version - run : mvn versions:set-property -Dproperty=powsyblopenloadflow.version -DnewVersion=$CORE_VERSION -DgenerateBackupPoms=false + run : mvn versions:set-property -Dproperty=powsyblopenloadflow.version -DnewVersion=$LOADFLOW_VERSION -DgenerateBackupPoms=false - name: Build with Maven run: | cat pom.xml || true @@ -149,7 +149,7 @@ jobs: #BUILD DYNAWO - name: Check for SNAPSHOT branch run: | - SNAPSHOT_BRANCH=$(git ls-remote --heads powsybl/powsybl-dynawo | grep 'refs/heads/.*SNAPSHOT' | sed 's/.*refs\/heads\///') + SNAPSHOT_BRANCH=$(git ls-remote --heads https://github.com/powsybl/powsybl-dynawo.git | grep 'refs/heads/.*SNAPSHOT' | sed 's/.*refs\/heads\///') if [ -n "$SNAPSHOT_BRANCH" ]; then echo "SNAPSHOT VERSION EXIST: $SNAPSHOT_BRANCH" echo "SNAPSHOT_EXIST=true" >> $GITHUB_ENV From 30c332daab4f63905ba441ba1888e9b359b36d4f Mon Sep 17 00:00:00 2001 From: Leclerc Clement Date: Mon, 30 Sep 2024 09:57:33 +0200 Subject: [PATCH 014/120] Snapshot CI Signed-off-by: Leclerc Clement --- .github/workflows/dependencies-ci.yml | 33 +++++++++++++++++++++++++++ README.md | 2 +- java/pom.xml | 2 +- 3 files changed, 35 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dependencies-ci.yml b/.github/workflows/dependencies-ci.yml index 524cd6ea1..35365eba2 100644 --- a/.github/workflows/dependencies-ci.yml +++ b/.github/workflows/dependencies-ci.yml @@ -6,6 +6,7 @@ env : DIAGRAM_VERSION : "" ENTSOE_VERSION : "" DYNAWO_VERSION: "" + OPENRAO_VERSION: "" on: push: @@ -173,6 +174,37 @@ jobs: - name: Get dynawo version run : echo "DYNAWO_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_ENV + #BUILD OPENRAO + - name: Check for SNAPSHOT branch + run: | + SNAPSHOT_BRANCH=$(git ls-remote --heads https://github.com/powsybl/powsybl-open-rao.git | grep 'refs/heads/.*SNAPSHOT' | sed 's/.*refs\/heads\///') + if [ -n "$SNAPSHOT_BRANCH" ]; then + echo "SNAPSHOT VERSION EXIST: $SNAPSHOT_BRANCH" + echo "SNAPSHOT_EXIST=true" >> $GITHUB_ENV + echo "SNAPSHOT_BRANCH=$SNAPSHOT_BRANCH" >> $GITHUB_ENV + else + echo "No SNAPSHOT branch found" + echo "SNAPSHOT_EXIST=false" >> $GITHUB_ENV + echo "SNAPSHOT_BRANCH=main" >> $GITHUB_ENV + fi + - name: Checkout open-rao-sources + uses: actions/checkout@v4 + with: + repository: powsybl/powsybl-open-rao + ref: ${{ env.SNAPSHOT_BRANCH }} + - name: Change core version + run : mvn versions:set-property -Dproperty=powsybl-core.version -DnewVersion=$CORE_VERSION -DgenerateBackupPoms=false + - name: Change entsoe version + run : mvn versions:set-property -Dproperty=powsybl.entsoe.version -DnewVersion=$ENTSOE_VERSION -DgenerateBackupPoms=false + - name: Change open-loadflow version + run : mvn versions:set-property -Dproperty=powsybl.openloadflow.version -DnewVersion=$LOADFLOW_VERSION-DgenerateBackupPoms=false + - name: Build with Maven + run: | + cat pom.xml || true + mvn --batch-mode clean install -DskipTests + - name: Get open-rao version + run : echo "OPENRAO_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_ENV + #CHECKOUT_PYPOWSYBL_DEPENCIES - name: Checkout powsybl-depencies uses: actions/checkout@v4 @@ -190,6 +222,7 @@ jobs: mvn versions:set-property -Dproperty=powsybl-diagram.version -DnewVersion=$DIAGRAM_VERSION -DgenerateBackupPoms=false mvn versions:set-property -Dproperty=powsybl-dynawo.version -DnewVersion=$DYNAWO_VERSION -DgenerateBackupPoms=false mvn versions:set-property -Dproperty=powsybl-entsoe.version -DnewVersion=$ENTSOE_VERSION -DgenerateBackupPoms=false + mvn versions:set-property -Dproperty=powsybl-open-rao.version -DnewVersion=$OPENRAO_VERSION -DgenerateBackupPoms=false cat pom.xml || true - name: Install powsybl-dependencies run: mvn clean install diff --git a/README.md b/README.md index c0e391a79..c506be500 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# PyPowSyBl +pip# PyPowSyBl [![Actions Status](https://github.com/powsybl/pypowsybl/workflows/CI/badge.svg)](https://github.com/powsybl/pypowsybl/actions) [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=powsybl_pypowsybl&metric=alert_status)](https://sonarcloud.io/dashboard?id=powsybl_pypowsybl) diff --git a/java/pom.xml b/java/pom.xml index 4eecba774..26eac1f4f 100644 --- a/java/pom.xml +++ b/java/pom.xml @@ -68,7 +68,7 @@ 5.10.0 3.0.8 3.6.0 - 2024.2.0 + 2024.3.0-SNAPSHOT 0.7.0 1.5.5-3 From de93088ea9fb51da97a41da554cd7486fe1e4802 Mon Sep 17 00:00:00 2001 From: Leclerc Clement Date: Mon, 30 Sep 2024 10:18:20 +0200 Subject: [PATCH 015/120] Snapshot CI Signed-off-by: Leclerc Clement --- .github/workflows/dependencies-ci.yml | 35 +++++++++++++++------------ 1 file changed, 19 insertions(+), 16 deletions(-) diff --git a/.github/workflows/dependencies-ci.yml b/.github/workflows/dependencies-ci.yml index 35365eba2..eb4848828 100644 --- a/.github/workflows/dependencies-ci.yml +++ b/.github/workflows/dependencies-ci.yml @@ -147,10 +147,10 @@ jobs: - name: Get entsoe version run : echo "ENTSOE_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_ENV - #BUILD DYNAWO + #BUILD OPENRAO - name: Check for SNAPSHOT branch run: | - SNAPSHOT_BRANCH=$(git ls-remote --heads https://github.com/powsybl/powsybl-dynawo.git | grep 'refs/heads/.*SNAPSHOT' | sed 's/.*refs\/heads\///') + SNAPSHOT_BRANCH=$(git ls-remote --heads https://github.com/powsybl/powsybl-open-rao.git | grep 'refs/heads/.*SNAPSHOT' | sed 's/.*refs\/heads\///') if [ -n "$SNAPSHOT_BRANCH" ]; then echo "SNAPSHOT VERSION EXIST: $SNAPSHOT_BRANCH" echo "SNAPSHOT_EXIST=true" >> $GITHUB_ENV @@ -160,24 +160,30 @@ jobs: echo "SNAPSHOT_EXIST=false" >> $GITHUB_ENV echo "SNAPSHOT_BRANCH=main" >> $GITHUB_ENV fi - - name: Checkout dynawo-sources + - name: Checkout open-rao-sources uses: actions/checkout@v4 with: - repository: powsybl/powsybl-dynawo + repository: powsybl/powsybl-open-rao ref: ${{ env.SNAPSHOT_BRANCH }} - name: Change core version run : mvn versions:set-property -Dproperty=powsybl-core.version -DnewVersion=$CORE_VERSION -DgenerateBackupPoms=false + - name: Change entsoe version + run : mvn versions:set-property -Dproperty=powsybl.entsoe.version -DnewVersion=$ENTSOE_VERSION -DgenerateBackupPoms=false + - name: Change open-loadflow version + run : mvn versions:set-property -Dproperty=powsybl.openloadflow.version -DnewVersion=$LOADFLOW_VERSION-DgenerateBackupPoms=false - name: Build with Maven run: | cat pom.xml || true mvn --batch-mode clean install -DskipTests - - name: Get dynawo version - run : echo "DYNAWO_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_ENV + - name: Get open-rao version + run : echo "OPENRAO_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_ENV - #BUILD OPENRAO + + + #BUILD DYNAWO - name: Check for SNAPSHOT branch run: | - SNAPSHOT_BRANCH=$(git ls-remote --heads https://github.com/powsybl/powsybl-open-rao.git | grep 'refs/heads/.*SNAPSHOT' | sed 's/.*refs\/heads\///') + SNAPSHOT_BRANCH=$(git ls-remote --heads https://github.com/powsybl/powsybl-dynawo.git | grep 'refs/heads/.*SNAPSHOT' | sed 's/.*refs\/heads\///') if [ -n "$SNAPSHOT_BRANCH" ]; then echo "SNAPSHOT VERSION EXIST: $SNAPSHOT_BRANCH" echo "SNAPSHOT_EXIST=true" >> $GITHUB_ENV @@ -187,23 +193,20 @@ jobs: echo "SNAPSHOT_EXIST=false" >> $GITHUB_ENV echo "SNAPSHOT_BRANCH=main" >> $GITHUB_ENV fi - - name: Checkout open-rao-sources + - name: Checkout dynawo-sources uses: actions/checkout@v4 with: - repository: powsybl/powsybl-open-rao + repository: powsybl/powsybl-dynawo ref: ${{ env.SNAPSHOT_BRANCH }} - name: Change core version run : mvn versions:set-property -Dproperty=powsybl-core.version -DnewVersion=$CORE_VERSION -DgenerateBackupPoms=false - - name: Change entsoe version - run : mvn versions:set-property -Dproperty=powsybl.entsoe.version -DnewVersion=$ENTSOE_VERSION -DgenerateBackupPoms=false - - name: Change open-loadflow version - run : mvn versions:set-property -Dproperty=powsybl.openloadflow.version -DnewVersion=$LOADFLOW_VERSION-DgenerateBackupPoms=false - name: Build with Maven run: | cat pom.xml || true mvn --batch-mode clean install -DskipTests - - name: Get open-rao version - run : echo "OPENRAO_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_ENV + - name: Get dynawo version + run : echo "DYNAWO_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_ENV + #CHECKOUT_PYPOWSYBL_DEPENCIES - name: Checkout powsybl-depencies From 0c58576903101b63cfa97bedf6b84e3cddbbafe7 Mon Sep 17 00:00:00 2001 From: Leclerc Clement Date: Mon, 30 Sep 2024 15:31:58 +0200 Subject: [PATCH 016/120] Snapshot CI Signed-off-by: Leclerc Clement --- .github/workflows/dependencies-ci.yml | 4 ++-- java/pom.xml | 2 +- .../adders/GeneratorSynchronousAdder.java | 2 +- .../datasource/InMemoryZipFileDataSource.java | 6 ++++++ .../python/dynamic/CurveMappingSupplier.java | 2 +- .../powsybl/python/dynamic/EventSupplier.java | 2 +- .../dynamic/PythonDynamicModelsSupplier.java | 8 +++---- .../python/network/ZipMemDataSource.java | 6 ++++++ java/src/test/resources/nad.svg | 21 +++++++++++++++++-- 9 files changed, 41 insertions(+), 12 deletions(-) diff --git a/.github/workflows/dependencies-ci.yml b/.github/workflows/dependencies-ci.yml index eb4848828..7baccadda 100644 --- a/.github/workflows/dependencies-ci.yml +++ b/.github/workflows/dependencies-ci.yml @@ -166,11 +166,11 @@ jobs: repository: powsybl/powsybl-open-rao ref: ${{ env.SNAPSHOT_BRANCH }} - name: Change core version - run : mvn versions:set-property -Dproperty=powsybl-core.version -DnewVersion=$CORE_VERSION -DgenerateBackupPoms=false + run : mvn versions:set-property -Dproperty=powsybl.core.version -DnewVersion=$CORE_VERSION -DgenerateBackupPoms=false - name: Change entsoe version run : mvn versions:set-property -Dproperty=powsybl.entsoe.version -DnewVersion=$ENTSOE_VERSION -DgenerateBackupPoms=false - name: Change open-loadflow version - run : mvn versions:set-property -Dproperty=powsybl.openloadflow.version -DnewVersion=$LOADFLOW_VERSION-DgenerateBackupPoms=false + run : mvn versions:set-property -Dproperty=powsybl.openloadflow.version -DnewVersion=$LOADFLOW_VERSION -DgenerateBackupPoms=false - name: Build with Maven run: | cat pom.xml || true diff --git a/java/pom.xml b/java/pom.xml index 26eac1f4f..ccc3c239e 100644 --- a/java/pom.xml +++ b/java/pom.xml @@ -298,7 +298,7 @@ com.powsybl - powsybl-dynawaltz + powsybl-dynawo-simulation com.powsybl diff --git a/java/src/main/java/com/powsybl/dataframe/dynamic/adders/GeneratorSynchronousAdder.java b/java/src/main/java/com/powsybl/dataframe/dynamic/adders/GeneratorSynchronousAdder.java index d97f85f17..053e7e9fe 100644 --- a/java/src/main/java/com/powsybl/dataframe/dynamic/adders/GeneratorSynchronousAdder.java +++ b/java/src/main/java/com/powsybl/dataframe/dynamic/adders/GeneratorSynchronousAdder.java @@ -11,7 +11,7 @@ import com.powsybl.dataframe.update.StringSeries; import com.powsybl.dataframe.update.UpdatingDataframe; import com.powsybl.dynamicsimulation.DynamicModel; -import com.powsybl.dynawaltz.models.generators.SynchronizedGeneratorBuilder; +import com.powsybl.dynawo.models.generators.SynchronizedGeneratorBuilder; import com.powsybl.iidm.network.Network; import com.powsybl.python.dynamic.PythonDynamicModelsSupplier; diff --git a/java/src/main/java/com/powsybl/python/datasource/InMemoryZipFileDataSource.java b/java/src/main/java/com/powsybl/python/datasource/InMemoryZipFileDataSource.java index 8d0b552f9..3ff314c6e 100644 --- a/java/src/main/java/com/powsybl/python/datasource/InMemoryZipFileDataSource.java +++ b/java/src/main/java/com/powsybl/python/datasource/InMemoryZipFileDataSource.java @@ -115,4 +115,10 @@ public Set listNames(String regex) throws IOException { } return names; } + + @Override + public boolean isDataExtension(String ext) { + return true; + } + } diff --git a/java/src/main/java/com/powsybl/python/dynamic/CurveMappingSupplier.java b/java/src/main/java/com/powsybl/python/dynamic/CurveMappingSupplier.java index d8dbfa249..5a53b0922 100644 --- a/java/src/main/java/com/powsybl/python/dynamic/CurveMappingSupplier.java +++ b/java/src/main/java/com/powsybl/python/dynamic/CurveMappingSupplier.java @@ -10,7 +10,7 @@ import com.powsybl.commons.report.ReportNode; import com.powsybl.dynamicsimulation.Curve; import com.powsybl.dynamicsimulation.CurvesSupplier; -import com.powsybl.dynawaltz.curves.DynawoCurvesBuilder; +import com.powsybl.dynawo.curves.DynawoCurvesBuilder; import com.powsybl.iidm.network.Network; import java.util.Collection; diff --git a/java/src/main/java/com/powsybl/python/dynamic/EventSupplier.java b/java/src/main/java/com/powsybl/python/dynamic/EventSupplier.java index 229be5447..01853be63 100644 --- a/java/src/main/java/com/powsybl/python/dynamic/EventSupplier.java +++ b/java/src/main/java/com/powsybl/python/dynamic/EventSupplier.java @@ -10,7 +10,7 @@ import com.powsybl.commons.report.ReportNode; import com.powsybl.dynamicsimulation.EventModel; import com.powsybl.dynamicsimulation.EventModelsSupplier; -import com.powsybl.dynawaltz.models.events.EventDisconnectionBuilder; +import com.powsybl.dynawo.models.events.EventDisconnectionBuilder; import com.powsybl.iidm.network.Network; import com.powsybl.iidm.network.TwoSides; diff --git a/java/src/main/java/com/powsybl/python/dynamic/PythonDynamicModelsSupplier.java b/java/src/main/java/com/powsybl/python/dynamic/PythonDynamicModelsSupplier.java index 435f7263b..f50f6a978 100644 --- a/java/src/main/java/com/powsybl/python/dynamic/PythonDynamicModelsSupplier.java +++ b/java/src/main/java/com/powsybl/python/dynamic/PythonDynamicModelsSupplier.java @@ -10,10 +10,10 @@ import com.powsybl.commons.report.ReportNode; import com.powsybl.dynamicsimulation.DynamicModel; import com.powsybl.dynamicsimulation.DynamicModelsSupplier; -import com.powsybl.dynawaltz.models.automationsystems.overloadmanagments.DynamicOverloadManagementSystemBuilder; -import com.powsybl.dynawaltz.models.generators.SynchronizedGeneratorBuilder; -import com.powsybl.dynawaltz.models.loads.BaseLoadBuilder; -import com.powsybl.dynawaltz.models.loads.LoadOneTransformerBuilder; +import com.powsybl.dynawo.models.automationsystems.overloadmanagments.DynamicOverloadManagementSystemBuilder; +import com.powsybl.dynawo.models.generators.SynchronizedGeneratorBuilder; +import com.powsybl.dynawo.models.loads.BaseLoadBuilder; +import com.powsybl.dynawo.models.loads.LoadOneTransformerBuilder; import com.powsybl.iidm.network.Network; import com.powsybl.iidm.network.TwoSides; diff --git a/java/src/main/java/com/powsybl/python/network/ZipMemDataSource.java b/java/src/main/java/com/powsybl/python/network/ZipMemDataSource.java index 0533b2f02..4b0658281 100644 --- a/java/src/main/java/com/powsybl/python/network/ZipMemDataSource.java +++ b/java/src/main/java/com/powsybl/python/network/ZipMemDataSource.java @@ -82,4 +82,10 @@ public InputStream newInputStream(String fileName) { public Set listNames(String regex) { throw new UnsupportedOperationException(); } + + @Override + public boolean isDataExtension(String ext) { + return true; + } + } diff --git a/java/src/test/resources/nad.svg b/java/src/test/resources/nad.svg index 016d62b28..a438b2187 100644 --- a/java/src/test/resources/nad.svg +++ b/java/src/test/resources/nad.svg @@ -1,5 +1,5 @@ - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
VL1
- - - - - -
-
-
143.1 kV / 0.0°
-
-
- -
-
VL10
- - - - - -
-
-
12.6 kV / -15.1°
-
-
- -
-
VL11
- - - - - -
-
-
12.7 kV / -14.8°
-
-
- -
-
VL12
- - - - - -
-
-
12.7 kV / -15.1°
-
-
- -
-
VL13
- - - - - -
-
-
12.6 kV / -15.2°
-
-
- -
-
VL14
- - - - - -
-
-
12.4 kV / -16.0°
-
-
- -
-
VL2
- - - - - -
-
-
141.1 kV / -5.0°
-
-
- -
-
VL3
- - - - - -
-
-
136.3 kV / -12.7°
-
-
- -
-
VL4
- - - - - -
-
-
137.6 kV / -10.3°
-
-
- -
-
VL5
- - - - - -
-
-
137.7 kV / -8.8°
-
-
- -
-
VL6
- - - - - -
-
-
12.8 kV / -14.2°
-
-
- -
-
VL7
- - - - - -
-
-
14.9 kV / -13.4°
-
-
- -
-
VL8
- - - - - -
-
-
21.8 kV / -13.4°
-
-
- -
-
VL9
- - - - - -
-
-
12.7 kV / -14.9°
-
-
-
-
From 2f5c9f4c72fb44f03c7222d49a201f363e9dd8ab Mon Sep 17 00:00:00 2001 From: Leclerc Clement Date: Mon, 14 Oct 2024 17:56:35 +0200 Subject: [PATCH 102/120] Revert "Snapshot CI" This reverts commit 0c585769 Signed-off-by: Leclerc Clement --- java/pom.xml | 2 +- .../dynamic/adders/GeneratorSynchronousAdder.java | 2 +- .../python/datasource/InMemoryZipFileDataSource.java | 6 ------ .../com/powsybl/python/dynamic/CurveMappingSupplier.java | 2 +- .../java/com/powsybl/python/dynamic/EventSupplier.java | 2 +- .../python/dynamic/PythonDynamicModelsSupplier.java | 8 ++++---- .../java/com/powsybl/python/network/ZipMemDataSource.java | 6 ------ 7 files changed, 8 insertions(+), 20 deletions(-) diff --git a/java/pom.xml b/java/pom.xml index 92d1e923c..4eecba774 100644 --- a/java/pom.xml +++ b/java/pom.xml @@ -298,7 +298,7 @@
com.powsybl - powsybl-dynawo-simulation + powsybl-dynawaltz com.powsybl diff --git a/java/src/main/java/com/powsybl/dataframe/dynamic/adders/GeneratorSynchronousAdder.java b/java/src/main/java/com/powsybl/dataframe/dynamic/adders/GeneratorSynchronousAdder.java index 053e7e9fe..d97f85f17 100644 --- a/java/src/main/java/com/powsybl/dataframe/dynamic/adders/GeneratorSynchronousAdder.java +++ b/java/src/main/java/com/powsybl/dataframe/dynamic/adders/GeneratorSynchronousAdder.java @@ -11,7 +11,7 @@ import com.powsybl.dataframe.update.StringSeries; import com.powsybl.dataframe.update.UpdatingDataframe; import com.powsybl.dynamicsimulation.DynamicModel; -import com.powsybl.dynawo.models.generators.SynchronizedGeneratorBuilder; +import com.powsybl.dynawaltz.models.generators.SynchronizedGeneratorBuilder; import com.powsybl.iidm.network.Network; import com.powsybl.python.dynamic.PythonDynamicModelsSupplier; diff --git a/java/src/main/java/com/powsybl/python/datasource/InMemoryZipFileDataSource.java b/java/src/main/java/com/powsybl/python/datasource/InMemoryZipFileDataSource.java index 3ff314c6e..8d0b552f9 100644 --- a/java/src/main/java/com/powsybl/python/datasource/InMemoryZipFileDataSource.java +++ b/java/src/main/java/com/powsybl/python/datasource/InMemoryZipFileDataSource.java @@ -115,10 +115,4 @@ public Set listNames(String regex) throws IOException { } return names; } - - @Override - public boolean isDataExtension(String ext) { - return true; - } - } diff --git a/java/src/main/java/com/powsybl/python/dynamic/CurveMappingSupplier.java b/java/src/main/java/com/powsybl/python/dynamic/CurveMappingSupplier.java index 5a53b0922..d8dbfa249 100644 --- a/java/src/main/java/com/powsybl/python/dynamic/CurveMappingSupplier.java +++ b/java/src/main/java/com/powsybl/python/dynamic/CurveMappingSupplier.java @@ -10,7 +10,7 @@ import com.powsybl.commons.report.ReportNode; import com.powsybl.dynamicsimulation.Curve; import com.powsybl.dynamicsimulation.CurvesSupplier; -import com.powsybl.dynawo.curves.DynawoCurvesBuilder; +import com.powsybl.dynawaltz.curves.DynawoCurvesBuilder; import com.powsybl.iidm.network.Network; import java.util.Collection; diff --git a/java/src/main/java/com/powsybl/python/dynamic/EventSupplier.java b/java/src/main/java/com/powsybl/python/dynamic/EventSupplier.java index 01853be63..229be5447 100644 --- a/java/src/main/java/com/powsybl/python/dynamic/EventSupplier.java +++ b/java/src/main/java/com/powsybl/python/dynamic/EventSupplier.java @@ -10,7 +10,7 @@ import com.powsybl.commons.report.ReportNode; import com.powsybl.dynamicsimulation.EventModel; import com.powsybl.dynamicsimulation.EventModelsSupplier; -import com.powsybl.dynawo.models.events.EventDisconnectionBuilder; +import com.powsybl.dynawaltz.models.events.EventDisconnectionBuilder; import com.powsybl.iidm.network.Network; import com.powsybl.iidm.network.TwoSides; diff --git a/java/src/main/java/com/powsybl/python/dynamic/PythonDynamicModelsSupplier.java b/java/src/main/java/com/powsybl/python/dynamic/PythonDynamicModelsSupplier.java index f50f6a978..435f7263b 100644 --- a/java/src/main/java/com/powsybl/python/dynamic/PythonDynamicModelsSupplier.java +++ b/java/src/main/java/com/powsybl/python/dynamic/PythonDynamicModelsSupplier.java @@ -10,10 +10,10 @@ import com.powsybl.commons.report.ReportNode; import com.powsybl.dynamicsimulation.DynamicModel; import com.powsybl.dynamicsimulation.DynamicModelsSupplier; -import com.powsybl.dynawo.models.automationsystems.overloadmanagments.DynamicOverloadManagementSystemBuilder; -import com.powsybl.dynawo.models.generators.SynchronizedGeneratorBuilder; -import com.powsybl.dynawo.models.loads.BaseLoadBuilder; -import com.powsybl.dynawo.models.loads.LoadOneTransformerBuilder; +import com.powsybl.dynawaltz.models.automationsystems.overloadmanagments.DynamicOverloadManagementSystemBuilder; +import com.powsybl.dynawaltz.models.generators.SynchronizedGeneratorBuilder; +import com.powsybl.dynawaltz.models.loads.BaseLoadBuilder; +import com.powsybl.dynawaltz.models.loads.LoadOneTransformerBuilder; import com.powsybl.iidm.network.Network; import com.powsybl.iidm.network.TwoSides; diff --git a/java/src/main/java/com/powsybl/python/network/ZipMemDataSource.java b/java/src/main/java/com/powsybl/python/network/ZipMemDataSource.java index 4b0658281..0533b2f02 100644 --- a/java/src/main/java/com/powsybl/python/network/ZipMemDataSource.java +++ b/java/src/main/java/com/powsybl/python/network/ZipMemDataSource.java @@ -82,10 +82,4 @@ public InputStream newInputStream(String fileName) { public Set listNames(String regex) { throw new UnsupportedOperationException(); } - - @Override - public boolean isDataExtension(String ext) { - return true; - } - } From 1d188573f99d4bde85259ca7cf2772f137e74cdd Mon Sep 17 00:00:00 2001 From: Leclerc Clement Date: Mon, 14 Oct 2024 17:59:20 +0200 Subject: [PATCH 103/120] Revert "snapshot ci" This reverts commit bbabc6242a15d2045d37830d589ae7ca00643b1d. --- tests/test_security_analysis.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_security_analysis.py b/tests/test_security_analysis.py index aa5d6fea5..98e8cf5cb 100644 --- a/tests/test_security_analysis.py +++ b/tests/test_security_analysis.py @@ -241,8 +241,8 @@ def test_security_analysis_parameters(): def test_provider_parameters_names(): - assert pp.security.get_provider_parameters_names() == ['createResultExtension', 'contingencyPropagation', 'threadCount'] - assert pp.security.get_provider_parameters_names('OpenLoadFlow') == ['createResultExtension', 'contingencyPropagation', 'threadCount'] + assert pp.security.get_provider_parameters_names() == ['createResultExtension', 'contingencyPropagation'] + assert pp.security.get_provider_parameters_names('OpenLoadFlow') == ['createResultExtension', 'contingencyPropagation'] with pytest.raises(pp.PyPowsyblError, match='No security analysis provider for name \'unknown\''): pp.security.get_provider_parameters_names('unknown') From 1222c9599e0f94493e5f1ccf2c0f4a822f399103 Mon Sep 17 00:00:00 2001 From: Leclerc Clement Date: Mon, 14 Oct 2024 18:01:32 +0200 Subject: [PATCH 104/120] Revert "Snapshot CI" This reverts commit 0c585769 Signed-off-by: Leclerc Clement --- .github/workflows/dev-ci.yml | 36 +++++++++++++++++++++--------------- 1 file changed, 21 insertions(+), 15 deletions(-) diff --git a/.github/workflows/dev-ci.yml b/.github/workflows/dev-ci.yml index 7441d05da..7111331b3 100644 --- a/.github/workflows/dev-ci.yml +++ b/.github/workflows/dev-ci.yml @@ -1,22 +1,13 @@ name: Dev CI -#on: - # push: - # branches: - # on all branches except main where full build will be run - # - '*' - # - '!main' - - on: - schedule: - - cron: '0 0 */2 * *' # Exécute tous les deux jours à minuit - workflow_dispatch: # Permet l'exécution manuelle + pull_request: + jobs: manylinux_build: name: Build linux ${{ matrix.python.name }} wheel runs-on: ubuntu-latest - container: quay.io/pypa/manylinux2014_x86_64:2024-07-01-8dac23b + container: quay.io/pypa/manylinux2014_x86_64:2024-10-07-1887322 env: ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true strategy: @@ -190,6 +181,21 @@ jobs: cmake $GITHUB_WORKSPACE/cpp -DBUILD_PYPOWSYBL_JAVA=OFF -DPYPOWSYBL_JAVA_LIBRARY_DIR=$GITHUB_WORKSPACE/dist/lib -DPYPOWSYBL_JAVA_INCLUDE_DIR=$GITHUB_WORKSPACE/dist/include cmake --build . --config Release - - - + build: + name: Run SonarCloud analysis for Java code + runs-on: ubuntu-latest + + steps: + - name: Checkout sources + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + + - name: Set up JDK 17 + uses: actions/setup-java@387ac29b308b003ca37ba93a6cab5eb57c8f5f93 # v4.0.0 + with: + distribution: 'temurin' + java-version: '17' + + - name: Build with Maven (Ubuntu) + working-directory: ./java + run: > + mvn --batch-mode install From e0464f48644145b8593701a1f75ca6f9ad0ef253 Mon Sep 17 00:00:00 2001 From: Leclerc Clement Date: Mon, 14 Oct 2024 18:04:37 +0200 Subject: [PATCH 105/120] Revert "Snapshot CI" This reverts commit 0c585769 Signed-off-by: Leclerc Clement --- .github/workflows/dev-ci.yml | 11 + java/src/test/resources/nad.svg | 949 ++++++++++++++++++++++++++++++++ 2 files changed, 960 insertions(+) create mode 100644 java/src/test/resources/nad.svg diff --git a/.github/workflows/dev-ci.yml b/.github/workflows/dev-ci.yml index 7111331b3..0031cb847 100644 --- a/.github/workflows/dev-ci.yml +++ b/.github/workflows/dev-ci.yml @@ -199,3 +199,14 @@ jobs: working-directory: ./java run: > mvn --batch-mode install + + - name: Run SonarCloud analysis + working-directory: ./java + run: > + mvn --batch-mode -DskipTests sonar:sonar + -Dsonar.host.url=https://sonarcloud.io + -Dsonar.organization=powsybl-ci-github + -Dsonar.projectKey=powsybl_pypowsybl-java + env: + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + diff --git a/java/src/test/resources/nad.svg b/java/src/test/resources/nad.svg new file mode 100644 index 000000000..016d62b28 --- /dev/null +++ b/java/src/test/resources/nad.svg @@ -0,0 +1,949 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
VL1
+ + + + + +
+
+
143.1 kV / 0.0°
+
+
+ +
+
VL10
+ + + + + +
+
+
12.6 kV / -15.1°
+
+
+ +
+
VL11
+ + + + + +
+
+
12.7 kV / -14.8°
+
+
+ +
+
VL12
+ + + + + +
+
+
12.7 kV / -15.1°
+
+
+ +
+
VL13
+ + + + + +
+
+
12.6 kV / -15.2°
+
+
+ +
+
VL14
+ + + + + +
+
+
12.4 kV / -16.0°
+
+
+ +
+
VL2
+ + + + + +
+
+
141.1 kV / -5.0°
+
+
+ +
+
VL3
+ + + + + +
+
+
136.3 kV / -12.7°
+
+
+ +
+
VL4
+ + + + + +
+
+
137.6 kV / -10.3°
+
+
+ +
+
VL5
+ + + + + +
+
+
137.7 kV / -8.8°
+
+
+ +
+
VL6
+ + + + + +
+
+
12.8 kV / -14.2°
+
+
+ +
+
VL7
+ + + + + +
+
+
14.9 kV / -13.4°
+
+
+ +
+
VL8
+ + + + + +
+
+
21.8 kV / -13.4°
+
+
+ +
+
VL9
+ + + + + +
+
+
12.7 kV / -14.9°
+
+
+
+
From 2b2bd15e439712378e66836500966755b27a7813 Mon Sep 17 00:00:00 2001 From: Leclerc Clement Date: Tue, 15 Oct 2024 13:31:56 +0200 Subject: [PATCH 106/120] update with first PR review Signed-off-by: Leclerc Clement --- .github/workflows/snapshot-ci.yml | 70 ++++++++++--------------------- 1 file changed, 22 insertions(+), 48 deletions(-) diff --git a/.github/workflows/snapshot-ci.yml b/.github/workflows/snapshot-ci.yml index e44705ab6..36b9f81f3 100644 --- a/.github/workflows/snapshot-ci.yml +++ b/.github/workflows/snapshot-ci.yml @@ -6,7 +6,7 @@ on: - cron: '0 3 * * *' jobs: - buil_pypowsybl: + build_pypowsybl: name: Build ${{ matrix.config.name }} ${{ matrix.python.name }} wheel runs-on: ${{ matrix.config.os }} strategy: @@ -22,18 +22,14 @@ jobs: - { name: cp310, version: '3.10' } - { name: cp311, version: '3.11' } - { name: cp312, version: '3.12' } + - { name: cp313, version: '3.13' } + defaults: + run: + shell: bash - fail-fast: false steps: - #SETUP JDK - - name: Set up JDK 17 - uses: actions/setup-java@v4 - with: - distribution: 'temurin' - java-version: '17' - #SETUP PYTHON - name: Set up Python ${{ matrix.python.version }} uses: actions/setup-python@v4 @@ -52,7 +48,6 @@ jobs: #DEFINE SCRIPTS PATH - name: Set up script path - shell: bash run: | SCRIPTS_PATH="${GITHUB_WORKSPACE}/scripts/.github/workflows/scripts" if [[ "${{ matrix.config.name }}" == "windows" ]]; then @@ -61,7 +56,7 @@ jobs: echo "SCRIPTS_PATH=$SCRIPTS_PATH" >> $GITHUB_ENV #BUILD CORE - - name: Checkout core-sources + - name: Checkout core sources uses: actions/checkout@v4 with: repository: powsybl/powsybl-core @@ -70,13 +65,13 @@ jobs: - name: Build CORE run: mvn -batch-mode --no-transfer-progress clean install -DskipTests working-directory: ./powsybl-core - shell: bash - name: get CORE_VERSION run: echo "CORE_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_ENV working-directory: ./powsybl-core - shell: bash #CHECKOUT SCRIPT + #The script check_snapshot_branch.sh is located in the workflow folder of the pypowsybl repository + #It is necessary for checking out the integration branch if it exists (pypowsybl include) - name: checkout script uses: actions/checkout@v4 with: @@ -85,10 +80,9 @@ jobs: sparse-checkout-cone-mode: false path: scripts - #BUILD LOADFLOW - - name: Check LOADFLOW SNAPSHOT branch + #BUILD OPENLOADFLOW + - name: Checkout openloadflow sources run : ${{ env.SCRIPTS_PATH }}/check_snapshot_branch.sh "https://github.com/powsybl/powsybl-open-loadflow.git" ${{ env.CORE_VERSION }} - shell: bash - name: Checkout loadflow-sources uses: actions/checkout@v4 with: @@ -97,20 +91,17 @@ jobs: path: powsybl-open-loadflow - name: Change core version run: mvn versions:set-property -Dproperty=powsybl-core.version -DnewVersion=${{ env.CORE_VERSION}} -DgenerateBackupPoms=false - shell: bash working-directory: ./powsybl-open-loadflow - name: Build LOADFLOW - run: mvn -batch-mode --no-transfer-progress clean install -DskipTests + run: mvn -batch-mode --no-transfer-progress clean install working-directory: ./powsybl-open-loadflow - name: Get LOADFLOW_VERSION run: echo "LOADFLOW_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_ENV working-directory: ./powsybl-open-loadflow - shell: bash #BUILD DIAGRAM - - name: Check for DIAGRAM SNAPSHOT branch + - name: Checkout diagram sources run : ${{ env.SCRIPTS_PATH }}/check_snapshot_branch.sh "https://github.com/powsybl/powsybl-diagram.git" ${{ env.CORE_VERSION }} - shell: bash - name: Checkout diagram-sources uses: actions/checkout@v4 with: @@ -120,19 +111,16 @@ jobs: - name: Change core version run: mvn versions:set-property -Dproperty=powsybl-core.version -DnewVersion=${{ env.CORE_VERSION}} -DgenerateBackupPoms=false working-directory: ./powsybl-diagram - shell: bash - name: Build DIAGRAM - run: mvn -batch-mode --no-transfer-progress clean install -DskipTests + run: mvn -batch-mode --no-transfer-progress clean install working-directory: ./powsybl-diagram - name: Get DIAGRAM_VERSION version run: echo "DIAGRAM_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_ENV working-directory: ./powsybl-diagram - shell: bash #BUILD ENTSOE - - name: Check for ENTSOE SNAPSHOT branch + - name: Checkout entsoe sources run : ${{ env.SCRIPTS_PATH }}/check_snapshot_branch.sh "https://github.com/powsybl/powsybl-entsoe.git" ${{ env.CORE_VERSION }} - shell: bash - name: Checkout entsoe-sources uses: actions/checkout@v4 with: @@ -144,19 +132,16 @@ jobs: mvn versions:set-property -Dproperty=powsybl.core.version -DnewVersion=${{ env.CORE_VERSION}} -DgenerateBackupPoms=false mvn versions:set-property -Dproperty=powsyblopenloadflow.version -DnewVersion=${{ env.LOADFLOW_VERSION}} -DgenerateBackupPoms=false working-directory: ./powsybl-enstoe - shell: bash - name: Build ENTSOE - run: mvn -batch-mode --no-transfer-progress clean install -DskipTests + run: mvn -batch-mode --no-transfer-progress clean install working-directory: ./powsybl-enstoe - name: Get ENTSOE_VERSION run: echo "ENTSOE_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_ENV working-directory: ./powsybl-enstoe - shell: bash #BUILD OPENRAO - - name: Check OPENRAO SNAPSHOT branch + - name: Checkout openrao sources run : ${{ env.SCRIPTS_PATH }}/check_snapshot_branch.sh "https://github.com/powsybl/powsybl-open-rao.git" ${{ env.CORE_VERSION }} - shell: bash - name: Checkout open-rao-sources uses: actions/checkout@v4 with: @@ -169,19 +154,16 @@ jobs: mvn versions:set-property -Dproperty=powsybl.entsoe.version -DnewVersion=${{ env.ENTSOE_VERSION}} -DgenerateBackupPoms=false mvn versions:set-property -Dproperty=powsybl.openloadflow.version -DnewVersion=${{ env.LOADFLOW_VERSION}} -DgenerateBackupPoms=false working-directory: ./powsybl-openrao - shell: bash - name: Build OPENRAO - run: mvn -batch-mode --no-transfer-progress clean install -DskipTests + run: mvn -batch-mode --no-transfer-progress clean install working-directory: ./powsybl-openrao - name: Get OPENRAO_VERSION run: echo "OPENRAO_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_ENV working-directory: ./powsybl-openrao - shell: bash #BUILD DYNAWO - - name: Check for DYNAWO SNAPSHOT branch + - name: Checkout dynawo sources run: ${{ env.SCRIPTS_PATH }}/check_snapshot_branch.sh "https://github.com/powsybl/powsybl-dynawo.git" ${{ env.CORE_VERSION }} - shell: bash - name: Checkout dynawo-sources uses: actions/checkout@v4 with: @@ -191,17 +173,15 @@ jobs: - name: Change core version run: mvn versions:set-property -Dproperty=powsybl-core.version -DnewVersion=${{ env.CORE_VERSION}} -DgenerateBackupPoms=false working-directory: ./powsybl-dynawo - shell: bash - name: Build DYNAWO - run: mvn -batch-mode --no-transfer-progress clean install -DskipTests + run: mvn -batch-mode --no-transfer-progress clean install working-directory: ./powsybl-dynawo - name: Get DYNAWO_VERSION run: echo "DYNAWO_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_ENV working-directory: ./powsybl-dynawo - shell: bash #CHECKOUT_PYPOWSYBL_DEPENCIES - - name: Checkout powsybl-dependencies + - name: Checkout powsybl-dependencies sources uses: actions/checkout@v4 with: repository: powsybl/powsybl-dependencies @@ -210,11 +190,9 @@ jobs: - name: Get DEPENDENCIES_VERSION run: echo "DEPENDENCIES_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_ENV working-directory: ./powsybl-dependencies - shell: bash #UPDATE/INSTALL_PYPOWSYBL_DEPENCIES - name: Update dependencies versions - shell: bash run: | mvn versions:set-property -Dproperty=powsybl-open-loadflow.version -DnewVersion=$LOADFLOW_VERSION -DgenerateBackupPoms=false mvn versions:set-property -Dproperty=powsybl-core.version -DnewVersion=$CORE_VERSION -DgenerateBackupPoms=false @@ -225,14 +203,12 @@ jobs: working-directory: ./powsybl-dependencies - name: Install powsybl-dependencies - run: mvn -batch-mode --no-transfer-progress clean install -DskipTests + run: mvn -batch-mode --no-transfer-progress clean install working-directory: ./powsybl-dependencies - shell: bash #BUILD PYPOWSYBL - - name: Check PYPOWSYBL SNAPSHOT branch + - name: Checkout pypowsybl sources run: ${{ env.SCRIPTS_PATH }}/check_snapshot_branch.sh "https://github.com/powsybl/pypowsybl.git" ${{ env.CORE_VERSION }} - shell: bash - name: Checkout pypowsybl uses: actions/checkout@v4 with: @@ -241,7 +217,6 @@ jobs: path: pypowsybl submodules: true - name: update java/pom.xml - shell: bash run: mvn versions:set-property -Dproperty=powsybl-dependencies.version -DnewVersion=$DEPENDENCIES_VERSION -DgenerateBackupPoms=false working-directory: ./pypowsybl/java - name: Install dependencies @@ -251,7 +226,6 @@ jobs: run: python3 setup.py bdist_wheel working-directory: ./pypowsybl - name: Install wheel - shell: bash run: python -m pip install dist/*.whl --user working-directory: ./pypowsybl - name: check pypowsybl versions From 89f16d710b3ee0fa06f357e541aab6d0328d9df9 Mon Sep 17 00:00:00 2001 From: Leclerc Clement Date: Tue, 15 Oct 2024 14:19:12 +0200 Subject: [PATCH 107/120] update with first PR review without python 3.13 Signed-off-by: Leclerc Clement --- .github/workflows/snapshot-ci.yml | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/.github/workflows/snapshot-ci.yml b/.github/workflows/snapshot-ci.yml index 36b9f81f3..a1955185a 100644 --- a/.github/workflows/snapshot-ci.yml +++ b/.github/workflows/snapshot-ci.yml @@ -22,12 +22,11 @@ jobs: - { name: cp310, version: '3.10' } - { name: cp311, version: '3.11' } - { name: cp312, version: '3.12' } - - { name: cp313, version: '3.13' } + fail-fast: false defaults: run: shell: bash - steps: #SETUP PYTHON @@ -72,7 +71,7 @@ jobs: #CHECKOUT SCRIPT #The script check_snapshot_branch.sh is located in the workflow folder of the pypowsybl repository #It is necessary for checking out the integration branch if it exists (pypowsybl include) - - name: checkout script + - name: Checkout script uses: actions/checkout@v4 with: sparse-checkout: | @@ -81,9 +80,9 @@ jobs: path: scripts #BUILD OPENLOADFLOW - - name: Checkout openloadflow sources + - name: Checking for openloadflow snapshot branch run : ${{ env.SCRIPTS_PATH }}/check_snapshot_branch.sh "https://github.com/powsybl/powsybl-open-loadflow.git" ${{ env.CORE_VERSION }} - - name: Checkout loadflow-sources + - name: Checkout openloadflow sources uses: actions/checkout@v4 with: repository: powsybl/powsybl-open-loadflow @@ -100,9 +99,9 @@ jobs: working-directory: ./powsybl-open-loadflow #BUILD DIAGRAM - - name: Checkout diagram sources + - name: Checking for diagram snapshot branch run : ${{ env.SCRIPTS_PATH }}/check_snapshot_branch.sh "https://github.com/powsybl/powsybl-diagram.git" ${{ env.CORE_VERSION }} - - name: Checkout diagram-sources + - name: Checkout diagram sources uses: actions/checkout@v4 with: repository: powsybl/powsybl-diagram @@ -119,9 +118,9 @@ jobs: working-directory: ./powsybl-diagram #BUILD ENTSOE - - name: Checkout entsoe sources + - name: Checking for entsoe snapshot branch run : ${{ env.SCRIPTS_PATH }}/check_snapshot_branch.sh "https://github.com/powsybl/powsybl-entsoe.git" ${{ env.CORE_VERSION }} - - name: Checkout entsoe-sources + - name: Checkout entsoe sources uses: actions/checkout@v4 with: repository: powsybl/powsybl-entsoe @@ -140,9 +139,9 @@ jobs: working-directory: ./powsybl-enstoe #BUILD OPENRAO - - name: Checkout openrao sources + - name: Checking for openrao snapshot branch run : ${{ env.SCRIPTS_PATH }}/check_snapshot_branch.sh "https://github.com/powsybl/powsybl-open-rao.git" ${{ env.CORE_VERSION }} - - name: Checkout open-rao-sources + - name: Checkout openrao sources uses: actions/checkout@v4 with: repository: powsybl/powsybl-open-rao @@ -162,9 +161,9 @@ jobs: working-directory: ./powsybl-openrao #BUILD DYNAWO - - name: Checkout dynawo sources + - name: Checking for dynawo snapshot branch run: ${{ env.SCRIPTS_PATH }}/check_snapshot_branch.sh "https://github.com/powsybl/powsybl-dynawo.git" ${{ env.CORE_VERSION }} - - name: Checkout dynawo-sources + - name: Checkout dynawo sources uses: actions/checkout@v4 with: repository: powsybl/powsybl-dynawo @@ -207,7 +206,7 @@ jobs: working-directory: ./powsybl-dependencies #BUILD PYPOWSYBL - - name: Checkout pypowsybl sources + - name: Checking dor pypowsybl snapshot branch run: ${{ env.SCRIPTS_PATH }}/check_snapshot_branch.sh "https://github.com/powsybl/pypowsybl.git" ${{ env.CORE_VERSION }} - name: Checkout pypowsybl uses: actions/checkout@v4 @@ -219,7 +218,7 @@ jobs: - name: update java/pom.xml run: mvn versions:set-property -Dproperty=powsybl-dependencies.version -DnewVersion=$DEPENDENCIES_VERSION -DgenerateBackupPoms=false working-directory: ./pypowsybl/java - - name: Install dependencies + - name: Install requirement.txt run: pip3 install -r requirements.txt working-directory: ./pypowsybl - name: Build wheel From f68599c6f787afbb4d4787a5015b85a264ba6a99 Mon Sep 17 00:00:00 2001 From: Leclerc Clement Date: Tue, 15 Oct 2024 15:24:00 +0200 Subject: [PATCH 108/120] update with first PR review without python 3.13 Signed-off-by: Leclerc Clement --- .github/workflows/snapshot-ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/snapshot-ci.yml b/.github/workflows/snapshot-ci.yml index a1955185a..6ea802359 100644 --- a/.github/workflows/snapshot-ci.yml +++ b/.github/workflows/snapshot-ci.yml @@ -12,10 +12,10 @@ jobs: strategy: matrix: config: - - { name: ubuntu, os: ubuntu-latest} - - { name: darwin, os: macos-12, macosx_deployment_target: "10.16", bdist_wheel_args: "--plat-name macosx-11.0-x86_64" } + #- { name: ubuntu, os: ubuntu-latest} + #- { name: darwin, os: macos-12, macosx_deployment_target: "10.16", bdist_wheel_args: "--plat-name macosx-11.0-x86_64" } - { name: darwin-arm64, os: macos-14, macosx_deployment_target: "11", bdist_wheel_args: "--plat-name macosx-11.0-arm64"} - - { name: windows, os: windows-2022} + #- { name: windows, os: windows-2022} python: - { name: cp38, version: '3.8' } - { name: cp39, version: '3.9' } From abed2db2ee7d4e86887c9fe0a95f4c09556d501d Mon Sep 17 00:00:00 2001 From: Leclerc Clement Date: Tue, 15 Oct 2024 15:26:07 +0200 Subject: [PATCH 109/120] update with first PR review without python 3.13 Signed-off-by: Leclerc Clement --- .github/workflows/snapshot-ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/snapshot-ci.yml b/.github/workflows/snapshot-ci.yml index 6ea802359..a1955185a 100644 --- a/.github/workflows/snapshot-ci.yml +++ b/.github/workflows/snapshot-ci.yml @@ -12,10 +12,10 @@ jobs: strategy: matrix: config: - #- { name: ubuntu, os: ubuntu-latest} - #- { name: darwin, os: macos-12, macosx_deployment_target: "10.16", bdist_wheel_args: "--plat-name macosx-11.0-x86_64" } + - { name: ubuntu, os: ubuntu-latest} + - { name: darwin, os: macos-12, macosx_deployment_target: "10.16", bdist_wheel_args: "--plat-name macosx-11.0-x86_64" } - { name: darwin-arm64, os: macos-14, macosx_deployment_target: "11", bdist_wheel_args: "--plat-name macosx-11.0-arm64"} - #- { name: windows, os: windows-2022} + - { name: windows, os: windows-2022} python: - { name: cp38, version: '3.8' } - { name: cp39, version: '3.9' } From 712f4ad132b52c435f87837c33a422f0b00261af Mon Sep 17 00:00:00 2001 From: Leclerc Clement Date: Tue, 15 Oct 2024 16:27:57 +0200 Subject: [PATCH 110/120] issues with graalvm@1.1.5 Signed-off-by: Leclerc Clement --- .github/workflows/snapshot-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/snapshot-ci.yml b/.github/workflows/snapshot-ci.yml index a1955185a..961b39470 100644 --- a/.github/workflows/snapshot-ci.yml +++ b/.github/workflows/snapshot-ci.yml @@ -39,7 +39,7 @@ jobs: #SETUP GRAALVM - name: Setup GraalVM - uses: graalvm/setup-graalvm@v1.1.5 + uses: graalvm/setup-graalvm@v1 with: java-version: '17' distribution: 'graalvm' From 595479cd48a108c4ee1e8f9d8510005091600f6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Leclerc?= Date: Tue, 15 Oct 2024 17:20:16 +0200 Subject: [PATCH 111/120] add slack notification Signed-off-by: Leclerc Clement --- .github/workflows/snapshot-ci.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/.github/workflows/snapshot-ci.yml b/.github/workflows/snapshot-ci.yml index 961b39470..04ecec7a9 100644 --- a/.github/workflows/snapshot-ci.yml +++ b/.github/workflows/snapshot-ci.yml @@ -238,3 +238,26 @@ jobs: with: name: pypowsybl-wheel-${{ matrix.config.name }}-${{ matrix.python.name }} path: dist/*.whl + + #SLACK NOTIFICATION ON FAILURE + - name: Slack Notification + uses: 8398a7/action-slack@v3 + if: failure() + with: + status: ${{ job.status }} + fields: repo,message,action,eventName,ref,workflow + text: | + :x: *Échec du workflow ${{ github.workflow }} + + *Workflow:* ${{ github.workflow }} + *Job:* ${{ github.job }} + *Étape:* ${{ github.action }} + + *Détails:* + • Repo: ${{ github.repository }} + • Branche: ${{ github.ref_name }} + • Événement déclencheur: ${{ github.event_name }} + + [Voir les logs](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}) + env: + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} \ No newline at end of file From aa5c286d3613402ab94353c3585172a061e37aa7 Mon Sep 17 00:00:00 2001 From: Leclerc Clement Date: Tue, 19 Nov 2024 08:40:33 +0100 Subject: [PATCH 112/120] add build status report Signed-off-by: Leclerc Clement --- .github/workflows/scripts/build_module.sh | 16 +++++++ .github/workflows/snapshot-ci.yml | 51 ++++++++++++++++++++--- 2 files changed, 62 insertions(+), 5 deletions(-) create mode 100644 .github/workflows/scripts/build_module.sh diff --git a/.github/workflows/scripts/build_module.sh b/.github/workflows/scripts/build_module.sh new file mode 100644 index 000000000..1baa9b27b --- /dev/null +++ b/.github/workflows/scripts/build_module.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +MODULE_NAME=$1 +COMMAND=$2 + +echo "Building $MODULE_NAME..." +$COMMAND +BUILD_EXIT=$? + +if [ $BUILD_EXIT -ne 0 ]; then + echo "❌ $MODULE_NAME build FAILED (exit code: $BUILD_EXIT) --> Céer une branch <$CORE_VERSION-SNAPSHOT>" >> $BUILD_STATUS +else + echo "✅ $MODULE_NAME build SUCCESS" >> $BUILD_STATUS +fi + +exit $BUILD_EXIT \ No newline at end of file diff --git a/.github/workflows/snapshot-ci.yml b/.github/workflows/snapshot-ci.yml index 04ecec7a9..4d563a02e 100644 --- a/.github/workflows/snapshot-ci.yml +++ b/.github/workflows/snapshot-ci.yml @@ -5,6 +5,10 @@ on: schedule: - cron: '0 3 * * *' +env: + BUILD_STATUS: ${{ github.workspace }}/build_status.txt + + jobs: build_pypowsybl: name: Build ${{ matrix.config.name }} ${{ matrix.python.name }} wheel @@ -29,6 +33,7 @@ jobs: steps: + #SETUP PYTHON - name: Set up Python ${{ matrix.python.version }} uses: actions/setup-python@v4 @@ -45,6 +50,14 @@ jobs: distribution: 'graalvm' github-token: ${{ secrets.GITHUB_TOKEN }} + #INITIALISE REPORT + - name: Initialize test summary + run: | + if [[ "${{ matrix.config.name }}" == "windows" ]]; then + mkdir -p $(dirname "$BUILD_STATUS") + fi + touch "$BUILD_STATUS" + #DEFINE SCRIPTS PATH - name: Set up script path run: | @@ -92,7 +105,10 @@ jobs: run: mvn versions:set-property -Dproperty=powsybl-core.version -DnewVersion=${{ env.CORE_VERSION}} -DgenerateBackupPoms=false working-directory: ./powsybl-open-loadflow - name: Build LOADFLOW - run: mvn -batch-mode --no-transfer-progress clean install + continue-on-error: true + run: | + chmod +x ${{ env.SCRIPTS_PATH }}/build_module.sh + ${{ env.SCRIPTS_PATH }}/build_module.sh "LOADFLOW" "mvn -batch-mode --no-transfer-progress clean install -Dmaven.test.failure.ignore=true" working-directory: ./powsybl-open-loadflow - name: Get LOADFLOW_VERSION run: echo "LOADFLOW_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_ENV @@ -111,7 +127,10 @@ jobs: run: mvn versions:set-property -Dproperty=powsybl-core.version -DnewVersion=${{ env.CORE_VERSION}} -DgenerateBackupPoms=false working-directory: ./powsybl-diagram - name: Build DIAGRAM - run: mvn -batch-mode --no-transfer-progress clean install + continue-on-error: true + run: | + chmod +x ${{ env.SCRIPTS_PATH }}/build_module.sh + ${{ env.SCRIPTS_PATH }}/build_module.sh "DIAGRAM" "mvn -batch-mode --no-transfer-progress clean install -Dmaven.test.failure.ignore=true" working-directory: ./powsybl-diagram - name: Get DIAGRAM_VERSION version run: echo "DIAGRAM_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_ENV @@ -132,7 +151,10 @@ jobs: mvn versions:set-property -Dproperty=powsyblopenloadflow.version -DnewVersion=${{ env.LOADFLOW_VERSION}} -DgenerateBackupPoms=false working-directory: ./powsybl-enstoe - name: Build ENTSOE - run: mvn -batch-mode --no-transfer-progress clean install + continue-on-error: true + run: | + chmod +x ${{ env.SCRIPTS_PATH }}/build_module.sh + ${{ env.SCRIPTS_PATH }}/build_module.sh "ENTSOE" "mvn -batch-mode --no-transfer-progress clean install -Dmaven.test.failure.ignore=true" working-directory: ./powsybl-enstoe - name: Get ENTSOE_VERSION run: echo "ENTSOE_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_ENV @@ -154,7 +176,10 @@ jobs: mvn versions:set-property -Dproperty=powsybl.openloadflow.version -DnewVersion=${{ env.LOADFLOW_VERSION}} -DgenerateBackupPoms=false working-directory: ./powsybl-openrao - name: Build OPENRAO - run: mvn -batch-mode --no-transfer-progress clean install + continue-on-error: true + run: | + chmod +x ${{ env.SCRIPTS_PATH }}/build_module.sh + ${{ env.SCRIPTS_PATH }}/build_module.sh "OPENRAO" "mvn -batch-mode --no-transfer-progress clean install -Dmaven.test.failure.ignore=true" working-directory: ./powsybl-openrao - name: Get OPENRAO_VERSION run: echo "OPENRAO_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_ENV @@ -173,7 +198,10 @@ jobs: run: mvn versions:set-property -Dproperty=powsybl-core.version -DnewVersion=${{ env.CORE_VERSION}} -DgenerateBackupPoms=false working-directory: ./powsybl-dynawo - name: Build DYNAWO - run: mvn -batch-mode --no-transfer-progress clean install + continue-on-error: true + run: | + chmod +x ${{ env.SCRIPTS_PATH }}/build_module.sh + ${{ env.SCRIPTS_PATH }}/build_module.sh "DYNAWO" "mvn -batch-mode --no-transfer-progress clean install -Dmaven.test.failure.ignore=true" working-directory: ./powsybl-dynawo - name: Get DYNAWO_VERSION run: echo "DYNAWO_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_ENV @@ -202,6 +230,7 @@ jobs: working-directory: ./powsybl-dependencies - name: Install powsybl-dependencies + continue-on-error: true run: mvn -batch-mode --no-transfer-progress clean install working-directory: ./powsybl-dependencies @@ -238,6 +267,18 @@ jobs: with: name: pypowsybl-wheel-${{ matrix.config.name }}-${{ matrix.python.name }} path: dist/*.whl + - name: Upload wheel + uses: actions/upload-artifact@v3 + with: + name: pypowsybl-wheel-${{ matrix.config.name }}-${{ matrix.python.name }} + path: dist/*.whl + + - name: Show Build Status Report + if: always() + run: | + echo "=== BUILD STATUS REPORT ===" + cat $BUILD_STATUS + echo "==========================" #SLACK NOTIFICATION ON FAILURE - name: Slack Notification From 48d6918a5cbf3b865af8c07daee1116bf1f78e3f Mon Sep 17 00:00:00 2001 From: Leclerc Clement Date: Tue, 19 Nov 2024 11:30:30 +0100 Subject: [PATCH 113/120] change slack notification Signed-off-by: Leclerc Clement --- .github/workflows/scripts/build_module.sh | 2 +- .github/workflows/snapshot-ci.yml | 67 +++++++++++++---------- 2 files changed, 40 insertions(+), 29 deletions(-) diff --git a/.github/workflows/scripts/build_module.sh b/.github/workflows/scripts/build_module.sh index 1baa9b27b..7c1673ed9 100644 --- a/.github/workflows/scripts/build_module.sh +++ b/.github/workflows/scripts/build_module.sh @@ -8,7 +8,7 @@ $COMMAND BUILD_EXIT=$? if [ $BUILD_EXIT -ne 0 ]; then - echo "❌ $MODULE_NAME build FAILED (exit code: $BUILD_EXIT) --> Céer une branch <$CORE_VERSION-SNAPSHOT>" >> $BUILD_STATUS + echo "❌ $MODULE_NAME build FAILED" >> $BUILD_STATUS else echo "✅ $MODULE_NAME build SUCCESS" >> $BUILD_STATUS fi diff --git a/.github/workflows/snapshot-ci.yml b/.github/workflows/snapshot-ci.yml index 4d563a02e..b6d968586 100644 --- a/.github/workflows/snapshot-ci.yml +++ b/.github/workflows/snapshot-ci.yml @@ -13,19 +13,17 @@ jobs: build_pypowsybl: name: Build ${{ matrix.config.name }} ${{ matrix.python.name }} wheel runs-on: ${{ matrix.config.os }} + outputs: + matrix_result: ${{ steps.set_result.outputs.result }} + build_status: ${{ steps.build_status.outputs.BUILD_STATUS_CONTENT }} strategy: matrix: config: - { name: ubuntu, os: ubuntu-latest} - { name: darwin, os: macos-12, macosx_deployment_target: "10.16", bdist_wheel_args: "--plat-name macosx-11.0-x86_64" } - - { name: darwin-arm64, os: macos-14, macosx_deployment_target: "11", bdist_wheel_args: "--plat-name macosx-11.0-arm64"} - - { name: windows, os: windows-2022} python: - { name: cp38, version: '3.8' } - { name: cp39, version: '3.9' } - - { name: cp310, version: '3.10' } - - { name: cp311, version: '3.11' } - - { name: cp312, version: '3.12' } fail-fast: false defaults: run: @@ -33,7 +31,6 @@ jobs: steps: - #SETUP PYTHON - name: Set up Python ${{ matrix.python.version }} uses: actions/setup-python@v4 @@ -273,32 +270,46 @@ jobs: name: pypowsybl-wheel-${{ matrix.config.name }}-${{ matrix.python.name }} path: dist/*.whl + - name: Record Job Name + if: failure() + run: | + echo "Job en échec : Build ${{ matrix.config.name }} ${{ matrix.python.name }} wheel" >> $BUILD_STATUS + - name: Show Build Status Report if: always() run: | + echo "BUILD_STATUS_CONTENT=$(cat $BUILD_STATUS)" >> $GITHUB_OUTPUT echo "=== BUILD STATUS REPORT ===" cat $BUILD_STATUS echo "==========================" - #SLACK NOTIFICATION ON FAILURE - - name: Slack Notification - uses: 8398a7/action-slack@v3 - if: failure() - with: - status: ${{ job.status }} - fields: repo,message,action,eventName,ref,workflow - text: | - :x: *Échec du workflow ${{ github.workflow }} - - *Workflow:* ${{ github.workflow }} - *Job:* ${{ github.job }} - *Étape:* ${{ github.action }} - - *Détails:* - • Repo: ${{ github.repository }} - • Branche: ${{ github.ref_name }} - • Événement déclencheur: ${{ github.event_name }} - - [Voir les logs](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}) - env: - SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} \ No newline at end of file + - name: Read Build Status + if: always() + id: build_status + run: | + echo "BUILD_STATUS_CONTENT<> $GITHUB_OUTPUT + cat $BUILD_STATUS >> $GITHUB_OUTPUT + echo "EOF" >> $GITHUB_OUTPUT + + + #SLACK NOTIFICATION ON FAILURE + notify_slack: + needs: build_pypowsybl + runs-on: ubuntu-latest + if: failure() + steps: + - name: Send Slack Notification + uses: 8398a7/action-slack@v3 + with: + status: ${{ job.status }} + text: | + :x: *Échec du workflow ${{ github.workflow }}* + + *Détails des échecs:* + ``` + ${{ needs.build_pypowsybl.outputs.build_status }} + ``` + + Voir les logs : https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} + env: + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} \ No newline at end of file From 2a2f1e6fec18123444cf922cddd011b6273ec586 Mon Sep 17 00:00:00 2001 From: Leclerc Clement Date: Tue, 19 Nov 2024 15:28:05 +0100 Subject: [PATCH 114/120] add python and os version Signed-off-by: Leclerc Clement --- .github/workflows/snapshot-ci.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/snapshot-ci.yml b/.github/workflows/snapshot-ci.yml index b6d968586..bd0f4ee0a 100644 --- a/.github/workflows/snapshot-ci.yml +++ b/.github/workflows/snapshot-ci.yml @@ -21,9 +21,14 @@ jobs: config: - { name: ubuntu, os: ubuntu-latest} - { name: darwin, os: macos-12, macosx_deployment_target: "10.16", bdist_wheel_args: "--plat-name macosx-11.0-x86_64" } + - { name: darwin-arm64, os: macos-14, macosx_deployment_target: "11", bdist_wheel_args: "--plat-name macosx-11.0-arm64" } + - { name: windows, os: windows-2022 } python: - { name: cp38, version: '3.8' } - { name: cp39, version: '3.9' } + - { name: cp310, version: '3.10' } + - { name: cp311, version: '3.11' } + - { name: cp312, version: '3.12' } fail-fast: false defaults: run: From 0909fe17bdcf4042776bef2e1773f93731a49e90 Mon Sep 17 00:00:00 2001 From: Leclerc Clement Date: Tue, 19 Nov 2024 15:41:29 +0100 Subject: [PATCH 115/120] change slack message language Signed-off-by: Leclerc Clement --- .github/workflows/snapshot-ci.yml | 36 +++++++++++++++---------------- 1 file changed, 17 insertions(+), 19 deletions(-) diff --git a/.github/workflows/snapshot-ci.yml b/.github/workflows/snapshot-ci.yml index bd0f4ee0a..aced19574 100644 --- a/.github/workflows/snapshot-ci.yml +++ b/.github/workflows/snapshot-ci.yml @@ -299,22 +299,20 @@ jobs: #SLACK NOTIFICATION ON FAILURE notify_slack: - needs: build_pypowsybl - runs-on: ubuntu-latest - if: failure() - steps: - - name: Send Slack Notification - uses: 8398a7/action-slack@v3 - with: - status: ${{ job.status }} - text: | - :x: *Échec du workflow ${{ github.workflow }}* - - *Détails des échecs:* - ``` - ${{ needs.build_pypowsybl.outputs.build_status }} - ``` - - Voir les logs : https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} - env: - SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} \ No newline at end of file + needs: build_pypowsybl + runs-on: ubuntu-latest + if: failure() + steps: + - name: Send Slack Notification + uses: 8398a7/action-slack@v3 + with: + status: ${{ job.status }} + text: | + :x: *Failed workflow ${{ github.workflow }}* + *Failure details:* + ``` + ${{ needs.build_pypowsybl.outputs.build_status }} + ``` + See logs: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} + env: + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} \ No newline at end of file From c9bae64605b56ded3417c728be5f706d07a0f71d Mon Sep 17 00:00:00 2001 From: Leclerc Clement Date: Mon, 2 Dec 2024 14:04:19 +0100 Subject: [PATCH 116/120] delete mvn skip test failure Signed-off-by: Leclerc Clement --- .github/workflows/snapshot-ci.yml | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/.github/workflows/snapshot-ci.yml b/.github/workflows/snapshot-ci.yml index aced19574..0c751b1ae 100644 --- a/.github/workflows/snapshot-ci.yml +++ b/.github/workflows/snapshot-ci.yml @@ -130,9 +130,7 @@ jobs: working-directory: ./powsybl-diagram - name: Build DIAGRAM continue-on-error: true - run: | - chmod +x ${{ env.SCRIPTS_PATH }}/build_module.sh - ${{ env.SCRIPTS_PATH }}/build_module.sh "DIAGRAM" "mvn -batch-mode --no-transfer-progress clean install -Dmaven.test.failure.ignore=true" + run: ${{ env.SCRIPTS_PATH }}/build_module.sh "DIAGRAM" "mvn -batch-mode --no-transfer-progress clean install" working-directory: ./powsybl-diagram - name: Get DIAGRAM_VERSION version run: echo "DIAGRAM_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_ENV @@ -154,9 +152,7 @@ jobs: working-directory: ./powsybl-enstoe - name: Build ENTSOE continue-on-error: true - run: | - chmod +x ${{ env.SCRIPTS_PATH }}/build_module.sh - ${{ env.SCRIPTS_PATH }}/build_module.sh "ENTSOE" "mvn -batch-mode --no-transfer-progress clean install -Dmaven.test.failure.ignore=true" + run: ${{ env.SCRIPTS_PATH }}/build_module.sh "ENTSOE" "mvn -batch-mode --no-transfer-progress clean install" working-directory: ./powsybl-enstoe - name: Get ENTSOE_VERSION run: echo "ENTSOE_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_ENV @@ -179,9 +175,7 @@ jobs: working-directory: ./powsybl-openrao - name: Build OPENRAO continue-on-error: true - run: | - chmod +x ${{ env.SCRIPTS_PATH }}/build_module.sh - ${{ env.SCRIPTS_PATH }}/build_module.sh "OPENRAO" "mvn -batch-mode --no-transfer-progress clean install -Dmaven.test.failure.ignore=true" + run: ${{ env.SCRIPTS_PATH }}/build_module.sh "OPENRAO" "mvn -batch-mode --no-transfer-progress clean install" working-directory: ./powsybl-openrao - name: Get OPENRAO_VERSION run: echo "OPENRAO_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_ENV @@ -201,9 +195,7 @@ jobs: working-directory: ./powsybl-dynawo - name: Build DYNAWO continue-on-error: true - run: | - chmod +x ${{ env.SCRIPTS_PATH }}/build_module.sh - ${{ env.SCRIPTS_PATH }}/build_module.sh "DYNAWO" "mvn -batch-mode --no-transfer-progress clean install -Dmaven.test.failure.ignore=true" + run: ${{ env.SCRIPTS_PATH }}/build_module.sh "DYNAWO" "mvn -batch-mode --no-transfer-progress clean install" working-directory: ./powsybl-dynawo - name: Get DYNAWO_VERSION run: echo "DYNAWO_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_ENV @@ -278,7 +270,7 @@ jobs: - name: Record Job Name if: failure() run: | - echo "Job en échec : Build ${{ matrix.config.name }} ${{ matrix.python.name }} wheel" >> $BUILD_STATUS + echo "Failed job : Build ${{ matrix.config.name }} ${{ matrix.python.name }} wheel" >> $BUILD_STATUS - name: Show Build Status Report if: always() From 01db14e76d65be45fd29aea2b1594e707797cdfb Mon Sep 17 00:00:00 2001 From: Leclerc Clement Date: Mon, 2 Dec 2024 15:09:31 +0100 Subject: [PATCH 117/120] build correction Signed-off-by: Leclerc Clement --- .github/workflows/scripts/build_module.sh | 0 .github/workflows/snapshot-ci.yml | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) mode change 100644 => 100755 .github/workflows/scripts/build_module.sh diff --git a/.github/workflows/scripts/build_module.sh b/.github/workflows/scripts/build_module.sh old mode 100644 new mode 100755 diff --git a/.github/workflows/snapshot-ci.yml b/.github/workflows/snapshot-ci.yml index 0c751b1ae..7d02352f2 100644 --- a/.github/workflows/snapshot-ci.yml +++ b/.github/workflows/snapshot-ci.yml @@ -110,7 +110,7 @@ jobs: continue-on-error: true run: | chmod +x ${{ env.SCRIPTS_PATH }}/build_module.sh - ${{ env.SCRIPTS_PATH }}/build_module.sh "LOADFLOW" "mvn -batch-mode --no-transfer-progress clean install -Dmaven.test.failure.ignore=true" + ${{ env.SCRIPTS_PATH }}/build_module.sh "LOADFLOW" "mvn -batch-mode --no-transfer-progress clean install" working-directory: ./powsybl-open-loadflow - name: Get LOADFLOW_VERSION run: echo "LOADFLOW_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_ENV From 89e350c2240b7da5ff7d6adb1ecb24dd125ea703 Mon Sep 17 00:00:00 2001 From: Leclerc Clement Date: Mon, 2 Dec 2024 16:33:44 +0100 Subject: [PATCH 118/120] build correction Signed-off-by: Leclerc Clement --- .github/workflows/snapshot-ci.yml | 29 +++++++---------------------- 1 file changed, 7 insertions(+), 22 deletions(-) diff --git a/.github/workflows/snapshot-ci.yml b/.github/workflows/snapshot-ci.yml index 7d02352f2..569f58083 100644 --- a/.github/workflows/snapshot-ci.yml +++ b/.github/workflows/snapshot-ci.yml @@ -8,13 +8,11 @@ on: env: BUILD_STATUS: ${{ github.workspace }}/build_status.txt - jobs: build_pypowsybl: name: Build ${{ matrix.config.name }} ${{ matrix.python.name }} wheel runs-on: ${{ matrix.config.os }} outputs: - matrix_result: ${{ steps.set_result.outputs.result }} build_status: ${{ steps.build_status.outputs.BUILD_STATUS_CONTENT }} strategy: matrix: @@ -52,14 +50,6 @@ jobs: distribution: 'graalvm' github-token: ${{ secrets.GITHUB_TOKEN }} - #INITIALISE REPORT - - name: Initialize test summary - run: | - if [[ "${{ matrix.config.name }}" == "windows" ]]; then - mkdir -p $(dirname "$BUILD_STATUS") - fi - touch "$BUILD_STATUS" - #DEFINE SCRIPTS PATH - name: Set up script path run: | @@ -144,19 +134,19 @@ jobs: with: repository: powsybl/powsybl-entsoe ref: ${{ env.SNAPSHOT_BRANCH }} - path: powsybl-enstoe + path: powsybl-entsoe - name: Change core/loadflow version run: | - mvn versions:set-property -Dproperty=powsybl.core.version -DnewVersion=${{ env.CORE_VERSION}} -DgenerateBackupPoms=false + mvn versions:set-property -Dproperty=powsyblcore.version -DnewVersion=${{ env.CORE_VERSION}} -DgenerateBackupPoms=false mvn versions:set-property -Dproperty=powsyblopenloadflow.version -DnewVersion=${{ env.LOADFLOW_VERSION}} -DgenerateBackupPoms=false - working-directory: ./powsybl-enstoe + working-directory: ./powsybl-entsoe - name: Build ENTSOE continue-on-error: true run: ${{ env.SCRIPTS_PATH }}/build_module.sh "ENTSOE" "mvn -batch-mode --no-transfer-progress clean install" - working-directory: ./powsybl-enstoe + working-directory: ./powsybl-entsoe - name: Get ENTSOE_VERSION run: echo "ENTSOE_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_ENV - working-directory: ./powsybl-enstoe + working-directory: ./powsybl-entsoe #BUILD OPENRAO - name: Checking for openrao snapshot branch @@ -272,18 +262,13 @@ jobs: run: | echo "Failed job : Build ${{ matrix.config.name }} ${{ matrix.python.name }} wheel" >> $BUILD_STATUS - - name: Show Build Status Report + - name: Read Build Status if: always() + id: build_status run: | - echo "BUILD_STATUS_CONTENT=$(cat $BUILD_STATUS)" >> $GITHUB_OUTPUT echo "=== BUILD STATUS REPORT ===" cat $BUILD_STATUS echo "==========================" - - - name: Read Build Status - if: always() - id: build_status - run: | echo "BUILD_STATUS_CONTENT<> $GITHUB_OUTPUT cat $BUILD_STATUS >> $GITHUB_OUTPUT echo "EOF" >> $GITHUB_OUTPUT From 5870ec341ff47a02e3c01f5de738d15feb0de911 Mon Sep 17 00:00:00 2001 From: Geoffroy Jamgotchian Date: Mon, 16 Dec 2024 10:11:39 +0100 Subject: [PATCH 119/120] Fix Signed-off-by: Geoffroy Jamgotchian --- .github/workflows/snapshot-ci.yml | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/.github/workflows/snapshot-ci.yml b/.github/workflows/snapshot-ci.yml index f4dec4298..aa5a321ca 100644 --- a/.github/workflows/snapshot-ci.yml +++ b/.github/workflows/snapshot-ci.yml @@ -98,9 +98,7 @@ jobs: working-directory: ./powsybl-open-loadflow - name: Build LOADFLOW continue-on-error: true - run: | - chmod +x ${{ env.SCRIPTS_PATH }}/build_module.sh - ${{ env.SCRIPTS_PATH }}/build_module.sh "LOADFLOW" "mvn -batch-mode --no-transfer-progress clean install" + run: ${{ env.SCRIPTS_PATH }}/build_module.sh "LOADFLOW" "mvn -batch-mode --no-transfer-progress clean install" working-directory: ./powsybl-open-loadflow - name: Get LOADFLOW_VERSION run: echo "LOADFLOW_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_ENV @@ -247,16 +245,10 @@ jobs: working-directory: ./pypowsybl/tests run: pytest - name: Upload wheel - uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v4 with: name: pypowsybl-wheel-${{ matrix.config.name }}-${{ matrix.python.name }} path: dist/*.whl - - name: Upload wheel - uses: actions/upload-artifact@v3 - with: - name: pypowsybl-wheel-${{ matrix.config.name }}-${{ matrix.python.name }} - path: dist/*.whl - name: Record Job Name if: failure() From f29e599a6c97018cbeaf65094c3f341672627c13 Mon Sep 17 00:00:00 2001 From: Leclerc Clement Date: Mon, 16 Dec 2024 14:48:40 +0100 Subject: [PATCH 120/120] change output name Signed-off-by: Leclerc Clement --- .github/workflows/snapshot-ci.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/snapshot-ci.yml b/.github/workflows/snapshot-ci.yml index aa5a321ca..0b4f64dea 100644 --- a/.github/workflows/snapshot-ci.yml +++ b/.github/workflows/snapshot-ci.yml @@ -13,7 +13,8 @@ jobs: name: Build ${{ matrix.config.name }} ${{ matrix.python.name }} wheel runs-on: ${{ matrix.config.os }} outputs: - build_status: ${{ steps.build_status.outputs.BUILD_STATUS_CONTENT }} + build_status_output: ${{ steps.build_status_step.outputs.build_status_output }} #Output job with build_status.txt content created in Read Build Status step + strategy: matrix: config: @@ -257,12 +258,12 @@ jobs: - name: Read Build Status if: always() - id: build_status + id: build_status_step run: | echo "=== BUILD STATUS REPORT ===" cat $BUILD_STATUS echo "==========================" - echo "BUILD_STATUS_CONTENT<> $GITHUB_OUTPUT + echo "build_status_output<> $GITHUB_OUTPUT cat $BUILD_STATUS >> $GITHUB_OUTPUT echo "EOF" >> $GITHUB_OUTPUT @@ -281,8 +282,8 @@ jobs: :x: *Failed workflow ${{ github.workflow }}* *Failure details:* ``` - ${{ needs.build_pypowsybl.outputs.build_status }} + ${{ needs.build_pypowsybl.outputs.build_status_output }} ``` See logs: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} env: - SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} \ No newline at end of file + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}