AnswerDotAI / AnswerDotAI/nbdev
Add support for copying output files to website
- Dominant language
- Jupyter Notebook
- Stars
- 5.3k
- Forks
- 513
- Avg merge
- 2d 30m
- Merged PRs (30d)
- 8
Description
My notebooks are producing file outputs of various types that need to be available on the final docs page. Currently it appears that `nbdev_docs` copies the nbs folder to the _proc folder before processing the notebooks. The files I need aren't created until execution time, so they are missed. Concurrently the working directory for execution appears to be the project root, not the notebook location, so all file outputs would be written to the root directory without applying any workarounds. Without workarounds this creates some differences between the local notebook development environment and the nbdev_docs call (when done from the project root).
Generally I work around this by writing everything to `./outputs/...` and creating a symlink between `project_root/outputs` and `project_root/nbs/outputs`. For now I've also created one to `project_root/_proc/outputs`. That works but the system is a bit janky. It requires `nbdev_docs --symlinks` so the default workflows don't work, and the _proc directory cannot be completely cleared.
It would be nice if the working directory were set to the file location by `nbdev_docs` and furthermore if created files were picked up and moved to `_proc` after execution was complete.
Contributor guide
Research direction
Start at the nbdev_docs workflow that copies notebooks into _proc and executes them from the project root. Trace when notebook-generated files are created and how the working directory is selected. Done means execution uses the notebook location and generated output files are copied into _proc afterward without requiring symlinks.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- jupyter, jupyter-notebook, python
- Domain
- cli, documentation, tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100