Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Persefone.jl
Manage
Activity
Members
Plan
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Package registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Repository analytics
Insights
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Persefone
Persefone.jl
Commits
9197dc16
Commit
9197dc16
authored
10 months ago
by
Marco Matthies
Browse files
Options
Downloads
Patches
Plain Diff
Fix broken tests after rebase
parent
4ed36694
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
src/crop/almass.jl
+2
-2
2 additions, 2 deletions
src/crop/almass.jl
src/crop/cropmodels.jl
+1
-1
1 addition, 1 deletion
src/crop/cropmodels.jl
test/crop_tests.jl
+1
-1
1 addition, 1 deletion
test/crop_tests.jl
test/nature_tests.jl
+1
-1
1 addition, 1 deletion
test/nature_tests.jl
with
5 additions
and
5 deletions
src/crop/almass.jl
+
2
−
2
View file @
9197dc16
...
...
@@ -8,7 +8,7 @@
module
ALMaSS
using
Persefone
:
EventType
,
Management
,
FarmPlot
,
Length
,
m
,
...
...
@@ -86,7 +86,7 @@ mutable struct CropState
LAItotal
::
Float64
LAIgreen
::
Float64
#biomass::Float64 #XXX I need to figure out how to calculate this
events
::
Vector
{
EventType
}
events
::
Vector
{
Management
}
end
croptype
(
cs
::
CropState
)
=
cs
.
croptype
...
...
This diff is collapsed.
Click to expand it.
src/crop/cropmodels.jl
+
1
−
1
View file @
9197dc16
...
...
@@ -62,7 +62,7 @@ function make_cropstate(model::SimulationModel, cropmodel::AbstractString)
cs
=
ALMaSS
.
CropState
(
model
.
crops
[
"natural grass"
],
phase
,
0.0
,
0.0
m
,
0.0
,
0.0
,
Vector
{
EventType
}()
0.0
,
0.0
m
,
0.0
,
0.0
,
Vector
{
Management
}()
)
elseif
cropmodel
==
"simple"
cs
=
SimpleCrop
.
CropState
(
...
...
This diff is collapsed.
Click to expand it.
test/crop_tests.jl
+
1
−
1
View file @
9197dc16
...
...
@@ -22,7 +22,7 @@ end
ct
=
Ps
.
ALMaSS
.
CropType
(
"olive tree"
,
missing
,
missing
,
missing
,
missing
,
missing
,
missing
,
missing
)
fp
=
FarmPlot
(
0
,
[(
0
,
0
)],
Ps
.
ALMaSS
.
CropState
(
ct
,
Ps
.
ALMaSS
.
janfirst
,
0.0
,
0.0
m
,
0.0
,
0.0
,
Ps
.
EventType
[]))
Ps
.
ALMaSS
.
CropState
(
ct
,
Ps
.
ALMaSS
.
janfirst
,
0.0
,
0.0
m
,
0.0
,
0.0
,
Ps
.
Management
[]))
@test
fp
isa
FarmPlot
@test
fp
isa
FarmPlot
{
Ps
.
ALMaSS
.
CropState
}
@test
croptype
(
fp
)
isa
Ps
.
ALMaSS
.
CropType
...
...
This diff is collapsed.
Click to expand it.
test/nature_tests.jl
+
1
−
1
View file @
9197dc16
...
...
@@ -47,7 +47,7 @@ end) # end eval
@testset
"Habitat macros"
begin
# set up the testing landscape
model
=
inittestmodel
()
model
.
landscape
[
6
,
6
]
=
Pixel
(
Ps
.
agriculture
,
1
,
[],
[])
model
.
landscape
[
6
,
6
]
=
Pixel
(
Ps
.
agriculture
,
1
,
[],
[],
[])
fp
=
Ps
.
FarmPlot
(
1
,
[(
6
,
6
)],
Ps
.
ALMaSS
.
CropState
(
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment