make Network names lowercase
Changes
There is no need (only confusion) for uppercase letters in network names as far as I can see. This changes network names to lowercase.
Issue link
You have to create an issue to link to this PR. If this really is not possible, write a very detailed description here and add this PR to the project board directly.
Please add the link to the issue after "Closes".
Closes ...
Demo
Please add some proof in the form of screenshots or screen recordings to show (off) new functionality, if there are interesting new features for end-users.
QA notes
Please add some information for QA on how to test the newly created code.
Code Checklist
- [ ] All the commits in this PR are properly PGP-signed and verified.
- [ ] This PR only contains functionality relevant to the issue.
- [ ] I have written unit tests for the changes or fixes I made.
- [ ] I have checked the documentation and made changes where necessary.
- [ ] I have performed a self-review of my code and refactored it to the best of my abilities.
- [ ] Tickets have been created for newly discovered issues.
- [ ] For any non-trivial functionality, I have added integration and/or end-to-end tests.
- [ ] I have informed others of any required
.envchanges files if required and changed the.env-distaccordingly. - [ ] I have included comments in the code to elaborate on what is not self-evident from the code itself, including references to issues and discussions online, or implicit behavior of an interface.
Checklist for code reviewers:
Copy-paste the checklist from the docs/source/templates folder into your comment.
Checklist for QA:
Copy-paste the checklist from the docs/source/templates folder into your comment.
I'm not sure how mixed cases can be confusing, since network names are user-defined. Converting them to lowercase might help avoid accidental mismatches due to case sensitivity, but it could also override a deliberate naming choice which imo isn't ideal. Perhaps case-insensitive comparison could be done internally without enforcing a lowercase constraint on the actual names? I'll leave it up to you
I'm not sure how mixed cases can be confusing, since network names are user-defined. Converting them to lowercase might help avoid accidental mismatches due to case sensitivity, but it could also override a deliberate naming choice which imo isn't ideal. Perhaps case-insensitive comparison could be done internally without enforcing a lowercase constraint on the actual names? I'll leave it up to you
I keep finding myself in situations where I capitalize the network name (in imports or when I create networks), when in reality the network name was already lowercase. Limiting the user to a single case doesn't really hurt anyone as I cant really see a usecase for two networks with just a difference in their capitalization.
Quality Gate passed
Issues
0 New issues
0 Accepted issues
Measures
0 Security Hotspots
100.0% Coverage on New Code
0.0% Duplication on New Code
I'm not sure how mixed cases can be confusing, since network names are user-defined. Converting them to lowercase might help avoid accidental mismatches due to case sensitivity, but it could also override a deliberate naming choice which imo isn't ideal. Perhaps case-insensitive comparison could be done internally without enforcing a lowercase constraint on the actual names? I'll leave it up to you
I keep finding myself in situations where I capitalize the network name (in imports or when I create networks), when in reality the network name was already lowercase. Limiting the user to a single case doesn't really hurt anyone as I cant really see a usecase for two networks with just a difference in their capitalization.
I've seen a few cases (in demos, test sessions and while pair programming) that people use different casing. So I don't fully agree that it doesn't really hurt anyone, because we're changing default behavior. Changing the default behavior could unintentionally break existing systems that already store Network objects with varied casing. Even if it's rare, we'd still have to document this and/ or create migration scripts.
I do understand your concern and having wrong comparisons in during setup/ importing is cumbersome. But imo this would've better been a (discussion) issue ticket rather than a direct implementation suggestion as the subject is somewhat debatable. I'll leave this up to you
Notes from discussion meeting 29-4-2025:
- We add a warning message in the frontend when a
Networkobject has to be created - We alter the
Network.namefield after initialization (lower case the value) instead of a lower case constraint on the field
Quality Gate passed
Issues
0 New issues
0 Accepted issues
Measures
0 Security Hotspots
28.6% Coverage on New Code
0.0% Duplication on New Code