Skip to content

Commit

Permalink
Julia 1.10 support (#283)
Browse files Browse the repository at this point in the history
* Julia 1.10 updates in progress

* Fixed regressions with Julia 1.10
  • Loading branch information
jlperla authored Jan 3, 2024
1 parent 4b7cf91 commit bf0ae39
Show file tree
Hide file tree
Showing 79 changed files with 877 additions and 912 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/cache.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
- name: Set up Julia
uses: julia-actions/setup-julia@v1
with:
version: 1.9
version: 1.10.0
- name: Install IJulia and Setup Project
shell: bash
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
- name: Set up Julia
uses: julia-actions/setup-julia@v1
with:
version: 1.9
version: 1.10.0
- name: Install IJulia and Setup Project
shell: bash
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Setup Julia
uses: julia-actions/setup-julia@v1
with:
version: 1.9
version: 1.10.0

- name: Install JuliaFormatter.jl
run: julia -e 'import Pkg; Pkg.add("JuliaFormatter")'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
- name: Set up Julia
uses: julia-actions/setup-julia@v1
with:
version: 1.9
version: 1.10.0
- name: Install IJulia and Setup Project
shell: bash
run: |
Expand Down
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
_build
us_cities.txt
us_cities.txt
.DS_Store
.vscode
12 changes: 4 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ It is straightforward to install the Jupyter Book and Julia software necessary f
7. Start a VS Code terminal with ``<Ctrl+`>`` or through any other method. Create a conda environment.

```bash
conda create -n lecture-julia.myst python=3.9
conda create -n lecture-julia.myst python=3.11
conda activate lecture-julia.myst
pip install -r requirements.txt
```
Expand Down Expand Up @@ -62,13 +62,9 @@ As a helper, you can call a shell script to do it for an entire folder
bash format_all_directory.sh lectures/dynamic_programming
```
or to also do the unicode substitutions
```bash
bash format_all_directory.sh lectures/dynamic_programming true
```
Alternatively, the formatter will run automatically when a pull-request is made
**(Optional) REPL Integration**
With [MyST-Markdown](https://github.com/executablebooks/myst-vs-code) and [Julia](https://marketplace.visualstudio.com/items?itemName=julialang.language-julia) installed, you can ensure that pressing `<Ctrl-Enter>` on lines of code are sent to a Julia REPL.
1. Open Key Bindings with `<Ctrl-K Ctrl-S>`.
Expand All @@ -84,6 +80,7 @@ If you installed the REPL Integration above, then in a `.md` file,
3. Then, assuming that you set up the keybindings above, you can send a line of code in the markdown to the REPL with `<Ctrl-Enter>`.
Code can be executed line by line, or you can select a chunk of code and execute it.
## Example Operations
### Building the lectures
To do a full build of the lectures:
Expand All @@ -100,7 +97,7 @@ jb build lectures
This will take a while. But it will populate your cache, so future iteration is faster.
On Windows, if you get the following error:
It is suggested to use WSL on Windows On Windows, if you get the following error:
```
ImportError: DLL load failed while importing win32api: The specified procedure could not be found.
Expand Down Expand Up @@ -132,5 +129,4 @@ jb clean lectures --all
After execution, you can find the generated `.ipynb` and `.jl` files in `_build/jupyter_execute` for each lecture.
- To see errors, you can open these in JupyterLab, the Jupyter support within VS Code, etc.
- If using the Julia REPL in VS Code, make sure to do `] activate lectures` prior to testing to ensure the packages are activated. This is not necessary when opening in Jupyter.
- Finally, the code is written using interactive scoping, so `include(_build/jupyter_execute/dynamic_programming/mccall_model.jl)` etc. may not work. However, `shift-enter` within VS Code to the REPL will work, and you can execute these with [SoftGlobalScope.jl](https://github.com/stevengj/SoftGlobalScope.jl) if strictly required.
- If using the Julia REPL in VS Code, make sure to do `] activate lectures` prior to testing to ensure the packages are activated. This is not necessary when opening in Jupyter.
Loading

0 comments on commit bf0ae39

Please sign in to comment.