Skip to content

Commit

Permalink
Merge pull request #71 from ECCO-GROUP/kev_pipeline_dev
Browse files Browse the repository at this point in the history
fixed pipeline config file path
  • Loading branch information
kevinmarlis authored Nov 3, 2021
2 parents 9b6ad1d + d5c9a6b commit 5fa364c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
14 changes: 10 additions & 4 deletions ecco_pipeline/run_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,10 +186,16 @@ def run_aggregation(datasets, output_dir, grids_to_use):
parser = create_parser()
args = parser.parse_args()

config_path = Path('./ECCO_PIPELINE/pipeline_config.yaml')
with open(config_path, 'r') as stream:
config = yaml.load(stream, yaml.Loader)

try:
config_path = Path('./ecco_pipeline/pipeline_config.yaml')
with open(config_path, 'r') as stream:
config = yaml.load(stream, yaml.Loader)
except:
print('Unable to load pipeline config. Make sure pipeline_config.yaml \
has been created from template. Exiting.')
log.fatal('Unable to load pipeline config. Make sure pipeline_config.yaml \
has been created from template. Exiting.')
exit()
# Hardcoded output directory path for pipeline files
output_dir = Path(config['output_dir'])

Expand Down
2 changes: 1 addition & 1 deletion ecco_pipeline/utils/solr_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import requests
import yaml

config_path = Path('./ECCO_PIPELINE/pipeline_config.yaml')
config_path = Path('./ecco_pipeline/pipeline_config.yaml')
with open(config_path, 'r') as stream:
config = yaml.load(stream, yaml.Loader)

Expand Down

0 comments on commit 5fa364c

Please sign in to comment.