root icon indicating copy to clipboard operation
root copied to clipboard

[core,pyroot] add ROOT_BATCH environment variable

Open fwinkl opened this issue 7 months ago • 5 comments

Add new ROOT_BATCH environment variable to initialize the batch mode as an alternative to using the -b command line switch.

Strictly speaking only the changes in TApplication are necessary (as that one always gets instantiated before TROOT). But logically it makes sense to also check the variable in TROOT.

Also switch the tutorial tests to using ROOT_BATCH instead of a .rootlogon.py file.

Fixes #18744.

fwinkl avatar May 19 '25 08:05 fwinkl

Thanks @fwinkl . Before starting the CI, would it be perhaps possible to steer the bahviour of ROOT through the value of the ROOT_BATCH environment variable (1 batch, 0 normal) and not its mere existence?

dpiparo avatar May 19 '25 08:05 dpiparo

Thanks @fwinkl . Before starting the CI, would it be perhaps possible to steer the bahviour of ROOT through the value of the ROOT_BATCH environment variable (1 batch, 0 normal) and not its mere existence?

I considered that but then one would also need to decide what happens if someone uses the root -b command line switch and sets ROOT_BATCH=0. Which one should have precedence?

fwinkl avatar May 19 '25 09:05 fwinkl

Test Results

    21 files      21 suites   3d 21h 42m 36s ⏱️  3 747 tests  3 746 ✅ 0 💤 1 ❌ 76 820 runs  76 819 ✅ 0 💤 1 ❌

For more details on these failures, see this check.

Results for commit 4b050044.

:recycle: This comment has been updated with latest results.

github-actions[bot] avatar May 19 '25 13:05 github-actions[bot]

Not clear to me if these test failure are related to my changes. I also added the changes to the tutorial tests as suggested by @guitargeek on #18744.

fwinkl avatar May 20 '25 10:05 fwinkl

@dpiparo, is there anything that needs to be done from my side to move this forward?

fwinkl avatar Jun 05 '25 14:06 fwinkl

I resolved the conflicts. I would appreciate if this could be merged soon. It's been sitting here since 4 months.

fwinkl avatar Sep 18 '25 13:09 fwinkl

Let me try to ping here again. @dpiparo or @guitargeek, could we please move this PR forward? I would really like to see this in the next ROOT release as it would make setting batch mode in ATLAS a lot easier than what we have now.

fwinkl avatar Nov 12 '25 07:11 fwinkl

Let me try to ping here again. @dpiparo or @guitargeek, could we please move this PR forward? I would really like to see this in the next ROOT release as it would make setting batch mode in ATLAS a lot easier than what we have now.

Yes, sorry for missing this. I launched the tests to merge is ASAP. Thanks for the ping!

guitargeek avatar Nov 12 '25 08:11 guitargeek

I'm also interested in this and will test it once merged. I don't see this variable being documented, and more in general, are these documented anywhere? For example, ROOT_WEBENV.

jmcarcell avatar Nov 12 '25 08:11 jmcarcell

I'm also interested in this and will test it once merged. I don't see this variable being documented, and more in general, are these documented anywhere? For example, ROOT_WEBENV.

I think most of these variables are documented in the default .rootrc file. But given that we are close to the release, I'd suggest we first merge this PR and I follow up with the documentation later, to make sure that this gets into 6.38.

guitargeek avatar Nov 12 '25 09:11 guitargeek