-
Notifications
You must be signed in to change notification settings - Fork 35
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
Explicitly install nose
to unbreak tests
#64
Conversation
Strange, now we're getting yet a different error on both Python 3.8 and 3.9 (3.7 seems to be fine):
|
Looks like this is an issue with recently-released IPython 8.0.0 (https://pypi.org/project/ipython/#history shows it was released on Jan 12, 2022) — since we specify Looks like IPython 8.0.0 is not compatible with Python 3.7, so there we get an earlier version:
whereas for Python 3.8 and 3.9, we're getting IPython 8.0:
Thus, the solution here is to update |
The command `nosetests` appears to have disappeared from the GitHub Actions images for Python 3.8 and 3.9 on all versions of Ubuntu and macOS, so let's try installing it manually to fix the tests in the short-term. During the development of [this change][1], we've learned that ipycache is not compatible with recently-released IPython 8.0.0, so we've updated `requirements.txt` to require a version of IPython prior to 8.0.0; additionally, we re-enabled testing with Python 2.7 since we'll need to update our code in the future to be compatible with `nose2`, so until we drop support for Python 2.7, we should be testing with that version as well. Closes rossant#63 [1]: rossant#64
2c44c99
to
857c46b
Compare
The new error is:
An earlier test run included the following helpful guidance:
and https://nbformat.readthedocs.io/en/latest/api.html shows that there should be a -from IPython.nbformat.current import read
+from IPython.nbformat import read to address this issue. |
The command `nosetests` appears to have disappeared from the GitHub Actions images for Python 3.8 and 3.9 on all versions of Ubuntu and macOS, so let's try installing it manually to fix the tests in the short-term. During the development of [this change][1], we've learned that ipycache is not compatible with recently-released IPython 8.0.0, so we've updated `requirements.txt` to require a version of IPython prior to 8.0.0; additionally, we re-enabled testing with Python 2.7 since we'll need to update our code in the future to be compatible with `nose2`, so until we drop support for Python 2.7, we should be testing with that version as well. Closes rossant#63 [1]: rossant#64
857c46b
to
80727b6
Compare
The command `nosetests` appears to have disappeared from the GitHub Actions images for Python 3.8 and 3.9 on all versions of Ubuntu and macOS, so let's try installing it manually to fix the tests in the short-term. During the development of [this change][1], we've learned that ipycache is not compatible with recently-released IPython 8.0.0, so we've updated `requirements.txt` to require a version of IPython prior to 8.0.0; additionally, we re-enabled testing with Python 2.7 since we'll need to update our code in the future to be compatible with `nose2`, so until we drop support for Python 2.7, we should be testing with that version as well. We're also manually installing `nbformat` and changed the import `IPython.nbformat.current` to use top-level `nbformat` instead. Closes rossant#63 [1]: rossant#64
80727b6
to
389f04c
Compare
Nope, that didn't work either:
Next approach to try is: -from IPython.nbformat import read
+from nbformat import read and manually install |
We're making progress, but it still doesn't work:
We will next attempt the following change: -from IPython.kernel import KernelManager
+from jupyter_client.manager import KernelManager and install |
The command `nosetests` appears to have disappeared from the GitHub Actions images for Python 3.8 and 3.9 on all versions of Ubuntu and macOS, so let's try installing it manually to fix the tests in the short-term. During the development of [this change][1], we've learned that ipycache is not compatible with recently-released IPython 8, so we updated `requirements.txt` to require a version of IPython prior to 8; additionally, we re-enabled testing with Python 2.7 since we'll need to update our code in the future to be compatible with `nose2`, so until we drop support for Python 2.7, we should be testing with that version as well. Replace import `IPython.nbformat.current` with `nbformat` and install `nbformat` module. Replace `from IPython.kernel import KernelManager` with `from jupyter_client.manager import KernelManager` and install `jupyter-client`. Closes rossant#63 [1]: rossant#64
389f04c
to
f4eaada
Compare
The command `nosetests` appears to have disappeared from the GitHub Actions images for Python 3.8 and 3.9 on all versions of Ubuntu and macOS, so let's try installing it manually to fix the tests in the short-term. During the development of [this change][1], we've learned that ipycache is not compatible with recently-released IPython 8, so we updated `requirements.txt` to require a version of IPython prior to 8; additionally, we re-enabled testing with Python 2.7 since we'll need to update our code in the future to be compatible with `nose2`, so until we drop support for Python 2.7, we should be testing with that version as well. Replace import `IPython.nbformat.current` with `nbformat` and install `nbformat` module. Replace `from IPython.kernel import KernelManager` with `from jupyter_client.manager import KernelManager` and install `jupyter-client`. Closes rossant#63 [1]: rossant#64
f4eaada
to
f2d71dd
Compare
Looks like the new problem: is:
Specifically, the following line of code is problematic with this version of
because Let's see the versions of our notebooks: $ grep nbformat examples/*
examples/capture_output.ipynb: "nbformat": 3,
examples/capture_output.ipynb: "nbformat_minor": 0,
examples/example.ipynb: "nbformat": 3,
examples/example.ipynb: "nbformat_minor": 0,
examples/example_outputs.ipynb: "nbformat": 3,
examples/example_outputs.ipynb: "nbformat_minor": 0, Looks like they're all version 3, so we can make the following change: -nb = read(open(notebook), 'json')
+nb = read(open(notebook), as_version=3) |
Failing again. Python 2.7 tests failed with:
So we could go with 4.4.0 (which may resolve other issues as well). Python 3.7 failed with:
which is curious, as we don't specify Per this SO answer, it seems that we need to manually install the |
The command `nosetests` appears to have disappeared from the GitHub Actions images for Python 3.8 and 3.9 on all versions of Ubuntu and macOS, so let's try installing it manually to fix the tests in the short-term. During the development of [this change][1], we've learned that ipycache is not compatible with recently-released IPython 8, so we updated `requirements.txt` to require a version of IPython prior to 8; additionally, we re-enabled testing with Python 2.7 since we'll need to update our code in the future to be compatible with `nose2`, so until we drop support for Python 2.7, we should be testing with that version as well. Replace import `IPython.nbformat.current` with `nbformat` and install `nbformat` module. Replace `from IPython.kernel import KernelManager` with `from jupyter_client.manager import KernelManager` and install `jupyter-client`. Also install `ipykernel` package to address the error message "jupyter_client.kernelspec.NoSuchKernel: No such kernel named python3". Closes rossant#63 [1]: rossant#64
f2d71dd
to
ba99046
Compare
We're making some progress! Tests now pass on Python 3.7 and 3.8. Python 2.7 fails with:
We could use Python 3.9 fails with:
Which seems to be a failure purely due to |
The command `nosetests` appears to have disappeared from the GitHub Actions images for Python 3.8 and 3.9 on all versions of Ubuntu and macOS, so let's try installing it manually to fix the tests in the short-term. During the development of [this change][1], we've learned that ipycache is not compatible with recently-released IPython 8, so we updated `requirements.txt` to require a version of IPython prior to 8; additionally, we re-enabled testing with Python 2.7 since we'll need to update our code in the future to be compatible with `nose2`, so until we drop support for Python 2.7, we should be testing with that version as well. Replace import `IPython.nbformat.current` with `nbformat` and install `nbformat` module. Replace `from IPython.kernel import KernelManager` with `from jupyter_client.manager import KernelManager` and install `jupyter-client`. Also install `ipykernel` package to address the error message "jupyter_client.kernelspec.NoSuchKernel: No such kernel named python3". Closes rossant#63 [1]: rossant#64
ba99046
to
9f74e27
Compare
Python 2.7 now fails with:
so let's try Python 3.9 is failing with:
which is the same error we saw previously, so it's not due to Per jupyter/nbformat#215, this is due to our use of Thus, we can either drop support for Python 2.7 immediately or we can create a separate Let's try creating a separate |
The command `nosetests` appears to have disappeared from the GitHub Actions images for Python 3.8 and 3.9 on all versions of Ubuntu and macOS, so let's try installing it manually to fix the tests in the short-term. During the development of [this change][1], we've learned that ipycache is not compatible with recently-released IPython 8, so we updated `requirements.txt` to require a version of IPython prior to 8; additionally, we re-enabled testing with Python 2.7 since we'll need to update our code in the future to be compatible with `nose2`, so until we drop support for Python 2.7, we should be testing with that version as well. Replace import `IPython.nbformat.current` with `nbformat` and install `nbformat` module. Replace `from IPython.kernel import KernelManager` with `from jupyter_client.manager import KernelManager` and install `jupyter-client`. Also install `ipykernel` package to address the error message "jupyter_client.kernelspec.NoSuchKernel: No such kernel named python3". Create a separate `test_requirements_python27.txt` with old versions of dependencies to support Python 2.7, and upgrade dependencies in `test_requirements.txt` to the latest versions for the newest Python 3.x releases. Closes rossant#63 [1]: rossant#64
9f74e27
to
87e230b
Compare
Looks like Python 3.7, 3.8, and 3.9 are passing! But both Python 2.7 and 3.x are being installed in all cases, so Python 2.7 is failing. We'll need to fix the YAML syntax of GitHub Actions |
The command `nosetests` appears to have disappeared from the GitHub Actions images for Python 3.8 and 3.9 on all versions of Ubuntu and macOS, so let's try installing it manually to fix the tests in the short-term. During the development of [this change][1], we've learned that ipycache is not compatible with recently-released IPython 8, so we updated `requirements.txt` to require a version of IPython prior to 8; additionally, we re-enabled testing with Python 2.7 since we'll need to update our code in the future to be compatible with `nose2`, so until we drop support for Python 2.7, we should be testing with that version as well. Replace import `IPython.nbformat.current` with `nbformat` and install `nbformat` module. Replace `from IPython.kernel import KernelManager` with `from jupyter_client.manager import KernelManager` and install `jupyter-client`. Also install `ipykernel` package to address the error message "jupyter_client.kernelspec.NoSuchKernel: No such kernel named python3". Create a separate `test_requirements_python27.txt` with old versions of dependencies to support Python 2.7, and upgrade dependencies in `test_requirements.txt` to the latest versions for the newest Python 3.x releases. Closes rossant#63 [1]: rossant#64
87e230b
to
6936625
Compare
Success!! 🎉 All tests finally pass across the full matrix of Python and OS versions. |
The command
nosetests
appears to have disappeared from the GitHub Actionsimages for Python 3.8 and 3.9 on all versions of Ubuntu and macOS, so let's try
installing it manually to fix the tests in the short-term.
Closes #63