question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Pre-run cells for intensive computation

See original GitHub issue

I am currently adding jupyter-sphinx to the docs for a project where some methods are especially expensive to run (e.g. connecting to a slow cloud service for running a job) or not feasible to run on our CI runners (e.g. not wanting to use private API keys and credits for the cloud service just for CI and docs building), and would prefer being able to just run it once locally and use the output.

I could not see such this feature available from looking around the docs or looking through the scripts in this repo, but if this is already possible that would be great. This is already available in nbsphinx, but I would prefer to see this in jupyter-sphinx for the added benefit of working inline from the .rst files.

Feature requested: insert the output from locally running the contents of the cell into the .rst file and have it display as if the cell had been run, using the same formatting as usual.

Possible implementation: a :dont-run: directive to skip the execution of the cell and just pass it straight to the cell formatting

Temporary hack idea: the first with the code using :hide-output: and :raises: to accept that it will throw an error when there is no API key found, and the second with just print(...) and :hide-code: to simulate the output. This would still mean the expensive calls will be made when I am just trying to build the docs locally, which kinda sucks.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
akhmerovcommented, Oct 14, 2020

#141 by @willsimmons1465 should incorporate your use case, sorry for my delay in reviewing, I’ll get to it soon 🤞

0reactions
akhmerovcommented, Apr 24, 2021

Closed via #141

Read more comments on GitHub >

github_iconTop Results From Across the Web

App configuration options - Learn | Hex Technologies
The App Builder offers several configuration options you can use to customize your application's look and behavior.
Read more >
PlaqView 2.0: A comprehensive web portal for cardiovascular ...
This interactive feature allows supervised input and selection of relevant cells that can help reduce trajectory “noise.” Furthermore, this ...
Read more >
Preworkout For Running: Should You Take It? + Our 5 Top Picks
Recommended Preworkouts for Running. Some of the best preworkout powders for runners include: Shifted Maximum Performance Pre Workout.
Read more >
Single-cell RNAseq for the study of isoforms—how is that ...
Analysing a higher number of cells increases the chances of recurrent detection of novel sites in a bigger cell population, which ultimately ...
Read more >
MAMUT Pre-Run Drink
MAMUT Pre-Run Drink with carefully chosen ingredients is intended to provide ... prevent from muscle breakdown and dehydration during high intensive workout.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found