Skip to content

Conversation

@hageboeck
Copy link
Member

@hageboeck hageboeck commented Jun 26, 2020

This depends on #5998

  • TMVA was somehow vetoing dataframe python tutorials. These have been reactivated.
  • The vetoing logic in general has been overhauled, so it's more straight-forward, and the number of active / vetoed tutorials is correctly reported by cmake.
  • Fix a few tutorials that wouldn't launch or compile.

Overhaul of veto-or-fail when python packages are missing

Disable (instead of veto) python tutorials that cannot work when python packages are missing. This happens by listing the required packages when registering the test or tutorial:

ROOT_ADD_PYUNITTEST(pyroot_pyz_ttree_branch ttree_branch.py PYTHON_DEPS numpy)

Before launching the tutorial/test, cmake will run a fixture, which is a simple import <package>. If this passes, all dependent tutorials/tests are run. If it fails, it looks like this:
image

The advantage of this is that one doesn't even have to open the test output, because cmake already communicates clearly that the failure is due to missing packages.

As discussed in Moday's meeting, all tests with extra runtime dependencies now are also labelled python_runtime_deps. This gets assigned automatically if PYTHON_DEPS is not empty.

@hageboeck hageboeck requested a review from eguiraud June 26, 2020 17:01
@hageboeck hageboeck requested review from couet and oshadura as code owners June 26, 2020 17:01
@hageboeck hageboeck self-assigned this Jun 26, 2020
@phsft-bot
Copy link

Starting build on ROOT-debian10-i386/cxx14, ROOT-performance-centos7-multicore/default, ROOT-fedora30/cxx14, ROOT-fedora31/noimt, ROOT-ubuntu16/nortcxxmod, mac1014/python3, mac1015/cxx17, windows10/cxx14
How to customize builds

@phsft-bot
Copy link

Starting build on ROOT-debian10-i386/cxx14, ROOT-performance-centos7-multicore/default, ROOT-fedora30/cxx14, ROOT-fedora31/noimt, ROOT-ubuntu16/nortcxxmod, mac1014/python3, mac1015/cxx17, windows10/cxx14
How to customize builds

Copy link
Contributor

@eguiraud eguiraud left a comment

Choose a reason for hiding this comment

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

Looks good to me, I cannot approve just because I am not sure that our policy w.r.t. the pandas and numba tutorials is to deactivate them at configure time if the package is not there. At some point there was a discussion and I think the outcome was to always keep these tutorials in and install pandas and numba on all build nodes. I might be misremembering or might have missed further developments.

So I'd ask @Axel-Naumann or @stwunsch to give a final approval

@hageboeck
Copy link
Member Author

At some point there was a discussion and I think the outcome was to always keep these tutorials in and install pandas and numba on all build nodes.

That's fair, but users who don't have either of them installed will get broken tests if they choose to run the tests.

@eguiraud
Copy link
Contributor

Between silently not running tutorials (like we were doing until this PR, thank you very much for spotting and fixing it) and leaving those very rare users that run our full test suite with a few red python tutorials/tests (with error messages that say "please install pandas/numba"), I'd say the latter is preferable 😄

There might be a third option I don't see at the moment. In any case, I'm leaving the approval in the hands of who knows better than me :D

@phsft-bot
Copy link

Starting build on ROOT-debian10-i386/cxx14, ROOT-performance-centos7-multicore/default, ROOT-fedora30/cxx14, ROOT-fedora31/noimt, ROOT-ubuntu16/nortcxxmod, mac1014/python3, mac1015/cxx17, windows10/cxx14
How to customize builds

@phsft-bot
Copy link

@pcanal
Copy link
Member

pcanal commented Jun 26, 2020

That's fair, but users who don't have either of them installed will get broken tests if they choose to run the tests.

