vatlab / sos-notebook

Multi-language Jupyter Notebook
http://vatlab.github.io/SoS
BSD 3-Clause "New" or "Revised" License
174 stars 17 forks source link

sos-notebook tests fail because `ipykernel.tests` are no longer available #354

Open gaow opened 5 months ago

gaow commented 5 months ago

Rephrased from bug identified by @danielnachun: In our test,

import unittest

from sos_notebook.test_utils import sos_kernel
from ipykernel.tests.utils import execute, wait_for_idle, assemble_output

the last line does not work anymore, because even though this exists on GitHub, https://github.com/ipython/ipykernel/blob/main/tests/utils.py the pypi release does not contain it anymore: in the pyproject.toml for ipykernel on PyPI:

omit = [
  "tests/*",
  "ipykernel/datapub.py",
  "ipykernel/debugger.py",
  "ipykernel/eventloops.py",
  "ipykernel/log.py",
  "ipykernel/pickleutil.py",
  "ipykernel/serialize.py",
  "ipykernel/gui/*",
  "ipykernel/pylab/*",
]

So that means the tests folder is skipped by pip install. This results in failed tests of sos-notebook and thus rejection of any further updates to conda-forge. Not sure what our options are (other than removing tests) since it seems to be out of our hands that they decided to not include them. Or we copy and ship the test util with sos-notebook?

danielnachun commented 5 months ago

For some additional context, it appears that the ipykernel feedstock itself had to change their tests due to the removal of the tests folder: https://github.com/conda-forge/ipykernel-feedstock/commit/fc14970cb299531232a4a7d4d97e3dea9328fb97#diff-c10e3d50805f921125df35bc18bfc5df56bccf46ce05cf55b9c374176ded18d0. It's not really clear what the successor to the unit testing framework is supposed to be, aside from just copying the code, and this could still be challenging because we'd have to maintain API compatibility with ipykernel.