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

[RF] Translated 2 RooStats tutorials to PyROOT #13558

Merged
merged 4 commits into from
Nov 14, 2023

Conversation

akeemlh
Copy link
Contributor

@akeemlh akeemlh commented Aug 29, 2023

This Pull request:

Changes or fixes:

Adds StandardProfileInspectorDemo.py and StandardProfileLikelihoodDemo.py, from StandardProfileInspectorDemo.C and StandardProfileLikelihoodDemo.C. Also fixes a typo in StandardProfileInspectorDemo.C and a comment in TMVA_Higgs_Classification.py.

Checklist:

  • tested changes locally
  • updated the docs (if necessary)
  • formatted with black (black --line-length=120 <tutorial file>.py)

This PR contributes to #8758

@phsft-bot
Copy link
Collaborator

Can one of the admins verify this patch?

@akeemlh akeemlh marked this pull request as ready for review August 29, 2023 05:32
@akeemlh akeemlh requested a review from couet as a code owner August 29, 2023 05:32
@guitargeek guitargeek requested review from guitargeek and removed request for couet August 29, 2023 08:37
@guitargeek guitargeek self-assigned this Aug 29, 2023
@guitargeek guitargeek changed the title Translated 2 RooStats tutorials to PyROOT [RF] Translated 2 RooStats tutorials to PyROOT Aug 29, 2023
@guitargeek
Copy link
Contributor

@phsft-bot build

@phsft-bot
Copy link
Collaborator

Starting build on ROOT-performance-centos8-multicore/soversion, ROOT-ubuntu2204/nortcxxmod, ROOT-ubuntu2004/python3, mac11/noimt, mac12arm/cxx20, windows10/default
How to customize builds

@phsft-bot
Copy link
Collaborator

Build failed on ROOT-ubuntu2204/nortcxxmod.
Running on root-ubuntu-2204-2.cern.ch:/home/sftnight/build/workspace/root-pullrequests-build
See console output.

Failing tests:

@github-actions
Copy link

github-actions bot commented Aug 29, 2023

Test Results

       11 files         11 suites   1d 19h 35m 17s ⏱️
  2 483 tests   2 480 ✔️ 0 💤 3
26 242 runs  26 237 ✔️ 0 💤 5

For more details on these failures, see this check.

Results for commit 8f0611e.

♻️ This comment has been updated with latest results.

@akeemlh
Copy link
Contributor Author

akeemlh commented Oct 7, 2023

@guitargeek any updates on this?

akeemlh and others added 4 commits November 14, 2023 17:35
For his translations of RooStats tutorials
* Get rid of checks if files or objects in the file were found. It's
  ROOTs responsability to error out nicely if something is not found,
  not the responsability of the tutorials

* Use f-formatting in Python to be more concise

* Use Python iteration patters

* Use pythonic `len()` instead of `GetSize()`

* Use native Python string instead of `TString`

* In Python, one can retrieve objects in the `RooWorkspace with
  `workspace[obj_name]` independent of the type, which is preferred
  because it's more Pythonic
Copy link
Contributor

@guitargeek guitargeek left a comment

Choose a reason for hiding this comment

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

Excellent work, thanks for taking the initiative and opening the PR 👍👍

Sorry for the late reply. We first had to focus on getting ROOT 6.30 ready, which will be released any day.

I have added a commit with some changes to make the Python versions more Pythonic (see more detail in the commit logs). I hope this helps you also to learn writing more Pythonic PyROOT code in the future (hopefully also in more contributions like this one 🙂 )

I already pushed the changes to your branch, when the CI is green I will merge this.

I also added you to the list of contributors, so that you will appear in the release notes of ROOT 6.32.

@guitargeek
Copy link
Contributor

@phsft-bot build

@phsft-bot
Copy link
Collaborator

Starting build on ROOT-performance-centos8-multicore/soversion, ROOT-ubuntu2204/nortcxxmod, ROOT-ubuntu2004/python3, mac12arm/cxx20, windows10/default
How to customize builds

@phsft-bot
Copy link
Collaborator

Build failed on ROOT-ubuntu2004/python3.
Running on root-ubuntu-2004-3.cern.ch:/home/sftnight/build/workspace/root-pullrequests-build
See console output.

Failing tests:

@guitargeek guitargeek merged commit c6c1599 into root-project:master Nov 14, 2023
10 of 16 checks passed
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.

None yet

3 participants