-
Notifications
You must be signed in to change notification settings - Fork 625
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
[AL-1598] Added more APIs for VC #1371
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1371 +/- ##
==========================================
+ Coverage 92.68% 92.75% +0.06%
==========================================
Files 173 173
Lines 12533 12667 +134
==========================================
+ Hits 11616 11749 +133
- Misses 917 918 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
commits = [] | ||
commit_node = self.version_state["commit_node"] | ||
while commit_node: | ||
if commit_node.commit_time is not None: |
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.
In what scenario is commit_time == None
? What is being checked 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.
commit_time is None when the commit hasn't been made yet i.e. we're on the head commit
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.
For better readability, maybe:
is_head_commit = lambda node: node.commit_time is None
...
if not is_head_commit(commit_node):
...
commits = [] | ||
commit_node = self.version_state["commit_node"] | ||
while commit_node: | ||
if commit_node.commit_time is not None: |
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.
For better readability, maybe:
is_head_commit = lambda node: node.commit_time is None
...
if not is_head_commit(commit_node):
...
🚀 🚀 Pull Request
Checklist:
coverage-rate
upChanges
Adds:-
ds.branches
- returns a list of all branches of the datasetds.commits
- returns a list of dictionaries, each containing all info about a particular commit (commit_id, commit_message, username and time), in order for the current branch.ds.diff(a,b,as_dict=True)
- returns dicts containing diffs instead of printing it.ds.get_commit_details(commit_id)
- returns a dict with all the details for a particular commit_id (commit_message, username and time)Need to add tests