Skip to content
This repository was archived by the owner on Mar 21, 2024. It is now read-only.

Conversation

@fepegar
Copy link
Contributor

@fepegar fepegar commented Mar 25, 2022

This will hopefully help merge

@fepegar
Copy link
Contributor Author

fepegar commented Mar 25, 2022

@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"

@mebristo
Copy link
Member

@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"

@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

@fepegar
Copy link
Contributor Author

fepegar commented Mar 28, 2022

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?

@fepegar
Copy link
Contributor Author

fepegar commented Mar 28, 2022

For reference, this is the issue that needs to be addressed for the tests to pass:

@dccastro
Copy link
Member

@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"

@fepegar I'm afraid you've tagged the wrong GitHub user!

@fepegar
Copy link
Contributor Author

fepegar commented Mar 28, 2022

@fepegar I'm afraid you've tagged the wrong GitHub user!

🤦‍♂️ Apologies to both Daniels

@fepegar fepegar requested review from ant0nsc and mebristo March 28, 2022 16:41
@fepegar fepegar merged commit f1ae24a into main Mar 29, 2022
@fepegar fepegar deleted the update-hi-ml branch March 29, 2022 07:56
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants