-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add Repo Finder and Commit Finder outcomes to database #892
base: staging
Are you sure you want to change the base?
Conversation
fca7918
to
63372e0
Compare
bad6718
to
76f42bc
Compare
76f42bc
to
7c7cb7b
Compare
26c24eb
to
c857803
Compare
def __init__(self, purl: str, analysis: Analysis, repository: "Repository | None"): | ||
#: The one-to-one relationship with Repo Finder metadata. | ||
repo_finder_metadata: Mapped["RepoFinderMetadata"] = relationship( | ||
uselist=False, back_populates="component", lazy="immediate" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm curious why uselist=False
is needed here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems like it is not needed. Can't say for sure why I originally added it at this point.
Signed-off-by: Ben Selwyn-Smith <[email protected]>
Signed-off-by: Ben Selwyn-Smith <[email protected]>
c857803
to
b8261f3
Compare
Git | None | ||
The pydriller.Git object of the repository or None if error. | ||
tuple[Git | None, CommitFinderOutcome, str] | ||
The pydriller.Git object of the repository or None if error; the outcome of the Commit Finder; and the final |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If there was an error, do we still have an outcome from the commit finder? Shouldn't the return type be improved to None | (Git, CommitFinderOutcome, str)
.
class RepoFinderOutcome(Enum): | ||
"""An Enum of all outcomes of the Repo Finder being run for a software component.""" | ||
|
||
# States that relate to problems with user input. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please add a comment using #:
for each Enum
item so that Sphinx can render? Also, more detailed explanation would be helpful to understand the differences and purposes. e.g., in NO_MAVEN_HOST_PROVIDED
, what is a host and how is it provided, through the POM file? The more information the better.
This PR adds a new table
RepoFinderMetadata
that exists to record the various possible outcomes of the Repo Finder and Commit Finder. Possible outcomes include successes as well as all types of failures.