Skip to content

Commit 5bf5e46

Browse files
authored
Document and automate Runic installation (#2945)
1 parent fbc6ae4 commit 5bf5e46

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

docs/dev/core.qmd

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ A more detailed sequence diagram of the simulation loop is available at the [cor
1818

1919
## Set the number of threads Julia will use
2020

21-
Set the `JULIA_NUM_THREADS` variable in your environment to `auto` (linux, macos) or the number of physical cores of your machine (windows).
21+
Set the `JULIA_NUM_THREADS` variable in your environment to `auto` (Linux, MacOS) or the number of physical cores of your machine (Windows).
2222
Multiple threads are used to speed up individual models, as well as running testmodels in parallel.
2323

2424
## Install optional Julia libraries
@@ -37,6 +37,17 @@ pkg> add Revise
3737
Revise.jl is a library that allows you to modify code and use the changes without restarting Julia.
3838
You can let it start automatically by following these [instructions](https://timholy.github.io/Revise.jl/stable/config/#Using-Revise-by-default-1).
3939

40+
41+
## Add `.julia/bin` to your Path
42+
43+
We use the [Runic](https://github.com/fredrikekre/Runic.jl) formatter and [JETLS](https://github.com/aviatesk/JETLS.jl/) language server as [Pkg apps](https://pkgdocs.julialang.org/v1/apps/). which we expect to be available on the Path.
44+
The JETLS VSCode extension will prompt for you to install JETLS, and `pixi run install` will install Runic.
45+
46+
Repeating the note from the Pkg docs:
47+
48+
- You need to manually make `~/.julia/bin` available on the PATH environment.
49+
- The path to the julia executable used is the same as the one used to install the app. If this julia installation gets removed, you might need to reinstall the app.
50+
4051
## Install Visual Studio Code (optional)
4152

4253
There is a section on editors and IDEs for Julia on <https://julialang.org/>, scroll down to see it.

pixi.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,13 @@ install = { depends-on = [
2727
"install-qgis-plugins",
2828
"install-prek",
2929
"initialize-julia",
30+
"install-runic",
3031
] }
3132
# Julia
3233
update-registry-julia = { cmd = "julia --eval='using Pkg; Registry.update()'" }
3334
update-manifest-julia = { cmd = "julia --project utils/update-manifest.jl" }
3435
instantiate-julia = { cmd = "julia --project --eval='using Pkg; Pkg.instantiate()'" }
36+
install-runic = { cmd = "julia --eval='using Pkg; Pkg.Apps.add(\"Runic\")'" }
3537
initialize-julia = { depends-on = [
3638
"update-registry-julia",
3739
"instantiate-julia",

0 commit comments

Comments
 (0)