Well ... for what it is worth, I am one those users ... (and a minimal build would also be one of those users, wouldn't it be?). If the ROOT build configure successfully and build successfully, then ctest should be clean also. I.e. roottest failing because numba is not installed would, in my opinion, means that the cmake configure step of ROOT should fail if numba is not installed ... i.e. numba would become a hard dependency.

@Axel-Naumann
Copy link
Member

Let's not rehash the discussion some of us already had (with the exact same arguments), and ideally not in writing on GitHub. Instead it might be more efficient to discuss this at a team meeting. I won't be able to attend on Monday; I suggest we discuss this in nine days.

@phsft-bot
Copy link

Starting build on ROOT-debian10-i386/cxx14, ROOT-performance-centos7-multicore/default, ROOT-fedora30/cxx14, ROOT-fedora31/noimt, ROOT-ubuntu16/nortcxxmod, mac1014/python3, mac1015/cxx17, windows10/cxx14
How to customize builds

@hageboeck
Copy link
Member Author

hageboeck commented Jun 29, 2020

Well ... for what it is worth, I am one those users ... (and a minimal build would also be one of those users, wouldn't it be?).

I agree (hence this PR), but I think I have found a solution (@Axel-Naumann). Look at this:

ctest -R df026
Test project /home/shageboe/root-archNative-clang
    Start 797: tutorial-dataframe-df026_AsNumpyArrays-py
1/1 Test #797: tutorial-dataframe-df026_AsNumpyArrays-py ...***Not Run (Disabled)   0.00 sec
No tests were found!!!

CMake's DISABLED property can be used already in 3.9, and disabled tests are listed, but don't run.
Apparently, they are even reported to cdash. I'm curious now how jenkins handles them.

@phsft-bot
Copy link

@phsft-bot
Copy link

Starting build on ROOT-debian10-i386/cxx14, ROOT-performance-centos7-multicore/default, ROOT-fedora30/cxx14, ROOT-fedora31/noimt, ROOT-ubuntu16/nortcxxmod, mac1014/python3, mac1015/cxx17, windows10/cxx14
How to customize builds

@phsft-bot
Copy link

Build failed on ROOT-performance-centos7-multicore/default.
Running on olhswep22.cern.ch:/data/sftnight/workspace/root-pullrequests-build
See cdash.
See console output.

Errors:

  • [2020-06-29T16:59:30.085Z] 1184/2067 Test Limit CMake search for RootTestDriver.cmake #949: tutorial-dataframe-df105_WBosonAnalysis-py ........................................................***Failed Error regular expression found in output. Regex=[: error:] 1.36 sec

Failing tests:

@phsft-bot
Copy link

Starting build on ROOT-debian10-i386/cxx14, ROOT-performance-centos7-multicore/default, ROOT-fedora30/cxx14, ROOT-fedora31/noimt, ROOT-ubuntu16/nortcxxmod, mac1014/python3, mac1015/cxx17, windows10/cxx14
How to customize builds

@phsft-bot
Copy link

Build failed on windows10/cxx14.
See cdash.
See console output.

@phsft-bot
Copy link

Build failed on ROOT-performance-centos7-multicore/default.
Running on olhswep22.cern.ch:/data/sftnight/workspace/root-pullrequests-build
See cdash.
See console output.

Errors:

  • [2020-06-30T08:04:51.745Z] CMake Error at /data/sftnight/workspace/root-pullrequests-build/rootspi/jenkins/root-build.cmake:970 (message):

@phsft-bot
Copy link

Build failed on ROOT-debian10-i386/cxx14.
Running on pcepsft11.dyndns.cern.ch:/home/sftnight/build/workspace/root-pullrequests-build
See cdash.
See console output.

Errors:

  • [2020-06-30T08:05:21.034Z] CMake Error at /home/sftnight/build/workspace/root-pullrequests-build/rootspi/jenkins/root-build.cmake:970 (message):

@phsft-bot
Copy link

Build failed on ROOT-fedora30/cxx14.
Running on root-fedora30-1.cern.ch:/build/workspace/root-pullrequests-build
See cdash.
See console output.

Errors:

  • [2020-06-30T08:05:34.156Z] CMake Error at /build/workspace/root-pullrequests-build/rootspi/jenkins/root-build.cmake:970 (message):

@phsft-bot
Copy link

Build failed on ROOT-debian10-i386/cxx14.
Running on pcepsft10.dyndns.cern.ch:/build/workspace/root-pullrequests-build
See cdash.
See console output.

Failing tests:

@phsft-bot
Copy link

Build failed on ROOT-performance-centos7-multicore/default.
Running on olhswep22.cern.ch:/data/sftnight/workspace/root-pullrequests-build
See cdash.
See console output.

Failing tests:

@phsft-bot
Copy link

Build failed on mac1015/cxx17.
Running on macphsft20.dyndns.cern.ch:/Users/sftnight/build/workspace/root-pullrequests-build
See cdash.
See console output.

Failing tests:

@phsft-bot
Copy link

Build failed on ROOT-ubuntu16/nortcxxmod.
Running on sft-ubuntu-1604-4.cern.ch:/build/workspace/root-pullrequests-build
See cdash.
See console output.

Failing tests:

@phsft-bot
Copy link

Build failed on mac1014/python3.
Running on macitois21.cern.ch:/build/jenkins/workspace/root-pullrequests-build
See cdash.
See console output.

Failing tests:

@phsft-bot
Copy link

Starting build on ROOT-debian10-i386/cxx14, ROOT-performance-centos7-multicore/default, ROOT-fedora30/cxx14, ROOT-fedora31/noimt, ROOT-ubuntu16/nortcxxmod, mac1014/python3, mac1015/cxx17, windows10/cxx14
How to customize builds

@phsft-bot
Copy link

Build failed on ROOT-performance-centos7-multicore/default.
Running on olhswep22.cern.ch:/data/sftnight/workspace/root-pullrequests-build
See cdash.
See console output.

Errors:

Failing tests:

@phsft-bot
Copy link

Build failed on ROOT-ubuntu16/nortcxxmod.
Running on sft-ubuntu-1604-4.cern.ch:/build/workspace/root-pullrequests-build
See cdash.
See console output.

Failing tests:

@phsft-bot
Copy link

Build failed on mac1015/cxx17.
Running on macphsft18.dyndns.cern.ch:/Users/sftnight/build/jenkins/workspace/root-pullrequests-build
See cdash.
See console output.

Failing tests:

- python tutorials were only globbed using tutorials/*/*py, so some
missed. Now recursive globbing is applied.
- Vetoing tutorials, e.g. when components are not active, was done in
two places, one for C++ and one for python. Now, blocks such as
    if(NOT dataframe)
      ..
    endif()
take care of both the python and C++ vetos in a single location.
This reduces the chance of forgetting to veto/enable some tutorials.
- CMake now correctly reports how many tutorials have been activated,
both for python and C++.
- For an unknown reason, tmva was vetoing both tmva and dataframe
python tutorials if xgboost was not found. In this commit, this is
fixed, and the veto code becomes more readable.
- Since keras is not a "required" dependency, the keras tutorials remain
deactivated if it's not found. Previously, they were never run, anyway.
If a test requires a specific python packge, this can now (and should!)
be communicated using the argument PYTHON_DEPS when registering the test.
This will trigger the addition of a test fixture, which checks for this
package.
This fixture is a simple ctest that tries to import the requested
package. If the fixture passes, all dependent tests run. If the fixture
fails, the dependent test don't run, but are all marked as failed
because of the missing package.

This makes tests faster and failures easier to diagnose, because it becomes
obvious that those tests failed because of the missing package, and not
because there's another problem in the test.

Further, the tests that have python runtime dependencies will
automatically be labelled with "python_runtime_deps".
@phsft-bot
Copy link

Starting build on ROOT-debian10-i386/cxx14, ROOT-performance-centos7-multicore/default, ROOT-fedora30/cxx14, ROOT-fedora31/noimt, ROOT-ubuntu16/nortcxxmod, mac1014/python3, mac1015/cxx17, windows10/cxx14
How to customize builds

@phsft-bot
Copy link

Build failed on windows10/cxx14.
Running on null:C:\build\workspace\root-pullrequests-build
See cdash.
See console output.

Errors:

  • [2020-07-10T07:52:42.835Z] C:\build\workspace\root-pullrequests-build\root\interpreter\llvm\src\utils\TableGen\PseudoLoweringEmitter.cpp(302,1): fatal error C1088: Cannot flush compiler intermediate file: 'C:\Users\sftnight\AppData\Local\Temp_CL_46a76b07gl': No space left on device [C:\build\workspace\root-pullrequests-build\build\interpreter\llvm\src\utils\TableGen\obj.llvm-tblgen.vcxproj]
  • [2020-07-10T07:52:42.835Z] C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.23.28105\include\xtree(1013,1): fatal error C1088: Cannot flush compiler intermediate file: 'C:\Users\sftnight\AppData\Local\Temp_CL_286e062edb': No space left on device (compiling source file C:\build\workspace\root-pullrequests-build\root\interpreter\llvm\src\utils\TableGen\FastISelEmitter.cpp) [C:\build\workspace\root-pullrequests-build\build\interpreter\llvm\src\utils\TableGen\obj.llvm-tblgen.vcxproj]
  • [2020-07-10T07:52:43.127Z] C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.23.28105\include\xstring(369,1): fatal error C1088: Cannot flush compiler intermediate file: 'C:\Users\sftnight\AppData\Local\Temp_CL_aef2642cex': No space left on device (compiling source file C:\build\workspace\root-pullrequests-build\root\interpreter\llvm\src\utils\TableGen\X86DisassemblerTables.cpp) [C:\build\workspace\root-pullrequests-build\build\interpreter\llvm\src\utils\TableGen\obj.llvm-tblgen.vcxproj]
  • [2020-07-10T07:52:56.266Z] C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.23.28105\include\stdexcept(86,1): fatal error C1088: Cannot flush compiler intermediate file: 'C:\Users\sftnight\AppData\Local\Temp_CL_9e977784ex': No space left on device (compiling source file C:\build\workspace\root-pullrequests-build\root\interpreter\llvm\src\lib\Support\CachePruning.cpp) [C:\build\workspace\root-pullrequests-build\build\interpreter\llvm\src\lib\Support\LLVMSupport.vcxproj]
  • [2020-07-10T07:52:56.266Z] C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.23.28105\include\stdexcept(89,1): fatal error C1088: Cannot flush compiler intermediate file: 'C:\Users\sftnight\AppData\Local\Temp_CL_ea4df062ex': No space left on device (compiling source file C:\build\workspace\root-pullrequests-build\root\interpreter\llvm\src\lib\Support\ARMWinEH.cpp) [C:\build\workspace\root-pullrequests-build\build\interpreter\llvm\src\lib\Support\LLVMSupport.vcxproj]
  • [2020-07-10T07:52:56.266Z] C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.23.28105\include\stdexcept(89,1): fatal error C1088: Cannot flush compiler intermediate file: 'C:\Users\sftnight\AppData\Local\Temp_CL_1473b954ex': No space left on device (compiling source file C:\build\workspace\root-pullrequests-build\root\interpreter\llvm\src\lib\Support\BinaryStreamWriter.cpp) [C:\build\workspace\root-pullrequests-build\build\interpreter\llvm\src\lib\Support\LLVMSupport.vcxproj]
  • [2020-07-10T07:52:56.266Z] C:\build\workspace\root-pullrequests-build\root\interpreter\llvm\src\include\llvm/ADT/Twine.h(427,1): fatal error C1088: Cannot flush compiler intermediate file: 'C:\Users\sftnight\AppData\Local\Temp_CL_a210118cex': No space left on device (compiling source file C:\build\workspace\root-pullrequests-build\root\interpreter\llvm\src\lib\TableGen\Record.cpp) [C:\build\workspace\root-pullrequests-build\build\interpreter\llvm\src\lib\TableGen\LLVMTableGen.vcxproj]
  • [2020-07-10T07:52:56.266Z] C:\build\workspace\root-pullrequests-build\root\interpreter\llvm\src\include\llvm/ADT/APSInt.h(60,27): fatal error C1088: Cannot flush compiler intermediate file: 'C:\Users\sftnight\AppData\Local\Temp_CL_bdc881besy': No space left on device (compiling source file C:\build\workspace\root-pullrequests-build\root\interpreter\llvm\src\lib\Support\APSInt.cpp) [C:\build\workspace\root-pullrequests-build\build\interpreter\llvm\src\lib\Support\LLVMSupport.vcxproj]
  • [2020-07-10T07:52:56.266Z] C:\build\workspace\root-pullrequests-build\root\interpreter\llvm\src\include\llvm/ADT/StringRef.h(85,9): fatal error C1088: Cannot flush compiler intermediate file: 'C:\Users\sftnight\AppData\Local\Temp_CL_b0e54054db': No space left on device (compiling source file C:\build\workspace\root-pullrequests-build\root\interpreter\llvm\src\lib\TableGen\SetTheory.cpp) [C:\build\workspace\root-pullrequests-build\build\interpreter\llvm\src\lib\TableGen\LLVMTableGen.vcxproj]
  • [2020-07-10T07:52:56.266Z] C:\build\workspace\root-pullrequests-build\root\interpreter\llvm\src\include\llvm/TableGen/Record.h(1512,2): fatal error C1088: Cannot flush compiler intermediate file: 'C:\Users\sftnight\AppData\Local\Temp_CL_1e9234c9sy': No space left on device (compiling source file C:\build\workspace\root-pullrequests-build\root\interpreter\llvm\src\lib\TableGen\TGParser.cpp) [C:\build\workspace\root-pullrequests-build\build\interpreter\llvm\src\lib\TableGen\LLVMTableGen.vcxproj]

And 19 more

[ROOT-10921] Until pandas is installed on the CI nodes,
df026 needs to stay disabled.
@phsft-bot
Copy link

Starting build on ROOT-debian10-i386/cxx14, ROOT-performance-centos7-multicore/default, ROOT-fedora30/cxx14, ROOT-fedora31/noimt, ROOT-ubuntu16/nortcxxmod, mac1014/python3, mac1015/cxx17, windows10/cxx14
How to customize builds

Copy link
Collaborator

@oshadura oshadura left a comment

Choose a reason for hiding this comment

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

Just wow! Many thanks, you did amazing job!

@hageboeck hageboeck merged commit e510b54 into root-project:master Jul 15, 2020
@hageboeck hageboeck deleted the tutorialVetos branch July 15, 2020 12:11
guitargeek added a commit to guitargeek/root that referenced this pull request Jun 11, 2025
Follows up on root-project#5938, adding support for the `PYTHON_DEPS` argument also
to the `ROOTTEST_ADD_TEST` macro.

Use this functionality to disable JupyROOT tests if the relevant
libraries are not available.
guitargeek added a commit that referenced this pull request Jun 12, 2025
Follows up on #5938, adding support for the `PYTHON_DEPS` argument also
to the `ROOTTEST_ADD_TEST` macro.

Use this functionality to disable JupyROOT tests if the relevant
libraries are not available.
martinfoell pushed a commit to martinfoell/root that referenced this pull request Oct 9, 2025
Follows up on root-project#5938, adding support for the `PYTHON_DEPS` argument also
to the `ROOTTEST_ADD_TEST` macro.

Use this functionality to disable JupyROOT tests if the relevant
libraries are not available.
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.

7 participants