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

Update to Jupyterlab 3.0 #551

Merged
merged 18 commits into from
Jan 14, 2021
Merged

Update to Jupyterlab 3.0 #551

merged 18 commits into from
Jan 14, 2021

Conversation

ajbozarth
Copy link
Member

@ajbozarth ajbozarth commented Nov 3, 2020

Updates dependancies to Jupyterlab 3.0 rc6 and preemptively increments a major version to allow for testing with jupyterlab-git extension, sister PR at jupyterlab/jupyterlab-git#818

Marked as draft until 3.0 release when this PR will be updated.

Also includes major version update
@ajbozarth
Copy link
Member Author

@lresende

@ajbozarth ajbozarth marked this pull request as ready for review December 9, 2020 02:16
@ajbozarth
Copy link
Member Author

@vidartf I just updated this and tested that it works with rc13. Is there any way we could merge this as is and release an rc? That would allow for easier review and editing of jupyterlab/jupyterlab-git#818 which depends on this update.

@vidartf
Copy link
Collaborator

vidartf commented Dec 14, 2020

@ajbozarth Thanks for this. A few questions:

  • It seems to me as if this PR will cause nbdime to no longer be available as a server extension for jupyter notebook. As there are likely still a decent amount of users on that platform, it would be nice to still offer it. Do you know if there is a way to retain support for that while also making it available as a jupyter server extension? (cc @Zsailer )
  • Will this PR also add support for nbdime being used as a federated pre-built extension? I'm happy to do that in a separate step, but I assume from the diff that it does not ?

@ajbozarth
Copy link
Member Author

@vidartf

It seems to me as if this PR will cause nbdime to no longer be available as a server extension for jupyter notebook. As there are likely still a decent amount of users on that platform, it would be nice to still offer it. Do you know if there is a way to retain support for that while also making it available as a jupyter server extension? (cc @Zsailer )

Thanks for reminding me of this, it was unintentional, I was unable to get the notebook extension working on 3.0 so I just updated it to a server extension to fix it. @Zsailer is there a way to support both at once? if not I'll try to roll this back and continue to debug why the notebook extension isn't working on 3.0

Will this PR also add support for nbdime being used as a federated pre-built extension? I'm happy to do that in a separate step, but I assume from the diff that it does not ?

This is intentional my part, as I mentioned in a dev meeting I'm focusing on updating extensions first to work on 3.0 "as is" for a quick turn-around release to unblock downstream dependencies then follow up later with any updates to to the new pre-build extensions

@Zsailer
Copy link
Member

Zsailer commented Dec 14, 2020

Yup, you can get an extension to work both in classic notebook and jupyter_server.

These docs should be helpful in Jupyter Server.

@Zsailer
Copy link
Member

Zsailer commented Dec 14, 2020

As a side note, I tested nbdime against jupyter_server + classic notebook here: https://github.com/Zsailer/jpserver-extension-check

