Skip to content

Commit d2ac65f

Browse files
committed
FIx up the remaining tests
1 parent 13db61f commit d2ac65f

5 files changed

Lines changed: 17 additions & 13 deletions

File tree

src/dependencies/dependency_graph.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ mutable struct HardDependencyNode{T} <: AbstractDependencyNode
66
dependency::NamedTuple
77
missing_dependency::Vector{Int}
88
scale::String
9-
#inputs
10-
#outputs
9+
inputs
10+
outputs
1111
parent::Union{Nothing,<:AbstractDependencyNode}
1212
children::Vector{HardDependencyNode}
1313
end
@@ -26,8 +26,8 @@ mutable struct SoftDependencyNode{T} <: AbstractDependencyNode
2626
value::T
2727
process::Symbol
2828
scale::String
29-
#inputs
30-
#outputs
29+
inputs
30+
outputs
3131
hard_dependency::Vector{HardDependencyNode}
3232
parent::Union{Nothing,Vector{SoftDependencyNode}}
3333
parent_vars::Union{Nothing,NamedTuple}

src/dependencies/hard_dependencies.jl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,8 @@ function initialise_all_as_hard_dependency_node(models, scale)
100100
NamedTuple(),
101101
Int[],
102102
scale,
103-
#inputs_(i),
104-
#outputs_(i),
103+
inputs_(i),
104+
outputs_(i),
105105
nothing,
106106
HardDependencyNode[]
107107
) for (p, i) in pairs(models)
@@ -312,8 +312,8 @@ function hard_dependencies(mapping::Dict{String,T}; verbose::Bool=true, orchestr
312312
dep_node_model.dependency,
313313
dep_node_model.missing_dependency,
314314
dep_node_model.scale,
315-
#dep_node_model.inputs,
316-
#dep_node_model.outputs,
315+
dep_node_model.inputs,
316+
dep_node_model.outputs,
317317
parent_node,
318318
dep_node_model.children
319319
)
@@ -386,8 +386,8 @@ function hard_dependencies(mapping::Dict{String,T}; verbose::Bool=true, orchestr
386386
soft_dep_vars.value,
387387
process_, # process name
388388
organ, # scale
389-
#inputs_process[organ][process_], # These are the inputs, potentially multiscale
390-
#outputs_process[organ][process_], # Same for outputs
389+
inputs_process[organ][process_], # These are the inputs, potentially multiscale
390+
outputs_process[organ][process_], # Same for outputs
391391
AbstractTrees.children(soft_dep_vars), # hard dependencies
392392
nothing,
393393
nothing,

src/dependencies/soft_dependencies.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ function soft_dependencies(d::DependencyGraph{Dict{Symbol,HardDependencyNode}},
6464
soft_dep_vars.value,
6565
process_, # process name
6666
"",
67-
#inputs_(soft_dep_vars.value),
68-
#outputs_(soft_dep_vars.value),
67+
inputs_(soft_dep_vars.value),
68+
outputs_(soft_dep_vars.value),
6969
AbstractTrees.children(soft_dep_vars), # hard dependencies
7070
nothing,
7171
nothing,

src/mtg/mapping/compute_mapping.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ However, models that are identified as hard-dependencies are not given individua
1111
nodes under other models.
1212
- `verbose::Bool`: whether to print the stacktrace of the search for the default value in the mapping.
1313
"""
14-
function mapped_variables(mapping, dependency_graph; verbose=false, orchestrator=Orchestrator())
14+
function mapped_variables(mapping, dependency_graph=first(hard_dependencies(mapping; verbose=false, orchestrator=Orchestrator())); verbose=false, orchestrator=Orchestrator())
1515
# Initialise a dict that defines the multiscale variables for each organ type:
1616
mapped_vars = mapped_variables_no_outputs_from_other_scale(mapping, dependency_graph)
1717

test/runtests.jl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,10 @@ include("helper-functions.jl")
7272
include("test-performance.jl")
7373
end
7474

75+
@testset "Multi timestep" begin
76+
#include("test-multitimestep.jl")
77+
end
78+
7579
if VERSION >= v"1.10"
7680
# Some formating changed in Julia 1.10, e.g. @NamedTuple instead of NamedTuple.
7781
@testset "Doctests" begin

0 commit comments

Comments
 (0)