Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI failures due to pip install errors #18

Open
lbianchi-lbl opened this issue Nov 20, 2024 · 1 comment
Open

CI failures due to pip install errors #18

lbianchi-lbl opened this issue Nov 20, 2024 · 1 comment
Assignees

Comments

@lbianchi-lbl
Copy link
Contributor

Ignoring Sphinx: markers 'python_version < "3.9"' don't match your environment
Obtaining file:///home/runner/work/parameter-sweep/parameter-sweep
  Installing build dependencies: started
  Installing build dependencies: finished with status 'done'
  Checking if build backend supports build_editable: started
  Checking if build backend supports build_editable: finished with status 'done'
  Getting requirements to build editable: started
  Getting requirements to build editable: finished with status 'done'
  Preparing editable metadata (pyproject.toml): started
  Preparing editable metadata (pyproject.toml): finished with status 'done'
Collecting watertap@ git+https://github.com/watertap-org/watertap@main (from -r requirements-dev.txt (line 11))
  Cloning https://github.com/watertap-org/watertap (to revision main) to /tmp/pip-install-_gbr2ta9/watertap_eeeb01f2b668419f983a6642406cbc73
  Running command git clone --filter=blob:none --quiet https://github.com/watertap-org/watertap /tmp/pip-install-_gbr2ta9/watertap_eeeb01f2b668419f983a6642406cbc73
  Resolved https://github.com/watertap-org/watertap to commit ccfc64d0143a4c437a7c82a036c4284c72704a23
  Installing build dependencies: started
  Installing build dependencies: finished with status 'done'
  Getting requirements to build wheel: started
  Getting requirements to build wheel: finished with status 'done'
  Preparing metadata (pyproject.toml): started
  Preparing metadata (pyproject.toml): finished with status 'done'
Collecting black==24.3.0 (from -r requirements-dev.txt (line 1))
  Downloading black-24.3.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (75 kB)
Collecting pytest-cov (from -r requirements-dev.txt (line 2))
  Downloading pytest_cov-6.0.0-py3-none-any.whl.metadata (27 kB)
Collecting coverage (from -r requirements-dev.txt (line 3))
  Downloading coverage-7.6.7-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (8.2 kB)
Collecting Sphinx==7.3.7 (from -r requirements-dev.txt (line 6))
  Downloading sphinx-7.3.7-py3-none-any.whl.metadata (6.0 kB)
Collecting sphinx-autoapi==3.0.0 (from -r requirements-dev.txt (line 7))
  Downloading sphinx_autoapi-3.0.0-py2.py3-none-any.whl.metadata (4.8 kB)
Collecting sphinx-rtd-theme==2.0.0 (from -r requirements-dev.txt (line 8))
  Downloading sphinx_rtd_theme-2.0.0-py2.py3-none-any.whl.metadata (4.4 kB)
Collecting click>=8.0.0 (from black==24.3.0->-r requirements-dev.txt (line 1))
  Downloading click-8.1.7-py3-none-any.whl.metadata (3.0 kB)
Collecting mypy-extensions>=0.4.3 (from black==24.3.0->-r requirements-dev.txt (line 1))
  Downloading mypy_extensions-1.0.0-py3-none-any.whl.metadata (1.1 kB)
Collecting packaging>=22.0 (from black==24.3.0->-r requirements-dev.txt (line 1))
  Using cached packaging-24.2-py3-none-any.whl.metadata (3.2 kB)
Collecting pathspec>=0.9.0 (from black==24.3.0->-r requirements-dev.txt (line 1))
  Downloading pathspec-0.12.1-py3-none-any.whl.metadata (21 kB)
Collecting platformdirs>=2 (from black==24.3.0->-r requirements-dev.txt (line 1))
  Downloading platformdirs-4.3.6-py3-none-any.whl.metadata (11 kB)
Collecting tomli>=1.1.0 (from black==24.3.0->-r requirements-dev.txt (line 1))
  Using cached tomli-2.1.0-py3-none-any.whl.metadata (10.0 kB)
