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

Jupyter Book + Julia environment compatibility #1

Open
janash opened this issue Jan 13, 2025 · 7 comments
Open

Jupyter Book + Julia environment compatibility #1

janash opened this issue Jan 13, 2025 · 7 comments

Comments

@janash
Copy link
Member

janash commented Jan 13, 2025

We've had some issues getting the Juptyer book to build when using a Julia environment. Put findings or troubleshooting notes here!

@ejmeitz @Leticia-maria

@janash
Copy link
Member Author

janash commented Jan 13, 2025

I was able to fix my issues by changing the kernel in the notebooks (I was using Julia 1.11, while the kernels were 1.10).

I also needed to change the TOC on Ethan's branch to not include file extensions (.ipynb)

After making those corrections, I am able to build locally.

@janash
Copy link
Member Author

janash commented Jan 13, 2025

The current GHA build is having trouble finding IJulia when building the book. Will need more troubleshooting.

@ejmeitz
Copy link
Collaborator

ejmeitz commented Jan 13, 2025

I also spent some time messing with this. I think that jupyter-book tries to find the same jupyter kernel that the notebook was last loaded with (I have no other idea where the build process would get the version otherwise). I looked a bit for a way to set this so it would "just work" but did not find anything. There might be a command line argument you can pass to jupyter-book, but the source code was a bit much for the time I had.

I also tried setting up IJulia so that it installed the julia kernel into whatever jupyter is installed through pip install requirements.txt. Locally this is just whatever conda or venv you have but on the CI there's probably a specific path where these are put. You should be able to tell IJulia where your jupyter install is by setting "JUPYTER" as an environment variable. I also did not have luck with this and it just kind of ignored what I set....so yeah. Leticia and I are meeting later this week to discuss.

@janash
Copy link
Member Author

janash commented Jan 14, 2025

I also spent some time messing with this. I think that jupyter-book tries to find the same jupyter kernel that the notebook was last loaded with (I have no other idea where the build process would get the version otherwise). I looked a bit for a way to set this so it would "just work" but did not find anything. There might be a command line argument you can pass to jupyter-book, but the source code was a bit much for the time I had.

That was also my assessment! I'll look into the environment varialbe you mentioned. I was able to build locally, but it seems like the GHA is not able to find the kernel.

@ejmeitz
Copy link
Collaborator

ejmeitz commented Jan 24, 2025

Ok I got it to build on my local server finally. Not sure what I did is reproducible but I know what files need to be where I think.

After I manually set the kernel by editing the file source, I just needed IJulia installed in the base julia environment. Before we only had it in the environment that we used with the notebooks.

Are there easy ways to test the github CI? I'm going to set the github actions to build form my branch temporarily to see if I can get things working without having to destroy main.

@janash
Copy link
Member Author

janash commented Jan 24, 2025

@ejmeitz - you could fork the repository and do CI runs from the fork ot test the CI

@ejmeitz
Copy link
Collaborator

ejmeitz commented Jan 24, 2025

Ah yea that's a better idea.

janash pushed a commit that referenced this issue Jan 30, 2025
trying to get jupyte rbook to work
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

No branches or pull requests

2 participants