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

Normalise node type names #38

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

knoxsp
Copy link
Collaborator

@knoxsp knoxsp commented Sep 26, 2024

Remove non-alpha characters from node type names coming from the template, and make them lower caase, allowing for the template to display more user-friendly names, while maintaining compatibility in pywr

template, and make them lower caase, allowing for the template to
display more user-friendly names, while maintaining compatibility in
pywr
@pmslavin
Copy link
Collaborator

It is quite common in existing models to use numbers in node names, especially at the end to distinguish nodes within some kind of group, e.g. "Generator 1", "Generator 2", "Abstraction T1", etc. The re.sub would collapse all such names down to just the same alphabetic characters.

Is there a case for enforcing "variable name" convention instead, where digits can be present in a node name anywhere except as the initial character and underscores used to allow "spacing" between parts of a name?

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.

2 participants