ScottishCovidResponse / SCRCIssueTracking

Central issue tracking repository for all repos in the consortium
6 stars 0 forks source link

Add Project.toml + Manifest.toml to examples/Epidemiology #573

Closed jwscook closed 4 years ago

jwscook commented 4 years ago

The runs have got to be as reproducible as possible. To this end we should add a Manifest.toml to examples/Epidemiology.

I suggest that we use a Manifest.toml file generated from @claireh93 's installation so that her setup becomes the default for everyone else.

Steps to generate a Manifest.toml:

┌─07-Jul 12:54:21 J0731 ~
└─$cd ~/Documents/code/Simulation.jl/examples/Epidemiology/

┌─07-Jul 12:54:34 J0731 ~/Documents/code/Simulation.jl/examples/Epidemiology 
└─$julia
               _
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.5.0-beta1.0 (2020-05-28)
 _/ |\__'_|_|_|\__'_|  |  
|__/                   |

(@v1.5) pkg> activate .

(Epidemiology) pkg> instantiate

julia> include("Scotland_run.jl") # keep try to run and every time julia complains that it doesn't have a package, add it like this:

(Epidemiology) pkg> add Plots # until 

julia> include("Scotland_run.jl") # eventually it actually works

Then the Project.toml + Manifest.toml should be populated with all the right things.

Now I'm able to:

Simulation.jl/examples/Epidemiology$ julia --project=@. Scotland_run.jl

The downside (upside?) is the Manifest.toml section for Simulation looks like this:

[[Simulation]]
deps = ["ArchGDAL", "AxisArrays", "Calculus", "Compat", "DataAPI", "DataFrames", "Dates",                "Distributions", "Diversity", "EcoBase", "Feather", "HCubature", "HDF5", "IndexedTables",                "Interpolations", "JLD", "JLSO", "JuliaDB", "LibGit2", "Libdl", "LinearAlgebra", "Logging", "Markdown",  "Measures", "Missings", "NetCDF", "ORCA", "OnlineStats", "OnlineStatsBase", "Phylo", "Printf", "REPL",   "Random", "RecipesBase", "Requires", "SHA", "Statistics", "StatsBase", "UUIDs", "Unitful"]
git-tree-sha1 = "aa6aa92a4c61adb3140bf91356c4fe6293b3169f"
repo-rev = "dev"
repo-url = "git@github.com:ScottishCovidResponse/Simulation.jl.git"
uuid = "ed2dc23b-ada4-5fdb-a26f-56368a14ad8f"
version = "0.0.0"

where I've added Simulation via ]add git@github.com:ScottishCovidResponse/Simulation.jl.git#dev rather than using the developed copy of the package that's on my system.

github-actions[bot] commented 4 years ago

Heads up @claireh93 @richardreeve @jwscook @sdl1 @wytbella - the "Simulation.jl" label was applied to this issue.

claireh93 commented 4 years ago

Ah this is great - thanks @jwscook! I'll generate that this afternoon and get it added in

richardreeve commented 4 years ago

I'm a bit uncertain what level of reproducibility we will be constrained to if we add in a Manifest.toml file. I'm not opposed to adding it per se, but I definitely think it's worth discussing as my understanding/experience is that Manifest.toml files are quite constraining...

jwscook commented 4 years ago

Fair enough. Manifest.toml + Project.toml pairs can be produced for just-in-time reproducibility.