Skip to content

Commit

Permalink
Merge pull request #134 from EcoJulia/rr/pluto
Browse files Browse the repository at this point in the history
Update Pluto notebooks
  • Loading branch information
richardreeve authored Apr 12, 2024
2 parents 0ce4b7f + 820148d commit a746cf5
Show file tree
Hide file tree
Showing 7 changed files with 1,318 additions and 1,342 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/nightly.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
name: JuliaNightly
# Nightly Scheduled Julia Nightly Run

on:
push:
branches:
Expand All @@ -24,5 +25,7 @@ jobs:
arch: x64
- name: Build package
uses: julia-actions/julia-buildpkg@v1
with:
ignore-no-cache: true
- name: Run tests
uses: julia-actions/julia-runtest@v1
2 changes: 0 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ OnlineStats = "a15396b6-48d5-5d58-9928-6d29437db91e"
Optim = "429524aa-4258-5aef-a3af-852621145aeb"
Phylo = "aea672f4-3940-5932-aa44-993d1c3ff149"
Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"
Pluto = "c3e4b0f8-55cb-11ea-2926-15256bba5781"
Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7"
REPL = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
Expand Down Expand Up @@ -82,7 +81,6 @@ Optim = "0.18, 0.19, 0.20, 0.21, 0.22, 1"
Phylo = "0.4.18, 0.5"
Pkg = "1.9"
Plots = "0.28.4, 0.29, 1"
Pluto = "0.19.22"
Printf = "1.9"
PyCall = "1"
REPL = "1.9"
Expand Down
40 changes: 35 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,43 @@ There are substantial changes to the package introduced through the [`dev`][dev-
This package is in beta now, so please raise an issue if you find any problems. For more information on how to contribute, please read [our contributing guidelines](CONTRIBUTING.md). We are supported by NERC's Landscape Decisions [small][NERC-small] and [large][NERC-big] maths grants and an [EPSRC][EPSRC-stu] studentship.

## Introduction to EcoSISTEM
You can now run through a full introduction to EcoSISTEM with Pluto.jl! To get started:

``` julia
import Pluto
Pluto.run()
You can now run through a full introduction to EcoSISTEM with Pluto.jl if you have the source of the package cloned. To get started (if you are in the root of the package):

```julia
(EcoSISTEM) pkg> activate --temp
Activating new project at `/var/folders/fv/1rqrvwq14ssggm_gc_x4v1cw0000gq/T/jl_IFxVXO`

(jl_IFxVXO) pkg> dev .
Resolving package versions...
Updating `/private/var/folders/fv/1rqrvwq14ssggm_gc_x4v1cw0000gq/T/jl_IFxVXO/Project.toml`
[ed2dc23b] + EcoSISTEM
Updating `/private/var/folders/fv/1rqrvwq14ssggm_gc_x4v1cw0000gq/T/jl_IFxVXO/Manifest.toml`

(jl_IFxVXO) pkg> add Pluto
Resolving package versions...
Updating `/private/var/folders/fv/1rqrvwq14ssggm_gc_x4v1cw0000gq/T/jl_IFxVXO/Project.toml`
[c3e4b0f8] + Pluto
No Changes to `/private/var/folders/fv/1rqrvwq14ssggm_gc_x4v1cw0000gq/T/jl_IFxVXO/Manifest.toml`

julia> import Pluto

julia> Pluto.run()
┌ Info:
└ Opening http://localhost:1235/?secret=xxxxxxxx in your default browser... ~ have fun!
┌ Info:
│ Press Ctrl+C in this terminal to stop Pluto
```

This should open a Pluto window in your browser - from there you can find `notebooks/Introduction.jl` in the `Open a notebook` box. You can also test `notebooks/InteractiveAfrica.jl` to see an invasive species colonising Africa. Note that it may be slow on first launch as it must install packages and in the latter case download climate data from the internet. If you are using a different Julia version you may need to add a block at the start of the examples to update the manifest:

```julia
begin
using Pkg
Pkg.update()
end
```
This should open a Pluto window in your browser - from there you can type `notebooks\Introduction.jl` in the `Open from file` box. Note that it may be slow on first launch!

[paper-url]: https://arxiv.org/abs/1911.12257

Expand Down
Loading

0 comments on commit a746cf5

Please sign in to comment.