Collecting typing-extensions>=4.0.1 (from black==24.3.0->-r requirements-dev.txt (line 1))
  Downloading typing_extensions-4.12.2-py3-none-any.whl.metadata (3.0 kB)
Collecting sphinxcontrib-applehelp (from Sphinx==7.3.7->-r requirements-dev.txt (line 6))
  Downloading sphinxcontrib_applehelp-2.0.0-py3-none-any.whl.metadata (2.3 kB)
Collecting sphinxcontrib-devhelp (from Sphinx==7.3.7->-r requirements-dev.txt (line 6))
  Downloading sphinxcontrib_devhelp-2.0.0-py3-none-any.whl.metadata (2.3 kB)
Collecting sphinxcontrib-jsmath (from Sphinx==7.3.7->-r requirements-dev.txt (line 6))
  Downloading sphinxcontrib_jsmath-1.0.1-py2.py3-none-any.whl.metadata (1.4 kB)
Collecting sphinxcontrib-htmlhelp>=2.0.0 (from Sphinx==7.3.7->-r requirements-dev.txt (line 6))
  Downloading sphinxcontrib_htmlhelp-2.1.0-py3-none-any.whl.metadata (2.3 kB)
Collecting sphinxcontrib-serializinghtml>=1.1.9 (from Sphinx==7.3.7->-r requirements-dev.txt (line 6))
  Downloading sphinxcontrib_serializinghtml-2.0.0-py3-none-any.whl.metadata (2.4 kB)
Collecting sphinxcontrib-qthelp (from Sphinx==7.3.7->-r requirements-dev.txt (line 6))
  Downloading sphinxcontrib_qthelp-2.0.0-py3-none-any.whl.metadata (2.3 kB)
Collecting Jinja2>=3.0 (from Sphinx==7.3.7->-r requirements-dev.txt (line 6))
  Downloading jinja2-3.1.4-py3-none-any.whl.metadata (2.6 kB)
Collecting Pygments>=2.14 (from Sphinx==7.3.7->-r requirements-dev.txt (line 6))
  Downloading pygments-2.18.0-py3-none-any.whl.metadata (2.5 kB)
Collecting docutils<0.22,>=0.18.1 (from Sphinx==7.3.7->-r requirements-dev.txt (line 6))
  Downloading docutils-0.21.2-py3-none-any.whl.metadata (2.8 kB)
Collecting snowballstemmer>=2.0 (from Sphinx==7.3.7->-r requirements-dev.txt (line 6))
  Downloading snowballstemmer-2.2.0-py2.py3-none-any.whl.metadata (6.5 kB)
Collecting babel>=2.9 (from Sphinx==7.3.7->-r requirements-dev.txt (line 6))
  Downloading babel-2.16.0-py3-none-any.whl.metadata (1.5 kB)
Collecting alabaster~=0.7.14 (from Sphinx==7.3.7->-r requirements-dev.txt (line 6))
  Downloading alabaster-0.7.16-py3-none-any.whl.metadata (2.9 kB)
Collecting imagesize>=1.3 (from Sphinx==7.3.7->-r requirements-dev.txt (line 6))
  Downloading imagesize-1.4.1-py2.py3-none-any.whl.metadata (1.5 kB)
Collecting requests>=2.25.0 (from Sphinx==7.3.7->-r requirements-dev.txt (line 6))
  Downloading requests-2.32.3-py3-none-any.whl.metadata (4.6 kB)
Collecting anyascii (from sphinx-autoapi==3.0.0->-r requirements-dev.txt (line 7))
  Downloading anyascii-0.3.2-py3-none-any.whl.metadata (1.5 kB)
Collecting PyYAML (from sphinx-autoapi==3.0.0->-r requirements-dev.txt (line 7))
  Downloading PyYAML-6.0.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (2.1 kB)
Collecting astroid>=2.7 (from sphinx-autoapi==3.0.0->-r requirements-dev.txt (line 7))
  Downloading astroid-3.3.5-py3-none-any.whl.metadata (4.5 kB)
Collecting docutils<0.22,>=0.18.1 (from Sphinx==7.3.7->-r requirements-dev.txt (line 6))
  Downloading docutils-0.20.1-py3-none-any.whl.metadata (2.8 kB)
Collecting sphinxcontrib-jquery<5,>=4 (from sphinx-rtd-theme==2.0.0->-r requirements-dev.txt (line 8))
  Downloading sphinxcontrib_jquery-4.1-py2.py3-none-any.whl.metadata (2.6 kB)
Collecting pytest>=4.6 (from pytest-cov->-r requirements-dev.txt (line 2))
  Downloading pytest-8.3.3-py3-none-any.whl.metadata (7.5 kB)
Collecting pyomo>=6.7.3 (from parameter-sweep==0.0+g49757ff)
  Downloading Pyomo-6.8.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (8.0 kB)
Collecting numpy (from parameter-sweep==0.0+g49757ff)
  Downloading numpy-2.1.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (62 kB)
Collecting h5py (from parameter-sweep==0.0+g49757ff)
  Downloading h5py-3.12.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (2.5 kB)
Collecting idaes-pse (from parameter-sweep==0.0+g49757ff)
  Downloading idaes_pse-2.6.0-py3-none-any.whl.metadata (8.4 kB)
Collecting idaes-pse@ git+https://github.com/watertap-org/idaes-pse@2.7.0.dev0.watertap.24.11.19 (from watertap@ git+https://github.com/watertap-org/watertap@main->-r requirements-dev.txt (line 11))
  Cloning https://github.com/watertap-org/idaes-pse (to revision 2.7.0.dev0.watertap.24.11.19) to /tmp/pip-install-_gbr2ta9/idaes-pse_7871649ddd5e4bad80beb9633bbb864e
  Running command git clone --filter=blob:none --quiet https://github.com/watertap-org/idaes-pse /tmp/pip-install-_gbr2ta9/idaes-pse_7871649ddd5e4bad80beb9633bbb864e
  Resolved https://github.com/watertap-org/idaes-pse to commit c4336bae9231543cb4768465e36f8b14c273d6e4
  Preparing metadata (setup.py): started
  Preparing metadata (setup.py): finished with status 'done'
INFO: pip is looking at multiple versions of watertap to determine which version is compatible with other requirements. This could take a while.
ERROR: Cannot install -r requirements-dev.txt (line 11) and parameter-sweep 0.0+g49757ff (from /home/runner/work/parameter-sweep/parameter-sweep) because these package versions have conflicting dependencies.

The conflict is caused by:
    The user requested parameter-sweep 0.0+g49757ff (from /home/runner/work/parameter-sweep/parameter-sweep)
    watertap 1.2.dev0 depends on parameter-sweep>=0.1.dev5

To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip to attempt to solve the dependency conflict

ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts
@lbianchi-lbl lbianchi-lbl self-assigned this Nov 20, 2024
lbianchi-lbl added a commit to lbianchi-lbl/parameter-sweep that referenced this issue Nov 20, 2024
@lbianchi-lbl
Copy link
Contributor Author

lbianchi-lbl commented Nov 20, 2024

It turns out that this is a known issue (pypa/setuptools-scm#480) due to the way actions/checkout works by default, i.e. not cloning the entire Git history, which can cause setuptools-scm to fail to find the information it needs to deduce the version if the commit is not tagged directly.

If this is true, it's very likely that setuptools-scm never actually worked as intended in the jobs that started failing in #17, and the reason why we haven't experienced this until now is that there was no version incompatibility causing the error (i.e. if there was no version incompatibility, parameter-sweep would be installed as 0.0+g1234567 without otherwise causing errors).

Conversely, the jobs that did not start failing in #17 are those that don't rely on actions/checkout to clone the repository, allowing setuptools-scm to work correctly.

#19 resolves this issue by adding a fetch-depth: 0 input to actions/checkout so that the full Git history is available to setuptools-scm.

lbianchi-lbl added a commit that referenced this issue Nov 21, 2024
…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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant