Skip to content
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

Open
wants to merge 2 commits into
base: staging
Choose a base branch
from

Conversation

benmss
Copy link
Member

@benmss benmss commented Oct 3, 2024

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.

@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Oct 3, 2024
@benmss benmss force-pushed the benmss/repo-finder-metadata branch from fca7918 to 63372e0 Compare October 3, 2024 03:47
@benmss benmss marked this pull request as ready for review October 3, 2024 05:29
@benmss benmss force-pushed the benmss/repo-finder-metadata branch 2 times, most recently from bad6718 to 76f42bc Compare November 18, 2024 04:36
@benmss benmss force-pushed the benmss/repo-finder-metadata branch from 76f42bc to 7c7cb7b Compare November 28, 2024 02:41
@benmss benmss force-pushed the benmss/repo-finder-metadata branch from 26c24eb to c857803 Compare December 10, 2024 23:11
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"
Copy link
Member

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?

Copy link
Member Author

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.

@benmss benmss force-pushed the benmss/repo-finder-metadata branch from c857803 to b8261f3 Compare January 9, 2025 06:02
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
Copy link
Member

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.
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OCA Verified All contributors have signed the Oracle Contributor Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants