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

3.1.3: pytest warnings #440

Open
kloczek opened this issue Sep 28, 2022 · 1 comment
Open

3.1.3: pytest warnings #440

kloczek opened this issue Sep 28, 2022 · 1 comment

Comments

@kloczek
Copy link

kloczek commented Sep 28, 2022

I'm packaging your module as an rpm package so I'm using the typical PEP517 based build, install and test cycle used on building packages from non-root account.

  • python3 -sBm build -w --no-isolation
  • because I'm calling build with --no-isolation I'm using during all processes only locally installed modules
  • install .whl file in </install/prefix>
  • run pytest with PYTHONPATH pointing to sitearch and sitelib inside </install/prefix>

Here is pytest output:

+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-emcee-3.1.3-2.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-emcee-3.1.3-2.fc35.x86_64/usr/lib/python3.8/site-packages
+ /usr/bin/pytest -ra -p no:cacheprovider
=========================================================================== test session starts ============================================================================
platform linux -- Python 3.8.14, pytest-7.1.3, pluggy-1.0.0
rootdir: /home/tkloczko/rpmbuild/BUILD/emcee-3.1.3
collected 93 items

src/emcee/tests/integration/test_de.py ...                                                                                                                           [  3%]
src/emcee/tests/integration/test_de_snooker.py ..                                                                                                                    [  5%]
src/emcee/tests/integration/test_gaussian.py ............                                                                                                            [ 18%]
src/emcee/tests/integration/test_kde.py ...                                                                                                                          [ 21%]
src/emcee/tests/integration/test_longdouble.py ..                                                                                                                    [ 23%]
src/emcee/tests/integration/test_stretch.py .....                                                                                                                    [ 29%]
src/emcee/tests/integration/test_walk.py ..                                                                                                                          [ 31%]
src/emcee/tests/unit/test_autocorr.py ....                                                                                                                           [ 35%]
src/emcee/tests/unit/test_backends.py s..ssss.s                                                                                                                      [ 45%]
src/emcee/tests/unit/test_blobs.py ..........                                                                                                                        [ 55%]
src/emcee/tests/unit/test_ensemble.py .......                                                                                                                        [ 63%]
src/emcee/tests/unit/test_sampler.py ..............................                                                                                                  [ 95%]
src/emcee/tests/unit/test_state.py ...                                                                                                                               [ 98%]
src/emcee/tests/unit/test_stretch.py .                                                                                                                               [100%]

============================================================================= warnings summary =============================================================================
src/emcee/tests/unit/test_ensemble.py::TestNamedParameters::test_run_mcmc
  /home/tkloczko/rpmbuild/BUILD/emcee-3.1.3/src/emcee/utils.py:23: DeprecationWarning: 'chain' is deprecated. Use 'get_chain()' instead.
    deprecation_warning(msg)

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
========================================================================= short test summary info ==========================================================================
SKIPPED [1] src/emcee/tests/unit/test_backends.py:64: HDF5 not available
SKIPPED [1] src/emcee/tests/unit/test_backends.py:101: got empty parameter set ['backend', 'dtype', 'blobs'], function test_backend at /home/tkloczko/rpmbuild/BUILD/emcee-3.1.3/src/emcee/tests/unit/test_backends.py:100
SKIPPED [1] src/emcee/tests/unit/test_backends.py:142: got empty parameter set ['backend', 'dtype'], function test_reload at /home/tkloczko/rpmbuild/BUILD/emcee-3.1.3/src/emcee/tests/unit/test_backends.py:141
SKIPPED [1] src/emcee/tests/unit/test_backends.py:186: got empty parameter set ['backend', 'dtype'], function test_restart at /home/tkloczko/rpmbuild/BUILD/emcee-3.1.3/src/emcee/tests/unit/test_backends.py:185
SKIPPED [1] src/emcee/tests/unit/test_backends.py:218: HDF5 not available
SKIPPED [1] src/emcee/tests/unit/test_backends.py:268: HDF5 not available
=========================================================== 87 passed, 6 skipped, 1 warning in 136.15s (0:02:16) ===========================================================

Here is list of installed modules in build env

Package                       Version
----------------------------- -----------------
alabaster                     0.7.12
appdirs                       1.4.4
asttokens                     2.0.5
attrs                         22.1.0
Babel                         2.10.2
backcall                      0.2.0
Brlapi                        0.8.3
build                         0.8.0
charset-normalizer            2.1.0
click                         8.1.3
codespell                     2.2.1
cssselect                     1.1.0
debugpy                       1.6.3
decorator                     5.1.1
distro                        1.7.0
dnspython                     2.2.1
docutils                      0.18.1
entrypoints                   0.4
executing                     1.1.0
extras                        1.0.0
fastjsonschema                2.16.1
fixtures                      4.0.0
gpg                           1.17.1-unknown
greenlet                      1.1.2
idna                          3.4
imagesize                     1.4.1
importlib-metadata            4.12.0
importlib-resources           5.9.0
iniconfig                     1.1.1
ipykernel                     6.16.0
ipython                       8.4.0
jedi                          0.18.1
Jinja2                        3.1.1
jsonschema                    4.16.0
jupyter-cache                 0.5.0
jupyter_client                7.3.5
jupyter_core                  4.11.1
libcomps                      0.1.19
louis                         3.23.0
lxml                          4.9.1
markdown-it-py                2.1.0
MarkupSafe                    2.1.1
matplotlib-inline             0.1.5
mdit-py-plugins               0.3.0
mdurl                         0.1.1
myst-nb                       0.16.0
myst-parser                   0.18.0
nbclient                      0.6.8
nbformat                      5.6.1
nest-asyncio                  1.5.5
numpy                         1.23.1
packaging                     21.3
parso                         0.8.3
pbr                           5.9.0
pep517                        0.12.0
pexpect                       4.8.0
pickleshare                   0.7.5
pip                           22.2.2
pkgutil_resolve_name          1.3.10
pluggy                        1.0.0
prompt-toolkit                3.0.29
psutil                        5.9.2
ptyprocess                    0.7.0
pure-eval                     0.2.2
py                            1.11.0
Pygments                      2.13.0
PyGObject                     3.42.2
pyparsing                     3.0.9
pyrsistent                    0.18.1
pytest                        7.1.3
python-dateutil               2.8.2
pytz                          2022.1
PyYAML                        6.0
pyzmq                         24.0.0
requests                      2.28.1
rpm                           4.17.0
ruamel.yaml                   0.17.21
ruamel.yaml.clib              0.2.6
scour                         0.38.2
setuptools                    65.4.0
setuptools-scm                7.0.5
six                           1.16.0
snowballstemmer               2.2.0
Sphinx                        5.2.2
sphinx-togglebutton           0.3.2
sphinxcontrib-applehelp       1.0.2.dev20220730
sphinxcontrib-devhelp         1.0.2.dev20220730
sphinxcontrib-htmlhelp        2.0.0
sphinxcontrib-jsmath          1.0.1.dev20220730
sphinxcontrib-qthelp          1.0.3.dev20220730
sphinxcontrib-serializinghtml 1.1.5
SQLAlchemy                    1.4.41.dev0
stack-data                    0.5.1
tabulate                      0.8.10
testtools                     2.5.0
tomli                         2.0.1
tornado                       6.2
traitlets                     5.4.0
typing_extensions             4.3.0
urllib3                       1.26.12
wcwidth                       0.2.5
wheel                         0.37.1
xmltodict                     0.12.0
zipp                          3.8.1
@dfm
Copy link
Owner

dfm commented Sep 28, 2022

Thanks! That DeprecationWarning is expected (it's testing backwards compatibility) and has been happening since v3.0 🤦 We should catch it and silence it! Otherwise, things look fine to me.

stefanarseneau added a commit to stefanarseneau/emcee that referenced this issue Apr 5, 2024
noticed issue dfm#440, undid previous commit, and supressed the warning in this instance
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

2 participants