QuantEcon / sphinxcontrib-jupyter

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

Update to tests, update relative links, and delete files that are no longer used #276

Closed sglyon closed 4 years ago

sglyon commented 4 years ago

There are three commits here:

  1. Change execution behavior of link translator. We were removing relative paths from the links, but that was breaking things. The updated tests show that
  2. Test subfolders with diff checker, not just root directory documents
  3. Removed a bunch of files that don't seem to be used anymore

This is needed for some changes in the datascience lectures as some links are currently broken.

For example, in pandas/intro.rst we try to link to pyfun/intro.rst by doing :doc:Python basics <../pyfun/basics.rst>`

Before this commit the .. was being removed so the link in theoutput ended up being pandas/pyfun/basics.(html|ipynb) when it should be ../pyfun/basics.(html|ipynb)

mmcky commented 4 years ago

thanks @sglyon I have a PR #268 in the works for more robust static file linking. It builds an image and download library and copies over those files actually used in the RST files.

It is also something flagged for more attention in the November rewrite of the extension as sphinx handles uri different for images and downloads and the state is pretty confusing. There are cases where sphinx removes some part of the specified links and cases where it adds subfolders to other parts of the reference link and you end up with subfolder/../file paths which clearly don't work.

mmcky commented 4 years ago

It looks like the links are correct for the base/section2 test cases. I will take a closer look at this and alter #266 as required. Thanks @sglyon I will delete this line once merged into master.

mmcky commented 4 years ago
mmcky commented 4 years ago
mmcky commented 4 years ago

@sglyon I made a few adjustments to this branch and I think we can go ahead and merge it. I will do so now and then update my PR with the latest master

sglyon commented 4 years ago

Thanks @mmcky!