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

Add cmd line arg to suppress header output #29669

Merged
merged 2 commits into from
Feb 6, 2025

Conversation

tophmatthews
Copy link
Contributor

@tophmatthews tophmatthews commented Jan 9, 2025

Combined #29663 into this. Changed the header output stream to _console, and added command line arg to suppress header output. Added command line arg to MooseTestApp to optionally print a header to allow testing.

Closes #29662

@tophmatthews tophmatthews force-pushed the header_suppress_29662 branch from ca8cd71 to 1c1b30b Compare January 9, 2025 16:44
@moosebuild
Copy link
Contributor

moosebuild commented Jan 9, 2025

Job Coverage, step Generate coverage on 510f565 wanted to post the following:

Framework coverage

f5a14f #29669 510f56
Total Total +/- New
Rate 85.23% 85.24% +0.00% 100.00%
Hits 108490 108494 +4 5
Misses 18794 18790 -4 0

Diff coverage report

Full coverage report

Modules coverage

Coverage did not change

Full coverage reports

Reports

This comment will be updated on new commits.

@tophmatthews tophmatthews mentioned this pull request Jan 9, 2025
@tophmatthews tophmatthews force-pushed the header_suppress_29662 branch 2 times, most recently from e25f75a to 3ba6e2e Compare January 9, 2025 21:01
@tophmatthews tophmatthews marked this pull request as ready for review January 9, 2025 21:10
@tophmatthews
Copy link
Contributor Author

tophmatthews commented Jan 9, 2025

Can someone pass judgement on including a test on this @GiudGiud @loganharbour @pbehne ? The simplest is a header() in MooseTestApp like 9e54f63

@loganharbour
Copy link
Member

Can someone pass judgement on including a test on this @GiudGiud @loganharbour @pbehne ? The simplest is a header() in MooseTestApp like 9e54f63

I think we should just make another dummy app for it so that we don't get a header in every moose_test-opt run

@tophmatthews
Copy link
Contributor Author

Could also put a header in MiscApp

@loganharbour
Copy link
Member

Could also put a header in MiscApp

I don't like testing framework content outside of the framework. misc testing doesn't contribute to framework coverage for example.

If we don't want another app, we can just do something silly like --test-set-header="foo" in MooseTestApp and then have header() return that result. So the header only shows up when we set it to. Goofy cause we'll basically have

--suppress-header --test-set-header="foo"

but we've done worse.

@moosebuild
Copy link
Contributor

moosebuild commented Jan 9, 2025

Job Documentation, step Docs: sync website on 510f565 wanted to post the following:

View the site here

This comment will be updated on new commits.

@tophmatthews
Copy link
Contributor Author

tophmatthews commented Jan 10, 2025

--test-set-header="foo"

Nice! I like this option! I kinda need the fix for setGlobalCommandLineParam @loganharbour is working on to cascade to all subapp levels first to do it right, but I'll whip something up before that fix is done.

@tophmatthews
Copy link
Contributor Author

Pretty easy to put

  params.addCommandLineParam<std::string>(
      "append_header", "--append_header <header>", "String to print at top of console output");

in MooseApp.C too for someone that may want that optoin...any reason to or just leave it in MooseTestApp.C?

@GiudGiud
Copy link
Contributor

It's not very useful imo

@tophmatthews tophmatthews force-pushed the header_suppress_29662 branch from 3ba6e2e to 106a83b Compare January 10, 2025 18:04
@tophmatthews
Copy link
Contributor Author

This works for cascading to subapps @loganharbour ...maybe that previous fix you suggested did work 😬

@tophmatthews
Copy link
Contributor Author

Alright, ready for review!

@YaqiWang
Copy link
Contributor

Does this #29671 fix the missing prefix in the indentation reported in the issue?

@tophmatthews
Copy link
Contributor Author

Does this #29671 fix the missing prefix in the indentation reported in the issue?

Yeah mostly, but this still adds the capability to turn off the header.

This is good to go for review @loganharbour . Thanks!

framework/src/base/MooseApp.C Outdated Show resolved Hide resolved
test/src/base/MooseTestApp.C Show resolved Hide resolved
test/src/base/MooseTestApp.C Show resolved Hide resolved
@loganharbour loganharbour merged commit 758838b into idaholab:next Feb 6, 2025
51 checks passed
@tophmatthews
Copy link
Contributor Author

Thanks @loganharbour !

@tophmatthews tophmatthews deleted the header_suppress_29662 branch February 6, 2025 18:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

use _console for app header
5 participants