MyST-NB icon indicating copy to clipboard operation
MyST-NB copied to clipboard

BUG: Get eval results from metadata

Open flying-sheep opened this issue 1 year ago • 15 comments

Fixes #596

No idea how to elegantly pass the SyntaxNode all the way down to the role, and I’m not super interested in figuring that out, it’s your call how to implement that.

flying-sheep avatar May 02 '24 16:05 flying-sheep

Codecov Report

Attention: Patch coverage is 89.47368% with 2 lines in your changes missing coverage. Please review.

Project coverage is 80.98%. Comparing base (af2d197) to head (6d8447d). Report is 14 commits behind head on master.

:exclamation: Current head 6d8447d differs from pull request most recent head 498cad5

Please upload reports for the commit 498cad5 to get more accurate results.

Files Patch % Lines
myst_nb/core/execute/base.py 87.50% 1 Missing :warning:
myst_nb/core/execute/inline.py 75.00% 1 Missing :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #597      +/-   ##
==========================================
+ Coverage   80.97%   80.98%   +0.01%     
==========================================
  Files          30       30              
  Lines        2702     2714      +12     
==========================================
+ Hits         2188     2198      +10     
- Misses        514      516       +2     
Flag Coverage Δ
pytests 80.98% <89.47%> (+0.01%) :arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov-commenter avatar May 07 '24 08:05 codecov-commenter

@agoose77 is there a way this can make it into this week’s release?

flying-sheep avatar Jun 03 '24 09:06 flying-sheep

Hi @agoose77, would be great if you’d take a look!

The current doc build failures are not mine, but https://github.com/executablebooks/MyST-NB/issues/610

flying-sheep avatar Jun 27 '24 12:06 flying-sheep

I will hold this for now; we need to rectify the different ways that myst-nb and jupyterlab-myst perform caching of output expressions.

agoose77 avatar Jun 27 '24 15:06 agoose77

This just uses the user expression result that’s already stored in the metadata. It doesn’t touch how it’s being stored.

That doesn’t seem to have a potential for problems, or am I missing something?

flying-sheep avatar Jun 28 '24 08:06 flying-sheep

This just uses the user expression result that’s already stored in the metadata. It doesn’t touch how it’s being stored.

That doesn’t seem to have a potential for problems, or am I missing something?

My initial concerns were around the way that execution should be handled. But your choice of wording has helped me to disambiguate the two cases; reading from a notebook when execution is disabled is something that we can (and should) to. I'll revisit this PR shortly (probably next week).

agoose77 avatar Jun 28 '24 09:06 agoose77

Hi, it’s been a month! Would be great if you could take a look here

flying-sheep avatar Aug 01 '24 07:08 flying-sheep

Thanks @flying-sheep for your continued patience. I want to add support for inline-expressions in jupyter-cache as well, if we're going to get this one in. That way, all of our execution modes will support expressions. I'll circle back once the myst-nb release / JB cycle is done

agoose77 avatar Aug 28 '24 11:08 agoose77

Thanks for the update. I’d say merging this as-is would probably already add value, as it’s a tiny change with big effects.

Do you know what adding support for jupyter-cache would entail?

flying-sheep avatar Aug 28 '24 12:08 flying-sheep

ping

flying-sheep avatar Nov 22 '24 15:11 flying-sheep

@flying-sheep I know that you've already committed a fair number of cycles to this and other PRs in the stack. Thanks for your on-going patience.

I have clarified my qualms about merging this. I'd like to propose a change -- can you introduce a new executor class that subclasses the base executor, and move the expressions logic there? The intention is that other executors that don't support user expressions like direct should not mix cached expressions and fresh code-cell outputs.

agoose77 avatar Dec 05 '24 19:12 agoose77

I'd like to propose a change -- can you introduce a new executor class that subclasses the base executor, and move the expressions logic there?

All done.

I have clarified my qualms about merging this.

Yes, and then you said

My initial concerns were around the way that execution should be handled. But your choice of wording has helped me to disambiguate the two cases; reading from a notebook when execution is disabled is something that we can (and should) to.

So as far as I know, there are none left. If there are any left, please give me a list of all actionable suggestions you have.

flying-sheep avatar Dec 10 '24 17:12 flying-sheep

Oh wow this is still open.

flying-sheep avatar Apr 03 '25 09:04 flying-sheep

we still really really need this fix

flying-sheep avatar Sep 30 '25 07:09 flying-sheep

@agoose77? @bsipocz? Any eyes please?

flying-sheep avatar Nov 20 '25 12:11 flying-sheep