openmm / openmm-cookbook

The OpenMM Cookbook and Tutorials
35 stars 10 forks source link

CI failing #29

Closed sef43 closed 1 year ago

sef43 commented 1 year ago

The CI has started failing for all cases. My guess is this is caused by an update in one of the upstream packages (maybe pytest itself?):

Run pytest -v --nbval-lax notebooks/cookbook
Traceback (most recent call last):
  File "/usr/share/miniconda3/envs/test/bin/pytest", line 6, in <module>
    from pytest import console_main
  File "/usr/share/miniconda3/envs/test/lib/python3.7/site-packages/pytest/__init__.py", line 5, in <module>
    from _pytest._code import ExceptionInfo
  File "/usr/share/miniconda3/envs/test/lib/python3.7/site-packages/_pytest/_code/__init__.py", line 2, in <module>
    from .code import Code
  File "/usr/share/miniconda3/envs/test/lib/python3.7/site-packages/_pytest/_code/code.py", line 35, in <module>
    import pluggy
  File "/usr/share/miniconda3/envs/test/lib/python3.7/site-packages/pluggy/__init__.py", line 16, in <module>
    from ._manager import PluginManager, PluginValidationError
  File "/usr/share/miniconda3/envs/test/lib/python3.7/site-packages/pluggy/_manager.py", line 12, in <module>
    import importlib_metadata
  File "/usr/share/miniconda3/envs/test/lib/python3.7/site-packages/importlib_metadata/__init__.py", line 6, in <module>
    import zipp
  File "/usr/share/miniconda3/envs/test/lib/python3.7/site-packages/zipp/__init__.py", line [10](https://github.com/openmm/openmm-cookbook/actions/runs/5514667050/jobs/10054182725#step:5:11), in <module>
    from .py310compat import text_encoding
  File "/usr/share/miniconda3/envs/test/lib/python3.7/site-packages/zipp/py310compat.py", line 5
    def _text_encoding(encoding, stacklevel=2, /):
                                               ^
SyntaxError: invalid syntax
Error: Process completed with exit code 1.
sef43 commented 1 year ago

Due to this

https://github.com/jaraco/zipp/issues/100

sef43 commented 1 year ago

This is actually a conda bug. It should not have been able to install the newer incompatible zipp. Using mamba locally it will complain as expected:

Looking for: ['zipp=3.16']

conda-forge/osx-arm64                                       Using cache
conda-forge/noarch                                          Using cache
pkgs/main/noarch                                              No change
pkgs/main/osx-arm64                                           No change
pkgs/r/osx-arm64                                              No change
pkgs/r/noarch                                                 No change

Pinned packages:
  - python 3.7.*

Could not solve for environment specs
Encountered problems while solving:
  - package zipp-3.16.0-pyhd8ed1ab_0 requires python >=3.8, but none of the providers can be installed

The environment can't be solved, aborting the operation

Not sure how the CI conda managed to create the failing environment.

Regardless, if we update the minimum python version to 3.8 it should fix this. Python 3.7 is no longer supported https://devguide.python.org/versions/

peastman commented 1 year ago

Dropping 3.7 would be reasonable.

sef43 commented 1 year ago

looks to be fixed in the upstream conda package