Skip to content

Static analysis and ci - #7

Open
MattF-NSIDC wants to merge 17 commits into
mainfrom
static-analysis-and-ci
Open

Static analysis and ci#7
MattF-NSIDC wants to merge 17 commits into
mainfrom
static-analysis-and-ci

Conversation

@MattF-NSIDC

Copy link
Copy Markdown
Collaborator

Resolves #6

@MattF-NSIDC
MattF-NSIDC requested a review from mankoff September 29, 2022 00:13
Comment thread scripts/json2datalad.sh
log_err() { echo -e "${red}[$(date --iso-8601=seconds)] [ERR] [${PROGNAME}] ${@}${nc}" >&2; }
log_debug() { if [[ ${debug:-} == 1 ]]; then echo -e "${yellow}[$(date --iso-8601=seconds)] [DEBUG] [${PROGNAME}] ${@}${nc}"; fi }
err_exit() { echo -e "${red}[$(date --iso-8601=seconds)] [ERR] [${PROGNAME}] ${@:-"Unknown Error"}${nc}" >&2; exit 1; }
log_info() { if [[ "${verbose:-}" == 1 ]]; then echo -e "${green}[$(date --iso-8601=seconds)] [INFO] [${PROGNAME}] ${*}${nc}"; fi; }

@MattF-NSIDC MattF-NSIDC Sep 29, 2022

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mankoff the $verbose variable previously had no effect. What do you think about this?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you sure? When processing the CLI arg/flags I had set -o xtrace; which made things very verbose. But this is a good addition.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, to be more clear, the --verbose flag does have an effect, but the $verbose variable was not being used anywhere in the code. We could remove the $verbose variable entirely and only do set -o xtrace when the flag is passed? What do you think?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

If user-defined output location, add parents=True to Path.mkdir() call

3 participants