-
Notifications
You must be signed in to change notification settings - Fork 137
Allow passing io to Analysis, Alive, and Summary Callbacks
#2698
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
base: main
Are you sure you want to change the base?
Conversation
Review checklistThis checklist is meant to assist creators of PRs (to let them know what reviewers will typically look for) and reviewers (to guide them in a structured review process). Items do not need to be checked explicitly for a PR to be eligible for merging. Purpose and scope
Code quality
Documentation
Testing
Performance
Verification
Created with ❤️ by the Trixi.jl community. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2698 +/- ##
==========================================
- Coverage 96.84% 96.83% -0.01%
==========================================
Files 550 550
Lines 43427 43433 +6
==========================================
+ Hits 42054 42056 +2
- Misses 1373 1377 +4
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Ok, would you say it makes then sense to redirect only parts of the summary callback? I would in that case probably still send everything to stdout. |
DanielDoehring
left a comment
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.
Could you add a redirect to file in an elixir to showcase this?
|
We could also make the |
|
Failing Documenter seems to be because of JuliaDocs/Documenter.jl#1245 and JuliaDocs/Documenter.jl#1580. |
Done. I also added a field |
…ork/Trixi.jl into io-analysiscallback
io to AnalysisCallback and SummaryCallbackio to Analysis, Alive, and Summary Callbacks
|
The Documenter.jl bug is a bit unfortunate because I don't see any good way to work around this. |
Yeah looks like we need a force merge here. Maybe you can ask on the Trixi slack |
I would not do that because the failure is not spurious. It is real and comes from the changes of this PR. It is just because of a bug in Documenter.jl (or rather their helper package IOCapture.jl). |
This reverts commit fe1c5a8.
That's a good idea 👍 |
Yes, that's annoying... Was there a specific application you had in mind to introduce the new feature in this PR? |
Sometimes I want to print the output of the summary callback to |
I did that in 35777ff. |
This allows to manually set the
io, which theAnalysisCallbackandSummaryCallbackprint to instead of using hardcodedstdout. Previously, it was possible to useredirect_stdout, but that was not so intuitive to use. The only part, which is still hardcoded to print tostdoutis the final timer summary from TimerOutputs.jl from theSummaryCallback, but that is not so straightforward to allow for customization because theSummaryCallbackis not an individualstruct, but rather directly wrapped into aDiscreteCallback, i.e., it cannot hold any additional fields, which means that theiopassed initially is forgotten at the end of the simulation.