Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Static analysis and ci #7

Open
wants to merge 17 commits into
base: main
Choose a base branch
from
Open

Static analysis and ci #7

wants to merge 17 commits into from

Conversation

MattF-NSIDC
Copy link
Collaborator

Resolves #6

@MattF-NSIDC MattF-NSIDC requested a review from mankoff September 29, 2022 00:13
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; }
Copy link
Collaborator Author

@MattF-NSIDC MattF-NSIDC Sep 29, 2022

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
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
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