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

Correct reference to character limit #1524

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

Conversation

PeterC-DLS
Copy link
Contributor

No description provided.

@PeterC-DLS PeterC-DLS requested a review from a team December 19, 2024 08:33
@@ -93,7 +93,7 @@ described by the following :index:`rules <rules; naming>`:
^[a-zA-Z0-9_]([a-zA-Z0-9_.]*[a-zA-Z0-9_])?$

The length should be limited to no more than
63 characters (imposed by the HDF5 :index:`rules <rules; HDF5>` for names).
63 characters (imposed by the HDF4 :index:`rules <rules; HDF>` for names).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found this

The max size of an SD dataset name in HDF4 (from HDF4 documentation) is 64.

But in in the wild we have encountered longer names. As long as the HDF4 name is not greater than NC_MAX_NAME, our code will be OK.

I could not find it in the HDF4 specs: https://doi.org/10.5281/zenodo.13310722

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, there's no such limit in HDF5.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

HDF4 library truncates to VSNAMELENMAX (a preprocessor symbol that is 64 by default) for in-memory names. See hlimits.h#L55-L64

@prjemian
Copy link
Contributor

prjemian commented Dec 19, 2024 via email

Copy link
Contributor

@tacaswell tacaswell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The guidance is only "should". Even if we no longer maintain hdf4 bindings, it has historically been a supported target and it does little harm to acknowledge that.

@@ -93,7 +93,7 @@ described by the following :index:`rules <rules; naming>`:
^[a-zA-Z0-9_]([a-zA-Z0-9_.]*[a-zA-Z0-9_])?$

The length should be limited to no more than
63 characters (imposed by the HDF5 :index:`rules <rules; HDF5>` for names).
63 characters (imposed by the HDF4 :index:`rules <rules; HDF>` for names).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
63 characters (imposed by the HDF4 :index:`rules <rules; HDF>` for names).
63 characters (historically imposed by the HDF4 :index:`rules <rules; HDF>` for names).

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.

4 participants