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

ExtensionApp: change extension_name to name. #232

Merged
merged 3 commits into from
Jun 5, 2020

Conversation

Zsailer
Copy link
Member

@Zsailer Zsailer commented May 19, 2020

Changes the extension_name trait to name in ExtensionApp.

This addresses issues in #222 and #224. @echarles

@echarles
Copy link
Member

Thx @Zsailer. So for now this PR doesn't pick the python extension standard mecanism but we stick with the _jupyter_server_extension_paths?

I have pulled the changes and updated the example. I fail with

  File "/Users/echar4/datalayer/repos/jupyter-server/examples/simple/simple_ext1/application.py", line 48, in initialize_handlers
    (r'/{}/default'.format(self.extension_name), DefaultHandler),
AttributeError: 'SimpleApp1' object has no attribute 'extension_name'

@Zsailer
Copy link
Member Author

Zsailer commented May 20, 2020

That’s right, @echarles. I think the entry point discussion can be separated from this for now. We’ll discuss that at our next server meeting.

I’ll update the examples directory next

@echarles
Copy link
Member

Cool! Having a way to create e.g. jupyter_lab_config,.py will be an excellent first step (PS: I won't be able to join today meeting)

@Zsailer
Copy link
Member Author

Zsailer commented Jun 1, 2020

I've updated the examples (sorry for the delay, here).

This should be ready for merge.

@echarles
Copy link
Member

echarles commented Jun 2, 2020

Thx Zach. There are still some extension_name used, at least here.

https://github.com/Zsailer/jupyter_server/blob/ff7826636e9a47665eb6a99ae1d28982441941e6/examples/simple/simple_ext1/application.py#L48-L53

BTW As discussed, I will open a PR to run the examples by GitHub Actions.

Copy link
Member

@echarles echarles left a comment

Choose a reason for hiding this comment

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

Works fine for me. Thx Zach for doing this.

@Zsailer
Copy link
Member Author

Zsailer commented Jun 5, 2020

Thanks, @echarles. Merging!

@Zsailer Zsailer merged commit ad3bbca into jupyter-server:master Jun 5, 2020
@echarles
Copy link
Member

echarles commented Jun 8, 2020

@Zsailer I have updated the jlab branches to latest master including this PR.

It works, but when I change name=jupyterlab to name=lab, I receive exeception

  File "/Users/echar4/datalayer/repos/jupyter-server/jupyter_server/serverapp.py", line 1534, in init_server_extensions
    mod, metadata_list = _get_server_extension_metadata(module_name)
  File "/Users/echar4/datalayer/repos/jupyter-server/jupyter_server/extension/serverextension.py", line 43, in _get_server_extension_metadata
    m = import_item(module)
  File "/opt/datalayer/opt/miniconda3/envs/datalayer/lib/python3.7/site-packages/traitlets/utils/importstring.py", line 43, in import_item
    return __import__(parts[0])
ModuleNotFoundError: No module named 'lab'

I have nailed down the issue but we need to discuss about that.

@echarles
Copy link
Member

echarles commented Jun 8, 2020

@Zsailer for example, if you change in the simple_ext1 the name and you say name = 'ext1', the server launches fine with jupyter server --ServerApp.jpserver_extensions="{'ext1': True}" but fails with python -m simple_ext1 or launched via the entrypoints.

@blink1073 blink1073 added this to the 1.0 Release milestone Sep 17, 2020
Zsailer added a commit to Zsailer/jupyter_server that referenced this pull request Nov 18, 2022
* when websocket closes, reopen a new one

* stabilize kernel blocked websocket too

* handle websockets closed on purpose

* add new telemetry listener to consolidate some logic

* create separate websockets for each telemetry event

* turn telemetry listener into singleton and single websocket

* add a test for telemetry listerner

* add test for reconnecting when a window is not hidden

* skip test that came from cookiecutter
hMED22 pushed a commit to hMED22/jupyter_server that referenced this pull request Jan 23, 2023
ExtensionApp: change extension_name to name.
@Zsailer Zsailer deleted the extension_name branch January 16, 2024 21:47
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.

None yet

3 participants