Open
Conversation
Contributor
Author
|
Based on #4672: |
Contributor
There was a problem hiding this comment.
Code Review
This pull request adds a comparison mode to the sprint overview script. The implementation is mostly solid, but I've found a few issues related to correctness and clarity. There are potential TypeError and ZeroDivisionError exceptions that need to be handled. I've also suggested a refactoring of the comparison logic to make the output report clearer and more intuitive.
0b7e906 to
a862e6f
Compare
293716e to
1578b89
Compare
a862e6f to
a34a122
Compare
dfce2dd to
c8d559e
Compare
2e5f824 to
2ce61fb
Compare
2ce61fb to
cc80067
Compare
8c396b3 to
89e5999
Compare
LecrisUT
approved these changes
Apr 10, 2026
Invoked by adding `--base` option - compares against live data - plus `--current` can be used to compare against another saved file to avoid talking to Github API so often.
89e5999 to
807d1c6
Compare
psss
reviewed
Apr 15, 2026
| return | ||
| if current_path is not None: | ||
| with open(current_path) as f: | ||
| items = YAML().load(f) |
Member
There was a problem hiding this comment.
Suggested change
| items = YAML().load(f) | |
| items = [Item(**item) for item in YAML().load(f)] |
We need to unpack these too, right? Otherwise I get:
File "/home/psss/git/tmt/./scripts/sprint-overview", line 289, in display_comparison
current_map = {item.id: item for item in current}
^^^^^^^
AttributeError: 'CommentedMap' object has no attribute 'id'| '--base', | ||
| 'base_path', | ||
| default=None, | ||
| help='Instead of reporting, compare the current sprint against this saved state.', |
Member
There was a problem hiding this comment.
Perhaps add a metavar with PATH? The default TEXT is a bit confusing:
--base TEXT Instead of reporting, compare the current sprint against
this saved state.
--current TEXT If set, compare --base against --current instead of the live
sprint state.
Similar below.
This file contains hidden or 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
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.
Pull Request Checklist