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

Shorten printing of Tangent and thunks #564

Merged
merged 6 commits into from
Jul 14, 2022
Merged

Conversation

mcabbott
Copy link
Member

Screenshot 2022-07-10 at 20 56 37

@codecov-commenter
Copy link

codecov-commenter commented Jul 11, 2022

Codecov Report

Merging #564 (97b28df) into main (2f76da0) will increase coverage by 0.01%.
The diff coverage is 100.00%.

❗ Current head 97b28df differs from pull request most recent head f5e9387. Consider uploading reports for the commit f5e9387 to get more accurate results

@@            Coverage Diff             @@
##             main     #564      +/-   ##
==========================================
+ Coverage   93.02%   93.03%   +0.01%     
==========================================
  Files          15       14       -1     
  Lines         860      862       +2     
==========================================
+ Hits          800      802       +2     
  Misses         60       60              
Impacted Files Coverage Δ
src/tangent_types/tangent.jl 85.71% <100.00%> (+0.42%) ⬆️
src/tangent_types/thunks.jl 95.65% <100.00%> (+0.28%) ⬆️
src/accumulation.jl 97.14% <0.00%> (-0.08%) ⬇️
src/rule_definition_tools.jl 96.79% <0.00%> (-0.07%) ⬇️
src/projection.jl 97.26% <0.00%> (-0.05%) ⬇️
src/ChainRulesCore.jl

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2f76da0...f5e9387. Read the comment docs.

Copy link
Member

@oxinabox oxinabox left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am ok with this.
If the user really needs that info, it is still printed in show(typeof(tangent))

Maybe add a comment being explaining what it is doing?
Like else # replace over long part with ... ?

Also can we add a test?
It doesn't have to check the actual text produced but make it check that the result of something that would have a very long print is indeed short.

Once that is done merge when happy

@mcabbott mcabbott merged commit f2e3ac5 into JuliaDiff:main Jul 14, 2022
@mcabbott mcabbott deleted the show branch July 14, 2022 17:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants