Add a constants file for python modules
- Dominant language
- Fortran
- Stars
- 352
- Forks
- 361
- Avg merge
- 2d 21h
- Merged PRs (30d)
- 7
Description
This came up in discussing #1461 with @negin513. We wondered if it would be helpful to have a small python file with a list of constants that could be shared. A small utility file could keep a list of constants that could be shared between modules. NATPFT and MXPFT and MONTHS_PER_YEAR are all things that could go into this list.
I'm not sure if this is the best way to do this. But, it seems like it would be the simplest way to have those constants shared between several python modules. In Python 3.8, you can use the Final module and "Final" qualifier to give warnings if something is redefined. Another way that constants are handled to be really sure they don't change is to make them functions so you can't redefine them. But, likely a simple file would be sufficient.
Contributor guide
Assessment
This issue has not been assessed yet.