Skip to content

Commit

Permalink
Resolve CI failures due to invalid version being set from Git and Wat…
Browse files Browse the repository at this point in the history
…erTAP updates (#18) (#19)

* Empty commit to test #18

* Try limiting setuptools

* Try limiting setuptools again based on last successful job

* Try displaying more information from setuptools_scm

* Try using `fetch-depth: 0` to avoid shallow clone

* Remove Python version not supported by IDAES

* Avoid shallow cloning for other job

* Update arbitrary Python version to 3.11

* Remove version constraint on setuptools

* Update CI workflow to use miniforge while we're at it

* Update import path for WaterTAP flowsheets
  • Loading branch information
lbianchi-lbl authored Nov 21, 2024
1 parent bdf294b commit f7e90b3
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 8 deletions.
12 changes: 10 additions & 2 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ jobs:
- dev
- standard
python-version:
- "3.8"
- "3.9"
- "3.10"
- "3.11"
Expand All @@ -70,14 +69,21 @@ 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
miniforge-version: latest
python-version: ${{ matrix.python-version }}
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)
Expand Down Expand Up @@ -148,8 +154,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
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
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[build-system]
requires = [
"setuptools >= 64",
"setuptools >=64",
"setuptools_scm >= 7",
]
build-backend = "setuptools.build_meta"
Expand Down
2 changes: 1 addition & 1 deletion src/parameter_sweep/loop_tool/tests/ro_setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)
Expand Down
4 changes: 2 additions & 2 deletions tutorials/parameter_sweep_demo.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit f7e90b3

Please sign in to comment.