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

draft windows instructions #642

Merged
merged 5 commits into from
Jun 5, 2020
Merged

Conversation

phaustin
Copy link
Contributor

I'm still getting a build failure with a nested _toc.yml ala #573 so I've forked quantecon-mini-example and checked in a branch with a single level toc that builds successfully.

Copy link
Collaborator

@choldgraf choldgraf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In general this looks quite helpful, thanks very much @phaustin - I added in a few comments here and there, feel free to ping me when it's ready for another review. And I believe that @najuzilu may have some thoughts or commits to add to link to this section from elsewhere.


Jupyer-book current reads and writes files on windows in the native windows encoding, which causes encoding errors for some characters in UTF-8 encoded notebooks.

**Work-around:** Beginning with [Python 3.7](https://docs.python.org/3/using/cmdline.html#envvar-PYTHONUTF8) cmd.exe or powershell enviroments that set PYTHONUTF8=1 override the native locale encoding and use UTF8 for all input/output. To make it easier to use this option, we have created a conda package [runjb](https://anaconda.org/eoas_ubc/runjb) which [does this automatically for powershell](https://github.com/eoas-ubc/eoas_tlef/blob/master/converted_docs/wintools/binwin/runjb.ps1)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we put the "to make it easier to use this option" section into a {tip} block? Also, we should clairfy what "we" here means eoas_ubc so it doesn't confuse people 👍


1. Character encoding

Jupyer-book current reads and writes files on windows in the native windows encoding, which causes encoding errors for some characters in UTF-8 encoded notebooks.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Jupyer-book current reads and writes files on windows in the native windows encoding, which causes encoding errors for some characters in UTF-8 encoded notebooks.
Jupyer-book currently reads and writes files on windows in the native windows encoding,
which causes encoding errors for some characters in UTF-8 encoded notebooks.


Jupyer-book current reads and writes files on windows in the native windows encoding, which causes encoding errors for some characters in UTF-8 encoded notebooks.

**Work-around:** Beginning with [Python 3.7](https://docs.python.org/3/using/cmdline.html#envvar-PYTHONUTF8) cmd.exe or powershell enviroments that set PYTHONUTF8=1 override the native locale encoding and use UTF8 for all input/output. To make it easier to use this option, we have created a conda package [runjb](https://anaconda.org/eoas_ubc/runjb) which [does this automatically for powershell](https://github.com/eoas-ubc/eoas_tlef/blob/master/converted_docs/wintools/binwin/runjb.ps1)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you try capping line lengths around 80 characters and splitting long lines across multiple ones?

@@ -192,6 +192,49 @@ The contents of `extra_navbar` will be inserted into your page's HTML after
all other html content.


## Working on Windows

As of May 27, 2020, there are three open issues that require Windows-specific workarounds:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should add something to the effect of "note that behavior on Windows may still be unstable, and these workarounds are community tips but are not guaranteed to solve your problem"


3. Nested tables of contents

Currently, `_toc.yml` files that reference marrkdown files
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Currently, `_toc.yml` files that reference marrkdown files
Currently, `_toc.yml` files that reference markdown files


3. Nested tables of contents

Currently, `_toc.yml` files that reference marrkdown files
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we know why this is?

After the build, view the html with:

`start docs\_build\html\index.html`

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you remove the extra whitespace so there are only 2 spaces max?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

think I've addressed comments -- re nested _toc.yml, curently getting an MRE so I can run side by side on window and wsl2 -- has to be something fairly simple.

@choldgraf
Copy link
Collaborator

hey @phaustin - any chance you could clean up this one and we can get it merged? I think it'd be helpful for many folks!

@phaustin
Copy link
Contributor Author

phaustin commented Jun 3, 2020

yes, I'll go ahead and do that tonight -- thought I'd have the encoding problem sorted yesterday, but ran out of time.

@najuzilu
Copy link
Contributor

najuzilu commented Jun 4, 2020

@phaustin I want to add a note directive with a link to your documentation here to inform windows users. I hope it will minimize the number of submitted issues related to this problem.

What I have in mind is something like this:

```{note}
If you are a Windows user and get an `Encoding Error` during build, check out {ref}`working-on-windows`.
```

with the assumption that "(working-on-windows)=" is located right above this header "## Working on Windows"

I would be happy to add this once you're done or if it's better for you, I can work on it prior to you making these changes. Lmk how you'd like to proceed.

@choldgraf
Copy link
Collaborator

hmmm, seems like we might have some re-base weirdness?

@phaustin
Copy link
Contributor Author

phaustin commented Jun 5, 2020

@choldgraf @najuzilu -- think this is ready: https://deploy-preview-642--jupyter-book.netlify.app/advanced/advanced.html#working-on-windows
Should be able to fix issues 1 and 3 this weekend

@choldgraf
Copy link
Collaborator

Looks great! Thanks very much @phaustin for the contribution, and for helping to find, document, and iron-out these bugs! 🎉

@choldgraf choldgraf merged commit 4894ad0 into jupyter-book:master Jun 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants