clearml_agent/helper/package/requirements.py
def compare_version(self, requested_version, op=None, num_parts=3):
        """
        compare the requested version with the one we have in the spec,
        If the requested version is 1.2.3 the self.spec should be 1.2.3*
        If the requested version is 1.2 the self.spec should be 1.2*
        etc.

        :param str requested_version:
        :param str op: '==', '>', '>=', '<=', '<', '~='
        :param int num_parts: number of parts to compare
        :return: True if we answer the requested version
        """
        # if we have no specific version, we cannot compare, so assume it's okay
        if not self.specs:
            return True

        version = self.specs[0][1]
        op = (op or self.specs[0][0]).strip()

        return SimpleVersion.compare_versions(
            version_a=requested_version, op=op, version_b=version, num_parts=num_parts)

        compare the requested version with the one we have in the spec,
        If the requested version is 1.2.3 the self.spec should be 1.2.3*
        If the requested version is 1.2 the self.spec should be 1.2*
        etc.

        :param str requested_version:
        :param str op: '==', '>', '>=', '<=', '<', '~='
        :param int num_parts: number of parts to compare
        :return: True if we answer the requested version
        
compare the requested version with the one we have in the spec,
If the requested version is 1.2.3 the self.spec should be 1.2.3
If the requested version is 1.2 the self.spec should be 1.2
etc.
compare the requested version with the one we have in the spec If the requested version is 1 . 2 . 3 the self . spec should be 1 . 2 . 3 If the requested version is 1 . 2 the self . spec should be 1 . 2 etc .
def compare_version(self, requested_version, op=None, num_parts=3):
        if not self.specs:
            return True
        version = self.specs[0][1]
        op = (op or self.specs[0][0]).strip()
        return SimpleVersion.compare_versions(
            version_a=requested_version, op=op, version_b=version, num_parts=num_parts)
def compare_version ( self , requested_version , op = None , num_parts = 3 ) : if not self . specs : return True version = self . specs [ 0 ] [ 1 ] op = ( op or self . specs [ 0 ] [ 0 ] ) . strip ( ) return SimpleVersion . compare_versions ( version_a = requested_version , op = op , version_b = version , num_parts = num_parts )
compare the requested version with the one we have in the spec,
If the requested version is 1.2.3 the self.spec should be 1.2.3
If the requested version is 1.2 the self.spec should be 1.2
etc.
compare the requested version with the one we have in the spec If the requested version is 1 . 2 . 3 the self . spec should be 1 . 2 . 3 If the requested version is 1 . 2 the self . spec should be 1 . 2 etc .
"""
        compare the requested version with the one we have in the spec,
        If the requested version is 1.2.3 the self.spec should be 1.2.3*
        If the requested version is 1.2 the self.spec should be 1.2*
        etc.

        :param str requested_version:
        :param str op: '==', '>', '>=', '<=', '<', '~='
        :param int num_parts: number of parts to compare
        :return: True if we answer the requested version
        """ # if we have no specific version, we cannot compare, so assume it's okay
True if we answer the requested version
True if we answer the requested version
self
requested_version
None
op
None
num_parts
number of parts to compare
number of parts to compare