Skip to content
Snippets Groups Projects
Commit 395e2608 authored by Marco Matthies's avatar Marco Matthies
Browse files

Remove CairoMakie dependency and all code using it temporarily

parent 29f5288b
No related branches found
No related tags found
No related merge requests found
...@@ -7,7 +7,6 @@ version = "0.4.1" ...@@ -7,7 +7,6 @@ version = "0.4.1"
Agents = "46ada45e-f475-11e8-01d0-f70cc89e6671" Agents = "46ada45e-f475-11e8-01d0-f70cc89e6671"
ArgParse = "c7e460c6-2fb9-53a9-8c5b-16f535851c63" ArgParse = "c7e460c6-2fb9-53a9-8c5b-16f535851c63"
CSV = "336ed68f-0bac-5ca0-87d4-7b16caf5d00b" CSV = "336ed68f-0bac-5ca0-87d4-7b16caf5d00b"
CairoMakie = "13f3f980-e62b-5c42-98c6-ff1f3baf88f0"
DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0" DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0"
DataFramesMeta = "1313f7d8-7da2-5740-9ea0-a2ca25f37964" DataFramesMeta = "1313f7d8-7da2-5740-9ea0-a2ca25f37964"
Dates = "ade2ca70-3891-5945-98fb-dc099432e06a" Dates = "ade2ca70-3891-5945-98fb-dc099432e06a"
......
...@@ -16,7 +16,6 @@ module Persefone ...@@ -16,7 +16,6 @@ module Persefone
using using
Agents, Agents,
ArgParse, ArgParse,
CairoMakie, #XXX this is a very big dependency :-(
CSV, CSV,
Dates, Dates,
DataFrames, DataFrames,
...@@ -80,8 +79,6 @@ export ...@@ -80,8 +79,6 @@ export
createevent!, createevent!,
finalise!, finalise!,
outputdata, outputdata,
visualisemap,
populationtrends,
visualiseoutput, visualiseoutput,
savemodelobject, savemodelobject,
loadmodelobject loadmodelobject
...@@ -90,7 +87,7 @@ export ...@@ -90,7 +87,7 @@ export
## b references something from file a, it must be included later) ## b references something from file a, it must be included later)
include("core/input.jl") include("core/input.jl")
include("core/output.jl") include("core/output.jl")
include("analysis/makieplots.jl") #include("analysis/makieplots.jl")
include("world/landscape.jl") include("world/landscape.jl")
include("world/weather.jl") include("world/weather.jl")
......
...@@ -217,7 +217,7 @@ saving each figure to file. ...@@ -217,7 +217,7 @@ saving each figure to file.
""" """
function visualiseoutput(model::AgentBasedModel) function visualiseoutput(model::AgentBasedModel)
@debug "Visualising output." @debug "Visualising output."
CairoMakie.activate!() # make sure we're using Cairo #CairoMakie.activate!() # make sure we're using Cairo
for output in model.dataoutputs for output in model.dataoutputs
isnothing(output.plotfunction) && continue isnothing(output.plotfunction) && continue
figure = output.plotfunction(model) figure = output.plotfunction(model)
......
...@@ -9,10 +9,10 @@ ...@@ -9,10 +9,10 @@
Create output files for each data group collected by the nature model. Create output files for each data group collected by the nature model.
""" """
function initecologicaldata(model::AgentBasedModel) function initecologicaldata(model::AgentBasedModel)
newdataoutput!(model, "populations", ["Date", "Species", "Abundance"], # newdataoutput!(model, "populations", ["Date", "Species", "Abundance"],
savepopulationdata, @param(nature.popoutfreq), populationtrends) # savepopulationdata, @param(nature.popoutfreq), populationtrends)
newdataoutput!(model, "individuals", ["Date","ID","X","Y","Species","Sex","Age"], # newdataoutput!(model, "individuals", ["Date","ID","X","Y","Species","Sex","Age"],
saveindividualdata, @param(nature.indoutfreq), visualisemap) # saveindividualdata, @param(nature.indoutfreq), visualisemap)
end end
""" """
......
...@@ -85,13 +85,13 @@ end ...@@ -85,13 +85,13 @@ end
@param(core.enddate) = originalenddate @param(core.enddate) = originalenddate
end end
@testset "Output visualisation" begin # @testset "Output visualisation" begin
model = initialise(TESTPARAMETERS) # model = initialise(TESTPARAMETERS)
stepsimulation!(model) # stepsimulation!(model)
@test_logs((:debug, "Visualising output."), # @test_logs((:debug, "Visualising output."),
min_level=Logging.Debug, match_mode=:any, # min_level=Logging.Debug, match_mode=:any,
visualiseoutput(model)) # visualiseoutput(model))
@test isfile(joinpath(@param(core.outdir), "individuals.pdf")) # @test isfile(joinpath(@param(core.outdir), "individuals.pdf"))
@test isfile(joinpath(@param(core.outdir), "populations.pdf")) # @test isfile(joinpath(@param(core.outdir), "populations.pdf"))
rm(@param(core.outdir), force=true, recursive=true) # rm(@param(core.outdir), force=true, recursive=true)
end # end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment