Jupyter-book: Can't use subdirectories on Windows

Created on 28 Aug 2020  路  15Comments  路  Source: executablebooks/jupyter-book

Bug description

This is a working directory structure:
image

Which looks like this when rendered:
image

However, when I move some of the files into the 'content' folder like this:
image

Then, it is no longer displayed:
image

To Reproduce

Steps to reproduce the behavior:

  1. Put one of the files in a subdirectory and adjust the reference in the _toc.yml file accordingly
  2. Build the JupyterBook with 'jupyter-book build your_book'

Expected behavior

I would expect the change of folder not to matter, but apparently the table of contents can't find the file that way.

Environment

  • Python Version:
    3.8.5
  • Package versions:
    Jupyter Book: 0.7.4
    MyST-NB: 0.8.5
    Sphinx Book Theme: 0.0.35
    MyST-Parser: 0.9.1
    Jupyter-Cache: 0.3.0
  • Operating System:
    Windows 10 Pro

Other things I've tried

I've also tried changing the file reference to content\content3, and giving the absolute file path, not just relative. No success...

bug

All 15 comments

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

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! :tada:

I may be utterly wrong but I think it is just the _format_ of the ToC that changes; if you click on "Content with notebooks" on the left, doesn't it show the correct nested sections in a "Contents" sidebar to the right?

I may be utterly wrong but I think it is just the _format_ of the ToC that changes; if you click on "Content with notebooks" on the left, doesn't it show the correct nested sections in a "Contents" sidebar to the right?

No, the contents on the right is fine. But whenever I put 'content3.md' or 'markdown3.md' in a subdirectory, such as 'content', it'll be missing on the left:

image

You might want to bear with me just a sec, since there is a number of Windows specific improvements in #911 which should be finished very soon

Also worth a try:

pip install git+https://github.com/phaustin/jupyter-book@posix_path --upgrade

to get the version of jupyter-book that handles windows paths correctly

@phaustin, I've actually integrated that change into #911 now.
Tests aren't passing, but I'm working on it

Also worth a try:

pip install git+https://github.com/phaustin/jupyter-book@posix_path --upgrade

to get the version of jupyter-book that handles windows paths correctly

Ah, this actually did the trick! Thanks 馃憤

Also FYI @phaustin, myst-nb is now fully Windows compliant 馃槃 https://github.com/executablebooks/MyST-NB/runs/1040260603?check_suite_focus=true

good news -- even infinite series can eventually converge ;-) Do you know how to turn off multiple failing tests? @foster999 is making headway (https://github.com/phaustin/jupyter-book/pull/1) but I need to learn how to abort a test in progress (github ran the last commit for six hours before timing out) and skip problematic tests.

Also worth a try:

pip install git+https://github.com/phaustin/jupyter-book@posix_path --upgrade

to get the version of jupyter-book that handles windows paths correctly

Maybe a minor issue, but this fix seems to break 'expand_sections: true'

@phaustin you can use the skip mark decorator as :

@pytest.mark.skip(reason="blah")

And there's a similar mark for setting a timeout with this plug in :)

thanks -- that's what I was looking for. I guess we need skipif (https://docs.pytest.org/en/latest/skipping.html#id1) to limit the skip to windows. Unfortunately I'm now within the start-of-term event horizon, but I can hopefully take a look at this this weekend.

guys I'm already all this in #911, there's a global timeout set.
If you need to know anything about pytest, I've literally written whole plugins lol: https://github.com/chrisjsewell/pytest-notebook/

excellent -- very happy to move to the back of the peloton on this.

See 6fb0cbe (#911) 馃槃

Was this page helpful?
0 / 5 - 0 ratings

Related issues

choldgraf picture choldgraf  路  4Comments

matrs picture matrs  路  3Comments

choldgraf picture choldgraf  路  5Comments

Cyb3rWard0g picture Cyb3rWard0g  路  5Comments

nozebacle picture nozebacle  路  3Comments