-
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
Added comparison function as histogram operation (with colorized + info based string return) #763
Draft
gohil-jay
wants to merge
28
commits into
scikit-hep:develop
Choose a base branch
from
gohil-jay:issue157-2
base: develop
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.
Draft
Changes from 16 commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
e929fe2
Update BoostHistogramHandsOn.ipynb
gohil-jay 4700409
Merge branch 'scikit-hep:develop' into develop
gohil-jay c26aa03
Merge branch 'scikit-hep:develop' into develop
gohil-jay 7d8252a
Updated all numpy.testing asserts to pytest.approx
gohil-jay a063d37
Updated all numpy.testing asserts to pytest.approx
gohil-jay 65f0a1c
Updated all numpy.testing asserts to pytest.approx
gohil-jay b877ee5
style: pre-commit fixes
pre-commit-ci[bot] 190e6ce
Wrapping this assert to remove test failing
gohil-jay b69b165
Merge branch 'scikit-hep:develop' into issue157
gohil-jay b6b0003
Added histograms comparison function
gohil-jay ebe0cff
Added 'compare' operation
gohil-jay 772104c
style: pre-commit fixes
pre-commit-ci[bot] 220c1ca
Tweaked the comparison function
gohil-jay 246cc2f
style: pre-commit fixes
pre-commit-ci[bot] 8a61023
Added type annotation
gohil-jay c2994e2
Updated function return from bool to colorized str
gohil-jay d1f5797
Updated annotation type and syntax
gohil-jay fb5af1e
style: pre-commit fixes
pre-commit-ci[bot] bae1ecd
Updated function with linear checks & f"str return
gohil-jay e6a3a2a
style: pre-commit fixes
pre-commit-ci[bot] 8a36fe8
Fixed a typo
gohil-jay e0c2f5a
Removed colorized return text
gohil-jay b7096bd
Solved few pylint issues
gohil-jay fd2bcec
style: pre-commit fixes
pre-commit-ci[bot] 69ab6dc
Redefined storage check & removed variance check
gohil-jay 8df3ff6
Added histogram storage type operation
gohil-jay e9c1bd8
Tiny changes for pylint
gohil-jay 9e79f51
Merge branch 'scikit-hep:develop' into issue157-2
gohil-jay File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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.
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.
F-strings were made for this. :) Also I'd pull out the color formatting into a variable, like
red
andreset
. Actually, there are lots of concerns with color formatting (needs to be disablable and such), at least rich can auto-format this, so probably leave the color formatting off for the moment.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 bet if you do
import rich; rich.print(h.compare(h2))
this would still be colorful. ;)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.
Yes I was going to do something similar (with termcolor), but then though I'd do it without importing a library..