minaskar / pocomc

pocoMC: A Python implementation of Preconditioned Monte Carlo for accelerated Bayesian Computation
https://pocomc.readthedocs.io
GNU General Public License v3.0
86 stars 9 forks source link

Warning in running pytest #16

Closed kazewong closed 2 years ago

kazewong commented 2 years ago

I got these two minor warnings when I am running pytest. Please consider adjusting the testing scripts and code to remove the warnings.

platform linux -- Python 3.9.12, pytest-7.1.2, pluggy-1.0.0
rootdir: /mnt/home/wwong/Software/PublicCode/pocomc
collected 33 items                                                                                                                     

tests/test_flow.py ..............                                                                                                [ 42%]
tests/test_pearson.py .                                                                                                          [ 45%]
tests/test_plotting.py ...                                                                                                       [ 54%]
tests/test_sampler.py .....                                                                                                      [ 69%]
tests/test_scaler.py .....                                                                                                       [ 84%]
tests/test_state.py ....                                                                                                         [ 96%]
tests/test_tools.py .                                                                                                            [100%]

=========================================================== warnings summary ===========================================================
pocomc/scaler.py:1
  /mnt/home/wwong/Software/PublicCode/pocomc/pocomc/scaler.py:1: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
    import imp

tests/test_flow.py::FlowTestCase::test_logprob_float64
  /mnt/home/wwong/Software/PublicCode/pocomc/pocomc/tools.py:239: UserWarning: Float64 data is currently unsupported, casting to Float32. Output will also have type Float32.
    warnings.warn(f"Float64 data is currently unsupported, casting to Float32. Output will also have type Float32.")

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

https://github.com/openjournals/joss-reviews/issues/4634

davidnabergoj commented 2 years ago

Thanks, this has been fixed in 579dc8e93d065cc82cbf6494de5d292401eb24b9.