Skip to content

Conversation

@nsmith-
Copy link
Owner

@nsmith- nsmith- commented Feb 14, 2024

We could also use cmscombine conda package in tests to avoid the warning

@nsmith- nsmith- changed the title Improve test a bit Prefer RooParametricHist in test Apr 10, 2025
@nsmith- nsmith- marked this pull request as ready for review April 10, 2025 12:04
@nsmith-
Copy link
Owner Author

nsmith- commented Apr 10, 2025

 =============================== warnings summary ===============================
tests/test_rhalphalib.py::test_rhalphabet
  /home/runner/work/rhalphalib/rhalphalib/.nox/tests-python-3-9-root-6-22-08/lib/python3.9/site-packages/rhalphalib/function.py:285: UserWarning: BernsteinPoly is deprecated. Consider switching to BasisPoly(..., basis='Bernstein', ...)
    warnings.warn("BernsteinPoly is deprecated. Consider switching to BasisPoly(..., basis='Bernstein', ...)")

tests/test_rhalphalib.py::test_rhalphabet
tests/test_rhalphalib.py::test_monojet
  /home/runner/work/rhalphalib/rhalphalib/.nox/tests-python-3-9-root-6-22-08/lib/python3.9/site-packages/rhalphalib/sample.py:676: RuntimeWarning: Could not load RooParametricHist, falling back to RooParametricStepFunction, which has strange rounding issues.
  Set ParametericSample.PreferRooParametricHist = False to disable this warning
    warnings.warn(

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
======================== 2 passed, 3 warnings in 38.81s ========================

@nsmith-
Copy link
Owner Author

nsmith- commented Apr 11, 2025

I think for now it's probably fine to have that warning in the CI test. We could remove it by running CI with cmscombine conda package installed to provide RooParametricHist

@nsmith- nsmith- requested a review from rkansal47 April 11, 2025 15:44
Copy link
Collaborator

@rkansal47 rkansal47 left a comment

Choose a reason for hiding this comment

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

LGTM. Got rid of the first warning, now:

=============================== warnings summary ===============================
tests/test_rhalphalib.py::test_rhalphabet
tests/test_rhalphalib.py::test_monojet
  /home/runner/work/rhalphalib/rhalphalib/.nox/tests-python-3-9-root-6-22-08/lib/python3.9/site-packages/rhalphalib/sample.py:676: RuntimeWarning: Could not load RooParametricHist, falling back to RooParametricStepFunction, which has strange rounding issues.
  Set ParametericSample.PreferRooParametricHist = False to disable this warning
    warnings.warn(

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
======================== 2 passed, 2 warnings in 35.96s ========================

@rkansal47 rkansal47 merged commit 2da9548 into master May 14, 2025
9 checks passed
@nsmith- nsmith- deleted the improvetest branch May 14, 2025 13:42
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.

4 participants