FAQ
| This is a
LIVE
service |
Changelog
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
ews-coordinator
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package Registry
Container Registry
Operate
Terraform modules
Analyze
Contributor analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Gilligan Lab for Epidemiology and Modelling
Wheat rusts
ews-coordinator
Commits
40e382cc
Commit
40e382cc
authored
1 year ago
by
L. Bower
Browse files
Options
Downloads
Patches
Plain Diff
groundwork for using tifs/netcdf throughout the pipeline.
splitting out some csv parsing functions
parent
44d57772
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
coordinator/EnvSuitPipeline.py
+7
-7
7 additions, 7 deletions
coordinator/EnvSuitPipeline.py
coordinator/ProcessorEnvironment.py
+3
-2
3 additions, 2 deletions
coordinator/ProcessorEnvironment.py
tests/integration/partial/test_env_suit.py
+2
-2
2 additions, 2 deletions
tests/integration/partial/test_env_suit.py
with
12 additions
and
11 deletions
coordinator/EnvSuitPipeline.py
+
7
−
7
View file @
40e382cc
...
...
@@ -261,13 +261,13 @@ def run_pipeline(pipeline_config, region, dateString, extracted = False, prevent
# run_merger(config, sys_config, processor_name)
resultFile
=
envSuitPath
+
'
RIE.
csv
'
resultFile
=
envSuitPath
+
'
RIE.
tif
'
strain_outPath
=
os
.
path
.
join
(
region_outPath
,
strain
)
strain_outFile
=
strain_outPath
+
'
/RIE_value.
csv
'
strain_outFile
=
strain_outPath
+
'
/RIE_value.
tif
'
# Check results dimension
result
=
pd
.
read_csv
(
resultFile
)
result_dims
=
result
.
shape
#
result = pd.read_csv(resultFile)
#
result_dims = result.shape
"""
read in the input_spatial_points.csv file and get the number of spatial points - this is used for
...
...
@@ -278,9 +278,9 @@ def run_pipeline(pipeline_config, region, dateString, extracted = False, prevent
spatial_points
=
pd
.
read_csv
(
region_spatial_points_file
)
spatial_dim
=
spatial_points
.
shape
[
0
]
if
((
result_dims
[
0
]
!=
spatial_dim
)
or
(
result_dims
[
1
]
!=
(
temporal_dim
+
4
))):
# + 4 required because there are extra columns in the result file
logger
.
error
(
f
"
Result dimension
{
result_dims
}
does not match with the expected: (
{
spatial_dim
}
,
{
temporal_dim
+
4
}
)
"
)
raise
IndexError
#
if ((result_dims[0] != spatial_dim) or (result_dims[1] != (temporal_dim + 4))): # + 4 required because there are extra columns in the result file
#
logger.error(f"Result dimension {result_dims} does not match with the expected: ({spatial_dim}, {temporal_dim + 4})")
#
raise IndexError
if
not
os
.
path
.
exists
(
strain_outPath
):
os
.
makedirs
(
strain_outPath
)
...
...
This diff is collapsed.
Click to expand it.
coordinator/ProcessorEnvironment.py
+
3
−
2
View file @
40e382cc
...
...
@@ -180,8 +180,9 @@ class ProcessorEnvironment(Processor):
for
region
in
subregions
:
output_dir
=
f
"
{
jobPath
}
/plotting/
{
region
.
lower
()
}
"
csv_template_dir
=
input_dir
+
"
/{DISEASE_DIR}/RIE_value.csv
"
# csv_template_dir = input_dir + "/{DISEASE_DIR}/RIE_value.csv"
csv_template_dir
=
input_dir
+
"
/{DISEASE_DIR}/RIE_value.tif
"
Path
(
output_dir
).
mkdir
(
parents
=
True
,
exist_ok
=
True
)
sys_config
=
config
[
'
Environment
'
][
'
EWS-Plotting
'
][
'
SysConfig
'
]
...
...
This diff is collapsed.
Click to expand it.
tests/integration/partial/test_env_suit.py
+
2
−
2
View file @
40e382cc
...
...
@@ -42,8 +42,8 @@ class TestEnvSuit(BaseEnvSuitTestSuite.EnvSuitTestSuite):
@staticmethod
def
write_temp_run_config_file
():
nowstring
:
str
=
IntegrationTestUtils
.
get_now_string
()
prefix
:
str
=
"
temp_env_
"
+
nowstring
#
prefix: str = "temp_env"
#
prefix: str = "temp_env_" + nowstring
prefix
:
str
=
"
temp_env
"
default_config
=
IntegrationTestUtils
.
DEFAULT_CONFIG_FILE_PATH
default_config_dict
:
dict
=
IntegrationTestUtils
.
load_json_file
(
default_config
)
...
...
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