From 67e9e9ea41c13ad68d75c9e6f302b755f1c778ae Mon Sep 17 00:00:00 2001 From: Juliette-Gerbaux <130555142+Juliette-Gerbaux@users.noreply.github.com> Date: Thu, 5 Dec 2024 16:21:42 +0100 Subject: [PATCH 1/5] Create ci.yml --- .github/workflows/ci.yml | 53 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..4bcd2e4 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,53 @@ +name: CI +on: + push: + branches: + - "**" + +jobs: + ci: + runs-on: ubuntu-20.04 + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: 3.11 + cache: pip + cache-dependency-path: | + requirements.txt + requirements-dev.txt + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt -r requirements-dev.txt + + - name: Check imports sort order + uses: isort/isort-action@v1 + with: + sort-paths: src, tests + configuration: --profile black --check-only --diff + requirements-files: "requirements.txt requirements-dev.txt" + + - name: Check formatting + uses: psf/black@stable + with: + # Version of Black should match the versions set in `requirements-dev.txt` + version: "~=23.7.0" + options: --check --diff + + - name: Check typing + run: | + python -m mypy + + - name: Test + run: | + pytest --cov antarest --cov-report xml + + - name: Archive code coverage results + uses: actions/upload-artifact@v3 + with: + name: python-code-coverage-report + path: coverage.xml From f8fc1827f94a6ed50fb16ab191e7f8e6a0c2416f Mon Sep 17 00:00:00 2001 From: Juliette-Gerbaux <130555142+Juliette-Gerbaux@users.noreply.github.com> Date: Thu, 5 Dec 2024 16:24:29 +0100 Subject: [PATCH 2/5] Update ci.yml --- .github/workflows/ci.yml | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4bcd2e4..be8cb28 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,20 +24,6 @@ jobs: python -m pip install --upgrade pip pip install -r requirements.txt -r requirements-dev.txt - - name: Check imports sort order - uses: isort/isort-action@v1 - with: - sort-paths: src, tests - configuration: --profile black --check-only --diff - requirements-files: "requirements.txt requirements-dev.txt" - - - name: Check formatting - uses: psf/black@stable - with: - # Version of Black should match the versions set in `requirements-dev.txt` - version: "~=23.7.0" - options: --check --diff - - name: Check typing run: | python -m mypy From 22a5dffd700b56b9b83ae1c1d4ab694f28721786 Mon Sep 17 00:00:00 2001 From: Juliette-Gerbaux <130555142+Juliette-Gerbaux@users.noreply.github.com> Date: Thu, 5 Dec 2024 16:30:48 +0100 Subject: [PATCH 3/5] Update ci.yml --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index be8cb28..923125b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,7 +26,7 @@ jobs: - name: Check typing run: | - python -m mypy + python -m mypy src - name: Test run: | From cf7a358fb72025e4844de0dc1611f306ee37fd2c Mon Sep 17 00:00:00 2001 From: Juliette-Gerbaux <130555142+Juliette-Gerbaux@users.noreply.github.com> Date: Thu, 5 Dec 2024 16:32:54 +0100 Subject: [PATCH 4/5] Update ci.yml --- .github/workflows/ci.yml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 923125b..8a7cfda 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -30,10 +30,5 @@ jobs: - name: Test run: | - pytest --cov antarest --cov-report xml + pytest - - name: Archive code coverage results - uses: actions/upload-artifact@v3 - with: - name: python-code-coverage-report - path: coverage.xml From cd9ba4a4900019a06438852e90f3ba03ec111902 Mon Sep 17 00:00:00 2001 From: Juliette-Gerbaux Date: Thu, 5 Dec 2024 16:35:25 +0100 Subject: [PATCH 5/5] Fix ci --- requirements.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index b0cf18b..f963c7b 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,4 @@ numpy scipy -xpress \ No newline at end of file +xpress +ortools \ No newline at end of file