-
Notifications
You must be signed in to change notification settings - Fork 143
Conversation
@mebristo @daniel-castro could you please look into this? There seems to be a problem with a dependency and the code used to read it: dep_str = 'cucim==21.10.1; platform_system=="Linux"'
def _split_dependency(dep_str: str) -> Tuple[str, ...]:
"""Splits a string like those coming from PIP constraints into 3 parts: package name, operator, version.
The operator and version fields can be empty if no constraint is found at all
:param dep_str: A pip constraint string, like "package-name>=1.0.1"
:return: A tuple of [package name, operator, version]
"""
parts: List[str] = re.split('(<=|==|=|>=|<|>)', dep_str)
if len(parts) == 1:
return (parts[0].strip(), "", "")
if len(parts) == 3:
return tuple(p.strip() for p in parts)
> raise ValueError(f"Unable to split this package string: {dep_str}")
E ValueError: Unable to split this package string: cucim==21.10.1; platform_system=="Linux" |
We don't currently have a way to handle this type of string in the conda env merging code. I'll add an issue in hi-ml |
Thanks! Can you please ping me so I'm subscribed? |
For reference, this is the issue that needs to be addressed for the tests to pass: |
@fepegar I'm afraid you've tagged the wrong GitHub user! |
🤦♂️ Apologies to both Daniels |
This will hopefully help merge