@classmethod
    def from_repo_id_and_coordinates(cls, repo_id, coordinates):
        """

        :param repo_id:
        :param coordinates: e.g. 'com.fooware:foo:1.0.0'
        :return:
        """
        fields = coordinates.split(':')

        if len(fields) < 3:
            raise ArtifactError('Incorrect coordinates, at least group, artifact and version are obligatory')

        group, artifact, version = fields[0], fields[1], fields[2]

        classifier = extension = ''

        if len(fields) > 3:
            classifier = fields[3]

        if len(fields) > 4:
            extension = fields[4]

        return cls(group=group, artifact=artifact, version=version, classifier=classifier, extension=extension,
                   repo_id=repo_id)
dataset/ETHPy150Open stardust85/repositorytools/repositorytools/lib/artifact.py/RemoteArtifact.from_repo_id_and_coordinates/original