Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
gga_load_data
Manage
Activity
Members
Labels
Plan
Issues
12
Issue boards
Milestones
Wiki
Code
Merge requests
5
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
abims
e-infra
gga_load_data
Merge requests
!21
Check required config param are not empty
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Check required config param are not empty
check_config_param
into
dev
Overview
4
Commits
7
Pipelines
0
Changes
2
All threads resolved!
Hide all comments
Merged
Loraine Gueguen
requested to merge
check_config_param
into
dev
3 years ago
Overview
4
Commits
7
Pipelines
0
Changes
1
All threads resolved!
Hide all comments
Expand
👍
0
👎
0
Merge request reports
Viewing commit
e73b9d76
Prev
Next
Show latest version
1 file
+
6
−
4
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
e73b9d76
WIP: Check required config param are not empty
· e73b9d76
Loraine Gueguen
authored
3 years ago
utilities.py
+
9
−
5
Options
@@ -36,12 +36,16 @@ def parse_config(config_file):
"""
config_dict
=
load_yaml
(
config_file
)
if
isinstance
(
config_dict
,
dict
):
#logging.debug("Config dictionary: {0}".format(config_dict))
return
config_dict
else
:
logging
.
critical
(
"
Config yaml file is not a dictionary
"
%
config_file
)
if
not
isinstance
(
config_dict
,
dict
):
logging
.
critical
(
"
Config yaml file is not a dictionary (%s)
"
%
config_file
)
sys
.
exit
()
else
:
for
required_parameter
in
constants
.
REQUIRED_PARAMETERS
:
if
not
config_dict
[
required_parameter
]:
logging
.
critical
(
"
{0} parameter improperly configured in config file {1}
"
.
format
(
required_parameter
,
config_file
))
sys
.
exit
()
return
config_dict
def
parse_input
(
input_file
):
"""
Loading