-
Notifications
You must be signed in to change notification settings - Fork 60
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 for Jupyter execution (including inline) directly in mystmd CLI #873
Conversation
2199916
to
4012be5
Compare
This comment was marked as resolved.
This comment was marked as resolved.
Figured out my problem, there was a dead server hanging about that could not be removed. I went into the As part of that testing I went through and changed a few things:
Things I noticed:
|
1e287b3
to
1b4cbba
Compare
1e4f2a8
to
a3c3de1
Compare
There's something wacky going on with Node - it refuses to quit even when the child process has been killed. There are tools to ask node why it's not quitting, but I don't have time right now to dig into it. It might be that we want to remove the use of closures and move this logic into a class. That might be less opaque to node, if refcycles are the problem. |
dafd4ef
to
84290d9
Compare
@fwkoch I changed the Python package from using setuptools to using the Hatch build backend. The benefits of this are fewer config files, more declarative config, and the ability to use plugins to pull metadata from mystmd's I can split it into a new PR if we need. |
"version": "changeset version && npm install && cd packages/mystmd-py && bash scripts/bump-version.sh", | ||
"version": "changeset version && npm install", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh cool, this is nice.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To be clear here, the version is only updated at pypi deployment time (because it's taken from package.json, which is copied in the deploy bash scipt).
...pages.map((page) => | ||
loadFile(session, page.file, siteProject.path, undefined, { minifyMaxCharacters }), | ||
), | ||
...pages.map((page) => loadFile(session, page.file, siteProject.path, undefined)), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am still a bit concerned that we are no longer passing this option in at all? I think this actually might be breaking JATS - @fwkoch I would love another set of eyes here.
049ecc0
to
16314d4
Compare
@rowanc1 I've updated the cache key struct to include the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok - putting my approval on this. PR looks great! Lots of tedium passing the execute
flag around - maybe those CLI options could be a refactor target some time.
Regarding the minifyMaxCharacter
stuff - I played around with static outputs and I think it's all fine...? During mdast processing we call transformOutputsToCache
- this does the exact same minification we were also doing during notebook loading. So now (since minification was removed from loadFile
) it just always happens in that transform instead of both places. I still have some vague worries that there was an edge case causing us to do this in two places, but no test coverage and I couldn't recreate it 🤷♀️ Good to land, and we can just keep an eye on it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah -- we didn't add changesets @agoose77! :) |
This PR adds execution support to the mystmd CLI. A sketch at some docs below from @rowanc1!