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

Allow metadata for launcher items #7654

Merged
merged 4 commits into from Dec 23, 2019
Merged

Conversation

blink1073
Copy link
Member

@blink1073 blink1073 commented Dec 18, 2019

References

Fixes #7652.

Code changes

Allows optional metadata to be passed to launcher items, and passes in the kernel metadata for the items created by notebooks and consoles.

User-facing changes

None, for the current implementation of the launcher.

Backwards-incompatible changes

None

@blink1073 blink1073 added this to the 2.0 milestone Dec 18, 2019
@jupyterlab-dev-mode
Copy link

@jupyterlab-dev-mode jupyterlab-dev-mode bot commented Dec 18, 2019

Thanks for making a pull request to JupyterLab!

To try out this branch on binder, follow this link: Binder

afshin
afshin approved these changes Dec 23, 2019
Copy link
Member

@afshin afshin left a comment

👍 , pending rebase

@@ -190,7 +191,8 @@ async function activateConsole(
args: { isLauncher: true, kernelPreference: { name } },
category: 'Console',
rank,
kernelIconUrl
kernelIconUrl,
metadata: spec.metadata
Copy link
Contributor

@jasongrout jasongrout Dec 23, 2019

Choose a reason for hiding this comment

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

It feels like we should namespace the kernel spec metadata so items can have other metadata too. For example, metadata: {kernel: spec.metadata} or something.

Copy link
Member

@afshin afshin Dec 23, 2019

Choose a reason for hiding this comment

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

Hm. That's a good point. 👍

Copy link
Member Author

@blink1073 blink1073 Dec 23, 2019

Choose a reason for hiding this comment

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

That's fair, I'll make the change.

* Metadata about the item. This can be used by the launcher to
* affect how the item is displayed.
*/
metadata?: ReadonlyJSONObject;
Copy link
Contributor

@jasongrout jasongrout Dec 23, 2019

Choose a reason for hiding this comment

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

Perhaps the default implementation should display this metadata somewhere? It feels a bit weird to include metadata without using it anywhere. Presumably you have an overridden launcher that actually is using the metadata?

Copy link
Member Author

@blink1073 blink1073 Dec 23, 2019

Choose a reason for hiding this comment

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

Yes, this change was meant to allow experimentation without needing to override core extensions like notebook and console.

Copy link
Contributor

@jasongrout jasongrout Dec 23, 2019

Choose a reason for hiding this comment

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

Sure, okay.

@jasongrout
Copy link
Contributor

@jasongrout jasongrout commented Dec 23, 2019

Looks like the failures are legit

Steven Silvester added 2 commits Dec 23, 2019
@blink1073 blink1073 merged commit ecfe2cb into jupyterlab:master Dec 23, 2019
10 checks passed
@lock lock bot added the status:resolved-locked label Jan 24, 2020
@lock lock bot locked as resolved and limited conversation to collaborators Jan 24, 2020
@blink1073 blink1073 deleted the launcher-metadata branch Mar 29, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
pkg:launcher status:resolved-locked
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants