-
Notifications
You must be signed in to change notification settings - Fork 868
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
Run CI with two different uv
resolution strategies: highest
and lowest-direct
#3852
Conversation
needed for deps install with --resolution=lowest-direct to work
@@ -60,6 +59,7 @@ | |||
from ase.optimize.optimize import Optimizer | |||
from matgl.ext.ase import TrajectoryObserver | |||
from numpy.typing import ArrayLike, NDArray | |||
from typing_extensions import Self |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So we can only type check on Python<=3.10? Is there no ruff rule that can be turned on that does
from typing_extensions import Self | |
try: | |
from typing_extensions import Self | |
except ImportError: | |
from typing import Self |
or something similar?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think guarding from typing_extensions import Self
with if TYPE_CHECKING:
should suffice to prevent this (ideally automatically guard such TYPE_CHECKING
only imports).
from typing import Self
seems only available from Python 3.11 and afterwards
fixes TypeError: deprecated() got an unexpected keyword argument 'deadline'
fixes KeyError: 'Co' ipot = self.pot_dict[el.symbol]
typing_extensions
ImportError
uv
resultion strategies: highest
and lowest-direct
uv
resultion strategies: highest
and lowest-direct
uv
resolution strategies: highest
and lowest-direct
@shyuep Sorry for the trouble caused surrounding import of |
# total number of jobs. We run all pytest splits with the oldest supported python | ||
# version (currently 3.9) on windows (seems most likely to surface errors) and with | ||
# newest version (currently 3.12) on ubuntu (to get complete coverage on unix). We | ||
# ignore mac-os, which is assumed to be similar to ubuntu. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this comment should be removed now that it's testing macos-latest
now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good catch!
this ensures pymatgen is compatible with both the oldest and newest dependency versions it allows in
setup.py
.future CI runs will discover version clashes like the one for
monty
reported in #3752 (comment) before releasing to pypialso fix
typing_extensions
ImportError
reported in #3752 (comment) by @kavanase @Andrew-S-Rosen