From 613873be41fa2c350907f8d2509a897d907f350b Mon Sep 17 00:00:00 2001 From: Ludovico Bianchi Date: Wed, 20 Nov 2024 12:09:42 -0600 Subject: [PATCH 01/13] Empty commit to test #18 From bcb0852e934491961e4aaee1fae22163c63e44b8 Mon Sep 17 00:00:00 2001 From: Ludovico Bianchi Date: Wed, 20 Nov 2024 12:16:52 -0600 Subject: [PATCH 02/13] Try limiting setuptools --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 01ffb0e..a1cee62 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [build-system] requires = [ - "setuptools >= 64", + "setuptools >=64, <75", "setuptools_scm >= 7", ] build-backend = "setuptools.build_meta" From d5ca18b60c4929995e147a94ced5810a7f740dd3 Mon Sep 17 00:00:00 2001 From: Ludovico Bianchi Date: Wed, 20 Nov 2024 12:20:12 -0600 Subject: [PATCH 03/13] Try limiting setuptools again based on last successful job --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index a1cee62..8bf73b9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [build-system] requires = [ - "setuptools >=64, <75", + "setuptools >=64, <72", "setuptools_scm >= 7", ] build-backend = "setuptools.build_meta" From 7ab5fe1a19a0b34b08d63c0bac1aa1fe91248f12 Mon Sep 17 00:00:00 2001 From: Ludovico Bianchi Date: Wed, 20 Nov 2024 12:32:17 -0600 Subject: [PATCH 04/13] Try displaying more information from setuptools_scm --- .github/workflows/checks.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index f42162c..7085fe7 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -77,7 +77,11 @@ jobs: activate-environment: ${{ matrix.install-mode == 'dev' && 'parameter-sweep-dev' || 'parameter-sweep' }} - if: matrix.install-mode == 'dev' name: Install (dev) + env: + SETUPTOOLS_SCM_DEBUG: "1" run: | + pip install build + python -c "import build.util; print(build.util.project_wheel_metadata('.')['Version'])" pip install -r requirements-dev.txt - if: matrix.install-mode == 'standard' name: Install (standard) From 558a274d7d15f170857d39159ab0f21a16c28fa3 Mon Sep 17 00:00:00 2001 From: Ludovico Bianchi Date: Wed, 20 Nov 2024 12:36:34 -0600 Subject: [PATCH 05/13] Try using `fetch-depth: 0` to avoid shallow clone --- .github/workflows/checks.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 7085fe7..cbeccd7 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -70,6 +70,8 @@ jobs: steps: - if: matrix.install-mode == 'dev' uses: actions/checkout@v4 + with: + fetch-depth: 0 - uses: conda-incubator/setup-miniconda@v3 with: auto-update-conda: true From df8d7a6bb8553453aea0c2f919016a43e48a2231 Mon Sep 17 00:00:00 2001 From: Ludovico Bianchi Date: Wed, 20 Nov 2024 12:40:58 -0600 Subject: [PATCH 06/13] Remove Python version not supported by IDAES --- .github/workflows/checks.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index cbeccd7..c1d4b93 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -48,7 +48,6 @@ jobs: - dev - standard python-version: - - "3.8" - "3.9" - "3.10" - "3.11" From 96705c2d366239b09344a9a290eab989e04ecb95 Mon Sep 17 00:00:00 2001 From: Ludovico Bianchi Date: Wed, 20 Nov 2024 12:41:31 -0600 Subject: [PATCH 07/13] Avoid shallow cloning for other job --- .github/workflows/checks.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index c1d4b93..09c73a9 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -153,6 +153,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + with: + fetch-depth: 0 - uses: actions/setup-python@v5 with: python-version: '3.10' From 1932d2bd17f4ada30d2d431bae44f89cc9d661c1 Mon Sep 17 00:00:00 2001 From: Ludovico Bianchi Date: Wed, 20 Nov 2024 12:41:55 -0600 Subject: [PATCH 08/13] Update arbitrary Python version to 3.11 --- .github/workflows/checks.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 09c73a9..fc7ec6c 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -157,6 +157,6 @@ jobs: fetch-depth: 0 - uses: actions/setup-python@v5 with: - python-version: '3.10' + python-version: '3.11' - run: pip install -r requirements-dev.txt - run: make -C docs html From 58dc6d3441a04c624b89befc2c8a42a26e4992d3 Mon Sep 17 00:00:00 2001 From: Ludovico Bianchi Date: Wed, 20 Nov 2024 12:42:28 -0600 Subject: [PATCH 09/13] Remove version constraint on setuptools --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 8bf73b9..cf4fc52 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [build-system] requires = [ - "setuptools >=64, <72", + "setuptools >=64", "setuptools_scm >= 7", ] build-backend = "setuptools.build_meta" From 3179270bc0eab7a14587ffbf4762f42baa3caca5 Mon Sep 17 00:00:00 2001 From: Ludovico Bianchi Date: Wed, 20 Nov 2024 12:49:39 -0600 Subject: [PATCH 10/13] Update CI workflow to use miniforge while we're at it --- .github/workflows/checks.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index fc7ec6c..1550a3a 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -74,6 +74,7 @@ jobs: - uses: conda-incubator/setup-miniconda@v3 with: auto-update-conda: true + miniforge-version: latest python-version: ${{ matrix.python-version }} activate-environment: ${{ matrix.install-mode == 'dev' && 'parameter-sweep-dev' || 'parameter-sweep' }} - if: matrix.install-mode == 'dev' From ab4d9e4938825d1fb8098f16f2ba5d7004641588 Mon Sep 17 00:00:00 2001 From: Ludovico Bianchi Date: Wed, 20 Nov 2024 14:36:10 -0600 Subject: [PATCH 11/13] Revert "Update CI workflow to use miniforge while we're at it" This reverts commit 3179270bc0eab7a14587ffbf4762f42baa3caca5. --- .github/workflows/checks.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 1550a3a..fc7ec6c 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -74,7 +74,6 @@ jobs: - uses: conda-incubator/setup-miniconda@v3 with: auto-update-conda: true - miniforge-version: latest python-version: ${{ matrix.python-version }} activate-environment: ${{ matrix.install-mode == 'dev' && 'parameter-sweep-dev' || 'parameter-sweep' }} - if: matrix.install-mode == 'dev' From 968a93f215b77289926631af7b48c4125375be07 Mon Sep 17 00:00:00 2001 From: Ludovico Bianchi Date: Wed, 20 Nov 2024 14:42:54 -0600 Subject: [PATCH 12/13] Update import path for WaterTAP flowsheets --- src/parameter_sweep/loop_tool/tests/ro_setup.py | 2 +- .../parameter_sweep_demo_script.py | 4 ++-- tutorials/parameter_sweep_demo.ipynb | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/parameter_sweep/loop_tool/tests/ro_setup.py b/src/parameter_sweep/loop_tool/tests/ro_setup.py index 1c3c210..470fd0a 100644 --- a/src/parameter_sweep/loop_tool/tests/ro_setup.py +++ b/src/parameter_sweep/loop_tool/tests/ro_setup.py @@ -10,7 +10,7 @@ # "https://github.com/watertap-org/watertap/" ################################################################################# -import watertap.examples.flowsheets.RO_with_energy_recovery.RO_with_energy_recovery as ro_erd +import watertap.flowsheets.RO_with_energy_recovery.RO_with_energy_recovery as ro_erd from parameter_sweep.parameter_sweep import ( ParameterSweep, RecursiveParameterSweep, diff --git a/tutorials/assets_parameter_sweep_demo/parameter_sweep_demo_script.py b/tutorials/assets_parameter_sweep_demo/parameter_sweep_demo_script.py index a5ab4d5..0e2fa69 100644 --- a/tutorials/assets_parameter_sweep_demo/parameter_sweep_demo_script.py +++ b/tutorials/assets_parameter_sweep_demo/parameter_sweep_demo_script.py @@ -10,10 +10,10 @@ # "https://github.com/watertap-org/watertap/" ################################################################################# from watertap.core.solvers import get_solver -from watertap.examples.flowsheets.RO_with_energy_recovery.RO_with_energy_recovery import ( +from watertap.flowsheets.RO_with_energy_recovery.RO_with_energy_recovery import ( optimize, ) -from watertap.examples.flowsheets.RO_with_energy_recovery.monte_carlo_sampling_RO_ERD import ( +from watertap.flowsheets.RO_with_energy_recovery.monte_carlo_sampling_RO_ERD import ( build_model, build_outputs, ) diff --git a/tutorials/parameter_sweep_demo.ipynb b/tutorials/parameter_sweep_demo.ipynb index 86a09dd..7295b7c 100644 --- a/tutorials/parameter_sweep_demo.ipynb +++ b/tutorials/parameter_sweep_demo.ipynb @@ -174,10 +174,10 @@ "from pprint import pprint\n", "from IPython import get_ipython\n", "from watertap.core.solvers import get_solver\n", - "from watertap.examples.flowsheets.RO_with_energy_recovery.RO_with_energy_recovery import (\n", + "from watertap.flowsheets.RO_with_energy_recovery.RO_with_energy_recovery import (\n", " optimize,\n", ")\n", - "from watertap.examples.flowsheets.RO_with_energy_recovery.monte_carlo_sampling_RO_ERD import (\n", + "from watertap.flowsheets.RO_with_energy_recovery.monte_carlo_sampling_RO_ERD import (\n", " build_model,\n", " build_outputs,\n", ")\n", From f235414da551808ae4d340f319a295eb183b6d11 Mon Sep 17 00:00:00 2001 From: Ludovico Bianchi Date: Wed, 20 Nov 2024 14:43:06 -0600 Subject: [PATCH 13/13] Revert "Revert "Update CI workflow to use miniforge while we're at it"" This reverts commit ab4d9e4938825d1fb8098f16f2ba5d7004641588. --- .github/workflows/checks.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index fc7ec6c..1550a3a 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -74,6 +74,7 @@ jobs: - uses: conda-incubator/setup-miniconda@v3 with: auto-update-conda: true + miniforge-version: latest python-version: ${{ matrix.python-version }} activate-environment: ${{ matrix.install-mode == 'dev' && 'parameter-sweep-dev' || 'parameter-sweep' }} - if: matrix.install-mode == 'dev'