QuantEcon / sphinxcontrib-jupyter

A Sphinx Extension for Generating Jupyter Notebooks
BSD 3-Clause "New" or "Revised" License
76 stars 23 forks source link

ENH: Added functionality to specify the dependencies in config #232

Closed AakashGfude closed 5 years ago

AakashGfude commented 5 years ago

This PR adds the functionality to add dependencies of files and folders in the source directory in the following manner :

jupyter_dependencies = {
    <dir> : ['file1', 'file2'],
    {<dir>}/<file.rst> : ['file1']
}

At present, the values are file names, which are assumed to be in the same directory as the source keys.

fixes #228

mmcky commented 5 years ago

thanks @AakashGfude - nice work.

mmcky commented 5 years ago

@arnavs would you be willing to test this branch to make sure it meets the Julia project needs? This is to allow you to specify project.toml files for directories in the conf.py

We usually setup a corresponding PR in the project repo and tag this PR to merge once this PR has been merged.

I have a target date for PyPI release of 16th August 2019.

arnavs commented 5 years ago

Thanks @mmcky, testing this now.

arnavs commented 5 years ago

From Slack with @mmcky: One quirk is that, when I run make website, it will set up the directory structure (e.g., arnavsood@mbp:~/research/quantecon/lecture-source-jl/_build/website/jupyter/executed/more_julia) without the TOML. And it will bring the TOML in when the first notebook from that subdirectory is run.

It would be great, though, if the TOML was moved at directory setup time.

cc @AakashGfude.

mmcky commented 5 years ago

thanks @arnavs for testing this. What happens for make website is the files are written to _build/website/jupyter and then as they are executed the results are written to executed. Is the base jupyter folder populated with toml

arnavs commented 5 years ago

Yeah, the _build/website/jupyter/more_julia folder was fine.

mmcky commented 5 years ago

Just checking: @arnavs and @AakashGfude is this PR going to solve your request for toml support?

arnavs commented 5 years ago

@mmcky I think this is good from our end.

mmcky commented 5 years ago

thanks @arnavs for testing this out. Thanks @AakashGfude for implementing this feature. I think it will be really nice to have. I will merge and update docs later today with the new option.

mmcky commented 5 years ago

@arnavs if you have any requests for improvements -- please document them in an issue. Thanks.