nbdime should work as-is thanks to nbclassic (though it's not a bad idea to update things).

@ajbozarth
Copy link
Member Author

@Zsailer thank you, I'll follow up on this later today

@ajbozarth
Copy link
Member Author

I've pushed an update that should reenable the notebook server extension for nbclassic, but as far as I can tell only the jupyter server extension works with 3.0

@Zsailer that link to the check you shared only checks if the extension is successfully installed, which it is. What I'm seeing when I only install the serverextension and not the server extension is I get 404s from the nbdime API. We saw the same issue when upgrading Elyra, in fact I've personally yet to see a serverextension not give 404s on lab 3.0

@vidartf
Copy link
Collaborator

vidartf commented Dec 18, 2020

@ajbozarth / @Zsailer Any news on the server extension parts? Please note that there are unittests for the server extensions that are all failing right now.

@ajbozarth
Copy link
Member Author

We figured out the build issues and I'm updating the docs now. I'll take a look at the tests this afternoon once I finish the docs.

@ajbozarth
Copy link
Member Author

Sorry this stalled, I have wip doc and tests for this ready as of late last Friday but haven't had time to finish it up since my holiday vacation started. I'm hoping to take a hour or so sometime when I have a chance to get those updates finished and pushed. Should find time before New Years, hopefully before Christmas.

@vidartf
Copy link
Collaborator

vidartf commented Jan 4, 2021

As noted in #552 (comment), we will also need to figure out how to get MathJax onto the page for typsetting equations, as it will no longer be available via the notebook package.

@ajbozarth
Copy link
Member Author

I am back from holiday and working on this again, I should have new updates pushed by EOD

@ajbozarth
Copy link
Member Author

@vidartf This is ready to merge for a rc release. We still need to figure out what's causing the CI failure, but the tests only seem to fail on CI and not locally. Since this is blocking development of jupyterlab/jupyterlab-git#818 it would be better to merge, cut the rc, then address the tests in a follow up PR prior to a final release.

@vidartf
Copy link
Collaborator

vidartf commented Jan 7, 2021

I'm getting failures locally as well:

file <repo root>\nbdime\tests\test_jupyter_server_extension.py, line 55
  @pytest.mark.timeout(timeout=WEB_TEST_TIMEOUT)
  async def test_isgit(git_repo2, jp_fetch):
      r = await jp_fetch(
          'nbdime/api/isgit',
          method='POST',
          body=json.dumps({
              'path': git_repo2,
          })
      )
      code, body = read_response(r)
      assert body == {'is_git': True}
file <env root>\lib\site-packages\jupyter_server\pytest_plugin.py, line 324
  @pytest.fixture
  def jp_fetch(jp_serverapp, http_server_client, jp_auth_header, jp_base_url):
file <env root>\lib\site-packages\jupyter_server\pytest_plugin.py, line 291
  @pytest.fixture(scope="function")
  def jp_serverapp(
file <env root>\lib\site-packages\jupyter_server\pytest_plugin.py, line 199
  @pytest.fixture(scope='function')
  def jp_configurable_serverapp(
file <env root>\lib\site-packages\jupyter_server\pytest_plugin.py, line 173
  @pytest.fixture
  def jp_http_port(http_server_port):
E       fixture 'http_server_port' not found

Seems to be an issue with the jupyter_server pytest plugin (missing dependency? wrong version of a dependency?)

@vidartf
Copy link
Collaborator

vidartf commented Jan 7, 2021

It seems that jupyter-server's dependency pytest-tornasync conflicts with nbdime's dependency pytest-tornado (they share some fixture names).

@vidartf
Copy link
Collaborator

vidartf commented Jan 7, 2021

I've pushed a commit that fixes the tests. There is currently only a single test failing, the "offline mathjax" test when used as an extension for jupyter server. I'm currently planning to create a separate jupyter server extension that will expose these resources, and have nbdime depend on this. I'll try to do a final review on this PR, merge and do a pre-release this week, and then open a separate issue/PR to resolve the MathJax issue as a blocker for a final release.

Copy link
Collaborator

@vidartf vidartf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Most looks good now, thanks for the effort! 👍 I have some minor points for input below, but nothing that should be a lot of work.

nbdime/__init__.py Show resolved Hide resolved
nbdime/webapp/nb_server_extension.py Outdated Show resolved Hide resolved
packages/nbdime/package.json Outdated Show resolved Hide resolved
@ajbozarth
Copy link
Member Author

@vidartf do you think we're close to merging this and cutting an rc? It would help enable review of the down stream git-extension PR

@vidartf
Copy link
Collaborator

vidartf commented Jan 12, 2021

I'm working on fixing the JS tests, but if I can't fix them by EOD tomorrow, I'll try to just release an RC as-is.

@vidartf
Copy link
Collaborator

vidartf commented Jan 14, 2021

Turns out the new nbformat release also breaks CI (cf #553 ), but I'll cut a beta.

@vidartf vidartf merged commit a0726e5 into jupyter:master Jan 14, 2021
This was referenced Jan 14, 2021
@vidartf
Copy link
Collaborator

vidartf commented Jan 14, 2021

I've done beta releases base off of c823623

@ajbozarth
Copy link
Member Author

Do we have a timeline on a final release of 3.0?

@dhirschfeld dhirschfeld mentioned this pull request Mar 28, 2021
4 tasks
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

Successfully merging this pull request may close these issues.

3 participants