jupyter / enhancement-proposals

Enhancement proposals for the Jupyter Ecosystem
https://jupyter.org/enhancement-proposals
BSD 3-Clause "New" or "Revised" License
115 stars 65 forks source link

Kernelspec JSON schema #105

Closed JohanMabille closed 3 months ago

JohanMabille commented 1 year ago

Kernelspec JSON schema

This proposes to specify the kernelspec through a JSON schema, and have the specification and documentation live in a dedicated repo.

The JSON schema is joined as a standalone file.

Voting from @jupyter/software-steering-council

Like #106 , let's move to the voting phase. As said in this comment, future schema should not be JEPs, but PR open to the Jupyter Schema repo

Zsailer commented 1 year ago

Thank you for doing this @JohanMabille! You beat me to it. I had spent some time yesterday writing the exact same JEP as an action item from the SSC meeting. šŸ˜…

JohanMabille commented 1 year ago

@Zsailer arf sorry for that! This came out when discussing the Handshake pattern, we need an additional field in the kernelspec and I thought it could be the opportunity to add a schema for it. I'll be more careful next time to avoid doing the work twice!

Zsailer commented 1 year ago

@Zsailer arf sorry for that! This came out when discussing the Handshake pattern, we need an additional field in the kernelspec and I thought it could be the opportunity to add a schema for it. I'll be more careful next time to avoid doing the work twice!

No no noā€”this is fantastic! I really appreciate you taking this over! No need to apologize šŸ˜ƒ

Zsailer commented 1 year ago

I think it's worth saying for voting purposesā€”I'm :+1: for this JEP getting accepted.

We can continue to copy-edit, but wanted to explicitly submit my support. šŸ˜ƒ

JohanMabille commented 1 year ago

More changes to come, but I need to educate myself more to JSON schemas :sweat_smile:

westurner commented 10 months ago

https://github.com/ThiagoCComelli/JS2SHACL-JSON-Schema-to-SHACL-conversor/blob/master/conversor.js

IDK why SHACL also yet, but there's a converter

On Mon, Nov 20, 2023, 10:03ā€ÆAM FrĆ©dĆ©ric Collonval @.***> wrote:

@.**** commented on this pull request.

In kernelspec-spec/kernelspec.schema.json https://github.com/jupyter/enhancement-proposals/pull/105#discussion_r1399334630 :

  • "required": ["language"],
  • "properties": {
  • "language": {
  • "description": "The name of the language of the kernel. When loading notebooks, if no matching kernelspec key (may differ across machines) is found, a kernel with a matching language will be used. This allows a notebook written on any Python or Julia kernel to be properly associated with the userā€™s Python or Julia kernel, even if they arenā€™t listed under the same name as the authorā€™s.",
  • "type": "string"
  • }
  • }
  • },
  • "kernel_protocol_version": {
  • "type": "object",
  • "required": ["kernel_protocol_version"],
  • "properties": {
  • "kernel_protocol_version": {
  • "description": "The version of protocol this kernel implements. If not specified, the client will assume the version is <5.5 until it can get it via the kernel_info request. The kernel protocol uses semantic versioning (SemVer).",
  • "type": "string",
  • "pattern": "^(0|[1-9]\d).(0|[1-9]\d).(0|[1-9]\d)(?:-((?:0|[1-9]\d|\d[a-zA-Z-][0-9a-zA-Z-])(?:.(?:0|[1-9]\d|\d[a-zA-Z-][0-9a-zA-Z-]))))?(?:+([0-9a-zA-Z-]+(?:.[0-9a-zA-Z-]+)*))?$"

ā¬‡ļø Suggested change

  • "pattern": "^(0|[1-9]\d).(0|[1-9]\d).(0|[1-9]\d)(?:-((?:0|[1-9]\d|\d[a-zA-Z-][0-9a-zA-Z-])(?:.(?:0|[1-9]\d|\d[a-zA-Z-][0-9a-zA-Z-]))))?(?:+([0-9a-zA-Z-]+(?:.[0-9a-zA-Z-]+)*))?$"
  • "pattern": "^(0|[1-9]\d)\.(0|[1-9]\d).(0|[1-9]\d)(?:-((?:0|[1-9]\d|\d[a-zA-Z-][0-9a-zA-Z-])(?:\.(?:0|[1-9]\d|\d[a-zA-Z-][0-9a-zA-Z-]))))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$"

ā€” Reply to this email directly, view it on GitHub https://github.com/jupyter/enhancement-proposals/pull/105#pullrequestreview-1740034561, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAMNS7LNV3B4W35OUUIJZDYFNWNVAVCNFSM6AAAAAAXEDPL7CVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMYTONBQGAZTINJWGE . You are receiving this because you are subscribed to this thread.Message ID: @.***>

JohanMabille commented 7 months ago

Kind ping on this, I think this is ready for a final review:

JohanMabille commented 3 months ago

The JEP has been approved.

Yes: 9 No: 0 Abstention: 0 No vote: 1

Merging