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

[MRG] preparse subcommands in an extensionapps #133

Merged
merged 1 commit into from
Nov 15, 2019

Conversation

Zsailer
Copy link
Member

@Zsailer Zsailer commented Oct 31, 2019

Here's my proposed fix for handling subcommands in ExtensionApps. This essentially preparses the command line, looking for any subcommands called from the CLI.

tl;dr

The problem is that traitlet's parse_command_line method both parses the command line and loads configuration for the current instance of the JupyterApp. The coupling of these two things causes issues for the ExtensionApp, which is a hierarchical chain of JupyterApps. Loading the config before initializing the ServerApp leads to trouble. Preparsing the command line and exiting the current application if a subapp or --help flag is present solves the issue.

@echarles this would replace #125

@echarles
Copy link
Member

echarles commented Nov 1, 2019

@Zsailer Tried this branch with jupyter lab as a server extension and jupyter lab build work fine.

LGTM

@Zsailer
Copy link
Member Author

Zsailer commented Nov 8, 2019

Merging this tomorrow unless anyone objects.

@Zsailer Zsailer changed the title preparse subcommands in an extensionapps [MRG] preparse subcommands in an extensionapps Nov 8, 2019
@vidartf vidartf merged commit 7b7b192 into jupyter-server:master Nov 15, 2019
@Zsailer Zsailer deleted the subcommands branch January 10, 2020 17:35
Zsailer added a commit to Zsailer/jupyter_server that referenced this pull request Nov 18, 2022
* add debug

* Bump to 0.12.2
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