-
Notifications
You must be signed in to change notification settings - Fork 3
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
Implementation of the github2prov
Prototype Based on gitlab2prov
Provenance Model
#100
Draft
cdboer
wants to merge
82
commits into
master
Choose a base branch
from
77-github2prov-prototype-implementation
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Differentiate between gitlab and github instances when cloning a git repository using a token over https.
… schema defined keys
…son' in package data
…simplify document access
- Renamed attributes for better clarity (e.g., inserted to insertions, start to �uthored_at) - Removed redundant attributes like ile_paths - Consolidated datetime attributes (start and end to �uthored_at and committed_at) - Standardized uid attribute to id across various domain classes
- Improved naming clarity: Renamed command groups from gitlab_cli to gitlab2prov and github_cli to github2prov. - Refined config validation and loading: Split invoke_command_line_from_config to separate functions for loading and validation (load_and_validate_config) and command execution (execute_command_from_config). - Introduced clear separation between loading and validation of config to provide clearer error messages. - Replaced --verbose option with --explain for statistics command for better understanding of its purpose. - Minor cleanups: Removed unnecessary whitespace and lines.
- Introduced post-initialization method __post_init__ to parse the URL upon object creation, thus reducing repetitive calls to urlsplit. - Simplified slug property logic by utilizing the parsed URL path directly, ensuring clearer and more concise code. - Removed individual properties for etloc and scheme in favor of the parsed attributes from __post_init__. - Streamlined the clone_url method by removing redundant parameters and leveraging a dictionary lookup for platform-specific URLs. - Adapted child classes GitlabProjectUrl and GithubProjectUrl to match the streamlined method signature.
- Add 'deletions', 'insertions', 'lines', and 'files_changed' attributes to 'extract_commits'. - Rename 'start' to 'authored_at' and 'end' to 'committed_at' in 'extract_commits'. - Add 'insertions', 'deletions', 'lines', and 'score' attributes to 'FileRevision' in 'extract_revisions'. - Correct typo in comment from 'remeber' to 'remember' in 'extract_revisions'.
- Introduced a ilter_valid method to filter annotations without �nnotator or start values. - Modified parse method to use ilter_valid after sorting annotations. - Changed property name uid to id in methods: parse_commit_comment, parse_commit_status, parse_award_reaction, parse_issue_comment, and parse_issue_event. - Removed extraneous whitespace after parse_award_reaction method.
- Replaced uid with id in the methods for parsing notes, comments, awards, and labels.
- Improved docstrings for clarity in various methods. - Updated error handling in the ead_provenance_file method to handle file not found exceptions. - Refactored the deserialize_string method to provide better feedback on deserialization failures. - Modified the file write mode in write_provenance_file based on the overwrite parameter. - Enhanced ASCII table formatting in ormat_stats_as_ascii_table. - Introduced new methods for pseudonymization: - generate_pseudonym - pseudonymize_agent - pseudonymize_relation - Overhauled existing pseudonymize method for better clarity and efficiency.
cdboer
changed the title
77 github2prov prototype implementation
Implementation of the Aug 27, 2023
github2prov
Prototype Based on gitlab2prov
Provenance Model
This seems like a very useful addition! Is it likely this work will continue? Elsewhere, I've seen some work around ForgeFed, but it hardly seems to have the precision of the data model seen here. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary 📝
Implemented the
github2prov
prototype which adapts thegitlab2prov
provenance model for GitHub. This will pave the way for creating provenance documents based on GitHub activities, offering users a way to trace the lineage and modification of their repositories.Fixes #77
Proposed Changes 👷
GitlabAnnotationParser
class to handle GitHub's unique data structures and API responses. Renamed it toGithubAnnotationParser
.prov/operations.py
to cater to GitHub-specific behaviors.Type of Change 🏷️
Checklist ✅