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

Try to have custom renderer with myst. #314

Merged
merged 1 commit into from
Dec 6, 2023
Merged

Conversation

Carreau
Copy link
Member

@Carreau Carreau commented Nov 1, 2023

One thing I'd like to do is do the full rendering with myst.js,

this will make it much more easier to make a jupyterLab extension as once we have a JS renderer, we can "just" make a JupyterLab extension that use the same components.

I dont' know much about how to do that, but here is an attempt that try to do it:

  • it add the the "frontend" folder, if you run npm install (once) and then npm run build from within it, it will generate the a index.<hash>.js file in papyri/app/js/....

As I don't know how to not have it have a hash, this adds new handlers that try to guess the name of the file and serve it.

This let you in a template to call render(dom-id, json), and ti wil use myst to render that on the given node.

The idea is to give myst the root node, but that does not work so far as some of our nodes are not the same.

we can go two routes (or a mix of both):

  • write custom rendered for myst,
  • massage our nodes to look like what myst is expecting.

@rowanc1
Copy link
Contributor

rowanc1 commented Nov 9, 2023

Let me know if you would like to have a quick meeting next week on this? I will try to take a quick look through in the next week and give some tips.

@Carreau
Copy link
Member Author

Carreau commented Nov 13, 2023

Sure I would be happy to meet, let me shoot you an email to coordinate.

@Carreau
Copy link
Member Author

Carreau commented Nov 17, 2023

scipy.signal._filter_design:zpk2sos seem to contain raw directives: With ``pairing='nearest'`` (the default), we obtain

@Carreau
Copy link
Member Author

Carreau commented Nov 20, 2023

xarray.core._typed_ops:VariableOpsMixin.conj have a "to-resolve" link.

@Carreau Carreau force-pushed the myst branch 2 times, most recently from 4fb45aa to 11d8921 Compare December 6, 2023 12:21
@Carreau Carreau marked this pull request as ready for review December 6, 2023 13:14
this will make it much more easier to make a jupyterLab extension as once we have a JS renderer, we can "just" make a JupyterLab extension that use the same components.

I dont' know much about how to do that, but here is an attempt that try to do it:

- it add the the "frontend" folder, if you run `npm install` (once) and then `npm run build` from within it, it will generate the a `index.<hash>.js` file in `papyri/app/js/...`.

As I don't know how to not have it have a `hash`, this adds new handlers that try to guess the name of the file and serve it.

This let you in a template to call `render(dom-id, json)`, and ti wil use myst to render that on the given node.

The idea is to give myst the root node, but that does not work so far as some of our nodes are not the same.

we can go two routes (or a mix of both):
 - write custom rendered for myst,
 - massage our nodes to look like what myst is expecting.
@Carreau
Copy link
Member Author

Carreau commented Dec 6, 2023

Ok, let's get that in, it's starting to be unwildy after a month of work.

@Carreau Carreau merged commit b6fabfe into jupyter:main Dec 6, 2023
8 of 9 checks passed
@Carreau Carreau deleted the myst branch December 6, 2023 15:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants