chrisjsewell / pytest-notebook

A pytest plugin for regression testing and regenerating Jupyter Notebooks
https://pytest-notebook.readthedocs.io
BSD 3-Clause "New" or "Revised" License
47 stars 9 forks source link

pytest-notebook on Conda-forge out of date #40

Closed mhvwerts closed 8 months ago

mhvwerts commented 10 months ago

Many thanks for pytest-notebook. When installing it using conda/Conda-forge and trying it out, I ran into an incompatibility issue with nbconvert (#10), which has been solved since version 0.7.0.

It turns out that the present version on Conda-forge is 0.6.1 (over 2 years old). For now, I installed using pip, but it would of course be preferable to have a more recent version also on Conda-forge.

chrisjsewell commented 10 months ago

Done 👍 https://github.com/conda-forge/pytest-notebook-feedstock/pull/10

mhvwerts commented 10 months ago

Thanks. I'll try it out.

Apparently, somewhere along the way, the dash in pytest-notebook has become an underscore in Conda-forge: pytest_notebook. Confusingly, two conda packages actually co-exists now:

The installation instructions for conda presently lead to installation of the obsolete version.

It might be a good idea to change the underscore back to a dash in the conda package name, if possible, such that the pip and conda packages have the same name.

chrisjsewell commented 10 months ago

ah stupid conda lol

mhvwerts commented 10 months ago

https://github.com/conda-forge/pytest-notebook-feedstock/pull/8/commits/44259c59550d8dd83e1db462647da8e799d1f641

chrisjsewell commented 10 months ago

Yeh this is because it needs to link to https://pypi.io/packages/source/p/pytest_notebook/pytest_notebook-v0.8.1.tar.gz; you know that pip normalises - \ _ , so pip install pytest_notebook is exactly the same as pip install pytest-notebook, but conda does not normalize, so you have to do e.g. https://github.com/conda-forge/importlib_resources-feedstock/blob/fee669df78940da030671ad650eac5e99bb34cf8/recipe/meta.yaml#L37

mhvwerts commented 10 months ago

I didn't know this subtlety. I'll stick with the underscore for now!

chrisjsewell commented 10 months ago

yep thats technically what its on pypi as: https://pypi.org/project/pytest_notebook/

mhvwerts commented 10 months ago

I have been able to install using conda (more precisely: mamba... hard to keep up for slow people like me). conda install pytest_notebook (mind the underscore) And now I can further explore this very useful program/package/plug-in. Great!

It may be wise to update the installation instructions in the documentation to have the package name with the underscore.

Also, the link to the Conda badge (as used in README.md) would better be changed to point to the pytest_notebook package. I do not know where the link to that badge is defined. The line in README.md just reads [![Conda][conda-badge]][conda-link]

Anyways, it works for me now. Thanks for your help!