Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove the dependency on Jupyter Book or sphinx-external-toc #59

Closed
choldgraf opened this issue May 24, 2021 · 15 comments
Closed

Remove the dependency on Jupyter Book or sphinx-external-toc #59

choldgraf opened this issue May 24, 2021 · 15 comments
Labels
enhancement New feature or request

Comments

@choldgraf
Copy link
Member

We've just released a new version of sphinx-external-toc and realized that we have a circular dependency between jupyterbook-latex, jupyter-book, and sphinx-external-toc.

From the PR where we discovered this, @chrisjsewell noted:

Really jupyterbook-latex no longer needs to depend on jupyter-book for testing (now that it uses this package for toc based stuff and is "independent" of jupyter-book), so those tests can be removed to remove the circular dependency

So I think we have two options:

  • remove tests in this repository that depend on Jupyter Book, remove the dependency on jupyter book, and pin only to a specific version of sphinx-external-toc
  • remove the dependency on sphinx-external-toc and inherit it from jupyter-book

I think we need to resolve this (or at least release a new version of this repo) before we can release a new version of Jupyter Book so that we don't create a version conflict.

@choldgraf choldgraf added the enhancement New feature or request label May 24, 2021
@welcome
Copy link

welcome bot commented May 24, 2021

Thanks for opening your first issue here! Engagement like this is essential for open source projects! 🤗

If you haven't done so already, check out EBP's Code of Conduct. Also, please try to follow the issue template as it helps other community members to contribute more effectively.

If your issue is a feature request, others may react to it, to raise its prominence (see Feature Voting).

Welcome to the EBP community! 🎉

@choldgraf choldgraf changed the title Remove the dependency on Jupyter Book Remove the dependency on Jupyter Book or sphinx-external-toc May 24, 2021
@mmcky
Copy link
Member

mmcky commented May 25, 2021

@choldgraf the way we have been thinking of this repo is as an extension to jupyter-book so I think option 2 makes sense. @chrisjsewell has suggested we turn this into a pure sphinx extension so we could at that stage look at dropping dependency on jupyter-book and sphinx-external-toc

cc: @AakashGfude

@chrisjsewell
Copy link
Member

the way we have been thinking of this repo is as an extension to jupyter-book so I think option 2 makes sense. @chrisjsewell has suggested we turn this into a pure sphinx extension so we could at that stage look at dropping dependency on jupyter-book and sphinx-external-toc

What, no option 1 is the only option. I've already turned it into a pure sphinx extension, that was the whole point of my refactor 😬, there is already no dependency on jupyter-book, just some legacy testing. There is also no direct dependency on sphinx-external-toc

@AakashGfude
Copy link
Member

AakashGfude commented May 25, 2021

But, jupyterbook-latex does use some config variables declared in jupyter-book like jblatex_captions_to_parts ?
But also, currently when implementing tableofcontents directive for latex, I am using the site_map provided by sphinx-external-toc. So, it kinda depends on both 👀 ?

@chrisjsewell
Copy link
Member

You can see this already in the install_requires, the only requirement is sphinx.

In fact really you can just relax the version pinning of sphinx-external-toc (to include v0.2.0) in the test extra and that should be fine

@mmcky
Copy link
Member

mmcky commented May 25, 2021

@chrisjsewell just digging into this and looking at the setup.cfg.

Was thinking of updating

sphinx-external-toc~=0.1.0

to be

sphinx-external-toc>=0.1.0

I've already turned it into a pure sphinx extension

Right -- so we should probably also rename this repo something like sphinx-jupyterbook-latex.

jupyterbook-latex does use some config variables declared in jupyter-book like jblatex_captions_to_parts

@AakashGfude just looking at events.py and it seems those config values are being set/pulled from sphinx.app now.

@chrisjsewell
Copy link
Member

But, jupyterbook-latex does use some config variables declared in jupyter-book like jblatex_captions_to_parts?

No it doesn't, that's a variable of this extension, it's not in any way dependant on jupyter-book.

@chrisjsewell
Copy link
Member

sphinx-external-toc>=0.1.0

Always include a top pinning, so sphinx-external-toc>=0.1.0,<0.3.0

@chrisjsewell
Copy link
Member

Right -- so we should probably also rename this repo something like sphinx-jupyterbook-latex.

Yep that's a possibility 👍

@mmcky
Copy link
Member

mmcky commented May 25, 2021

Right -- so we should probably also rename this repo something like sphinx-jupyterbook-latex.

Yep that's a possibility 👍

I have opened #61 to discuss the options

@choldgraf
Copy link
Member Author

So I’m a bit confused because #60 didn’t seem to remove the Jupyter-book dependency. Can somebody confirm that this issue is no longer an issue? Or post what needs to be done to close this issue?

@mmcky
Copy link
Member

mmcky commented May 31, 2021

@choldgraf the setup.cfg only lists jupyter-book in testing dependencies. So it shouldn't depend on jupyter-book via standard install. Where do you see the dependency issue?

@mmcky
Copy link
Member

mmcky commented Jun 1, 2021

@choldgraf does this make sense? Is there anything else I can help with here?

I think the change suggested by @chrisjsewell resolves a version pinning conflict (causing the circular dependency issue?)

@mmcky
Copy link
Member

mmcky commented Jun 1, 2021

I have setup a release #63 once approved by @chrisjsewell I can merge and push to PyPI

@mmcky
Copy link
Member

mmcky commented Jun 2, 2021

@choldgraf I went ahead and merged #63 so should be available for the jupyter-book=0.11 release

@mmcky mmcky closed this as completed Jun 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants