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

Suggestion: resolve test warnings #32

Open
oesteban opened this issue Nov 14, 2022 · 0 comments
Open

Suggestion: resolve test warnings #32

oesteban opened this issue Nov 14, 2022 · 0 comments

Comments

@oesteban
Copy link
Contributor

Congratulations on the test deployment, I successfully run python -m pip install -r test_requirements.txt and subsequently:

(nipraxis-nme) oesteban@hos65851:~/workspace/nipraxis/diagnostics-NME$ pytest .
======================================================================================================================================================================================================= test session starts ========================================================================================================================================================================================================
platform linux -- Python 3.9.13, pytest-7.2.0, pluggy-1.0.0
rootdir: /data/home/oesteban/workspace/nipraxis/diagnostics-NME, configfile: pytest.ini
collected 3 items                                                                                                                                                                                                                                                                                                                                                                                                                  

findoutlie/tests/test_detectors.py .                                                                                                                                                                                                                                                                                                                                                                                         [ 33%]
findoutlie/tests/test_dvars.py .                                                                                                                                                                                                                                                                                                                                                                                             [ 66%]
findoutlie/tests/test_spm_funcs.py .                                                                                                                                                                                                                                                                                                                                                                                         [100%]

========================================================================================================================================================================================================= warnings summary =========================================================================================================================================================================================================
findoutlie/tests/test_detectors.py::test_iqr_detector
findoutlie/tests/test_detectors.py::test_iqr_detector
  /data/home/oesteban/workspace/nipraxis/diagnostics-NME/findoutlie/detectors.py:121: DeprecationWarning: the `interpolation=` argument to percentile was renamed to `method=`, which has additional options.
  Users of the modes 'nearest', 'lower', 'higher', or 'midpoint' are encouraged to review the method they used. (Deprecated NumPy 1.22)
    Q1 = np.percentile(measures, 25, interpolation="midpoint")

findoutlie/tests/test_detectors.py::test_iqr_detector
findoutlie/tests/test_detectors.py::test_iqr_detector
  /data/home/oesteban/workspace/nipraxis/diagnostics-NME/findoutlie/detectors.py:122: DeprecationWarning: the `interpolation=` argument to percentile was renamed to `method=`, which has additional options.
  Users of the modes 'nearest', 'lower', 'higher', or 'midpoint' are encouraged to review the method they used. (Deprecated NumPy 1.22)
    Q2 = np.percentile(measures, 50, interpolation="midpoint")

findoutlie/tests/test_detectors.py::test_iqr_detector
findoutlie/tests/test_detectors.py::test_iqr_detector
  /data/home/oesteban/workspace/nipraxis/diagnostics-NME/findoutlie/detectors.py:123: DeprecationWarning: the `interpolation=` argument to percentile was renamed to `method=`, which has additional options.
  Users of the modes 'nearest', 'lower', 'higher', or 'midpoint' are encouraged to review the method they used. (Deprecated NumPy 1.22)
    Q3 = np.percentile(measures, 75, interpolation="midpoint")

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

As you can see, there are three deprecations (all in the same function). Ensuring you address deprecation in time will save maintenance time in the long term.

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

No branches or pull requests

1 participant