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

Expand allowable XS types to include lower case letters #2069

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

mgjarrett
Copy link
Contributor

What is the change?

Allow lower case letters to be used as the XS type to increase the number of possible unique XS groups from 26 to 52.

Why is the change being made?

Some models have a large number of different XS types (15-20), and some internal plugins generate additional XS groups while running, which can push the total number of XS groups above 26. The ARMI app will currently crash if a 27th XS type is requested.

Notes

This should work fine on Linux or Mac platforms, which have case-sensitive filesystems. A user might encounter problems if they attempt to exceed 26 XS types on Windows, because the filesystem is not case-sensitive, and a plugin might try to generate a file name that is indistinguishable to a previous filename on Windows (e.g., latticePhysics-AA.inp and then latticePhysics-aA.inp). While this is unfortunate, the current code would also fail when a user tries to exceed 26 XS types (on any platform), so this PR isn't breaking a currently working capability, it's just changing the manner in which the code would fail.


Checklist

  • The release notes have been updated if necessary.
  • The documentation is still up-to-date in the doc folder.
  • The dependencies are still up-to-date in pyproject.toml.

@mgjarrett mgjarrett self-assigned this Jan 31, 2025
@john-science john-science added the feature request Smaller user request label Feb 7, 2025
@john-science
Copy link
Member

Well, the change is certainly easy to understand.

It is unfortunate this wouldn't work on Windows. (Ridiculous file system.)

@mgjarrett Have you ran into a need for this PR in practice?

@drewj-tp
Copy link
Contributor

drewj-tp commented Feb 7, 2025

This should work fine on Linux or Mac platforms, which have case-sensitive filesystems

I would try to find a Mac user and confirm as appropriate. I remember 2022-2023 having some case insensitive file system problems.

Looking for confirmation, it looks like it's possible for a Mac to have a case-insensitive file system

Choose one of the following APFS formats for Mac computers using macOS 10.13 or later.

APFS: Uses the APFS format. Choose this option if you don’t need an encrypted or case-sensitive format.

APFS (Encrypted): Uses the APFS format and encrypts the volume.

APFS (Case-sensitive): Uses the APFS format and is case-sensitive to file and folder names. For example, folders named “Homework” and “HOMEWORK” are two different folders.

APFS (Case-sensitive, Encrypted): Uses the APFS format, is case-sensitive to file and folder names, and encrypts the volume. For example, folders named “Homework” and “HOMEWORK” are two different folders.

https://support.apple.com/guide/disk-utility/file-system-formats-dsku19ed921c/mac

@mgjarrett
Copy link
Contributor Author

Well, the change is certainly easy to understand.

It is unfortunate this wouldn't work on Windows. (Ridiculous file system.)

@mgjarrett Have you ran into a need for this PR in practice?

Yes, the motivation for the PR is that I encountered this error in a practical application.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Smaller user request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants