You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
Hi! I'd like to take this one as a first contribution. My plan: add a small shared Python constants module (starting with NATPFT, MXPFT and MONTHS_PER_YEAR), then switch the existing python modules that define those values over to it. I'll check back here on the exact file location and naming before I open a PR. I expect to have a draft within about a week or two. If someone is already working on this, or you'd prefer a different approach, please let me know.
6. Hi! I'd like to take this one as a first contribution. My plan: add a small shared Python constants module (starting with NATPFT, MXPFT and MONTHS_PER_YEAR), then switch the existing python modules that define those values over to it. I'll check back here on the exact file location and naming before I open a PR. I expect to have a draft within about a week or two. If someone is already working on this, or you'd prefer a different approach, please let me know.
Hi @michellejtan thanks so much for volunteering to take this on. We really appreciate it. This sounds great.
Base your branch and PR off the b4b-dev branch. The contributing guidelines should help. We haven't finalized our guidelines for using AI, but use the PR in #4286 to guide your AI contributions. Looking forward to seeing your contribution. Take care.
Activity
[-]Add a constants file for python/[/-][+]Add a constants file for python modules[/+]michellejtan commentedon Nov 1, 2026
Hi! I'd like to take this one as a first contribution. My plan: add a small shared Python constants module (starting with NATPFT, MXPFT and MONTHS_PER_YEAR), then switch the existing python modules that define those values over to it. I'll check back here on the exact file location and naming before I open a PR. I expect to have a draft within about a week or two. If someone is already working on this, or you'd prefer a different approach, please let me know.
ekluzek commentedon Nov 1, 2026
Hi @michellejtan thanks so much for volunteering to take this on. We really appreciate it. This sounds great.
Base your branch and PR off the b4b-dev branch. The contributing guidelines should help. We haven't finalized our guidelines for using AI, but use the PR in #4286 to guide your AI contributions. Looking forward to seeing your contribution. Take care.