Change python print statements to using standard python logging
- Dominant language
- Fortran
- Stars
- 352
- Forks
- 361
- Avg merge
- 2d 21h
- Merged PRs (30d)
- 7
Description
There's a few python modules under the python directory that still use a print statement rather than using python logging. These should be updated to use our standard python logging system.
for example "git grep 'print(' shows the following...
> ctsm/config_utils.py: print("val = ", val, " in var not in allowed_values")
> ctsm/lilac_build_ctsm.py: print('Initial setup complete; it is now safe to work with the runtime inputs in\n'
> ctsm/os_utils.py: print('ERROR while running:')
> ctsm/os_utils.py: print(' '.join(cmd))
> ctsm/os_utils.py: print('From {}'.format(cwd))
> ctsm/os_utils.py: print('')
> ctsm/os_utils.py: print(error.output)
> ctsm/os_utils.py: print('')
> ctsm/os_utils.py: print('ERROR trying to run:')
> ctsm/os_utils.py: print(' '.join(cmd))
> ctsm/os_utils.py: print('From {}'.format(cwd))
> ctsm/run_sys_tests.py: print("Testroot: {}\n".format(testroot))
> ctsm/run_sys_tests.py: print(output)
> ctsm/subset_data.py: print("Must supply a positional argument: 'point' or 'region'.")
> ctsm/subset_data.py: print("See ./subset_data --help for more help.")
> ctsm/subset_data.py: print("Must supply one of:")
> ctsm/subset_data.py: print(" --create-surface \n --create-landuse \n --create-datm \n --create-domain")
> ctsm/subset_data.py: print("See ./subset_data --help for more help.")
> ctsm/utils.py: print("val = ", val, " in var not in allowed_values")
Contributor guide
Assessment
This issue has not been assessed yet.