now using only the new datset version

This commit is contained in:
Karma Riuk
2025-03-31 14:17:36 +02:00
parent 35bd296c7c
commit 669049b7a4
4 changed files with 309 additions and 131 deletions

45
errors.py Normal file
View File

@ -0,0 +1,45 @@
from abc import ABC
class SetupException(Exception, ABC):
reason_for_failure: str
class NoDiffsBeforeError(SetupException):
reason_for_failure = "Couldn't get the diffs before the first commit"
class NoDiffsAfterError(SetupException):
reason_for_failure = "Couldn't get the diffs after the last commit"
class CantCloneRepoError(SetupException):
reason_for_failure = "Couldn't clone the repository"
class CantEnsureFullHistoryError(SetupException):
reason_for_failure = "Couldn't ensure the full history of the repo (fetch --unshallow)"
class CantFetchPRError(SetupException):
reason_for_failure = "Couldn't fetch the PR's merge commit"
class CantCheckoutCommitError(SetupException):
reason_for_failure = (
"Coudln't checkout the PR's merge commit (even after fetching the pull/<pr_number>/merge)"
)
class MultipleFilesError(SetupException):
reason_for_failure = (
"When requesting the contents of a file, a list of ContentFile was returned"
)
class NotValidDirectory(SetupException):
reason_for_failure = "The directory is not valid"
class CantFindBuildFile(SetupException):
reason_for_failure = "Couldn't find the build file in the directory"