Skip to content

Modifications for nomad meta-info underlining function change#704

Merged
TLCFEM merged 1 commit intomasterfrom
ModificationForMetainfo
Sep 29, 2025
Merged

Modifications for nomad meta-info underlining function change#704
TLCFEM merged 1 commit intomasterfrom
ModificationForMetainfo

Conversation

@RubelMozumder
Copy link
Collaborator

@RubelMozumder RubelMozumder commented Sep 29, 2025

With the new implementation nomad meta-info, the annotation is expected to be in a list; otherwise, it would get an error:

image

@lukaspie
Copy link
Collaborator

Can you please elaborate why this change is needed and what it is doing? Hard to understand otherwise.

@RubelMozumder RubelMozumder marked this pull request as ready for review September 29, 2025 10:19
Copy link
Collaborator

@mkuehbach mkuehbach left a comment

Choose a reason for hiding this comment

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

ongoing work

@mkuehbach
Copy link
Collaborator

With the new implementation nomad meta-info

Please provide context e.g. nomad-FAIR or gh commit where this was introduced by

the annotation is expected

Which specific annotation?

@RubelMozumder
Copy link
Collaborator Author

Can you please elaborate on why this change is needed and what it is doing? Hard to understand otherwise.

Currently, m_annotation.get or m_annotation_get returns a list, not an object. But, in both cases, we define a default unit which is None. These changes are needed due to some modifications injected by @TLCFEM. He can better give context on modification, what type of modifications he and the corresponding GH commit.

@RubelMozumder
Copy link
Collaborator Author

With the new implementation nomad meta-info

Please provide context e.g. nomad-FAIR or gh commit where this was introduced by

CC @TLCFEM

the annotation is expected

Which specific annotation?

@RubelMozumder
Copy link
Collaborator Author

Can you please elaborate on why this change is needed and what it is doing? Hard to understand otherwise.

Currently, m_annotation.get or m_annotation_get returns a list, not an object. But, in both cases, we define a default unit which is None. These changes are needed due to some modifications injected by @TLCFEM. He can better give context on modification, what type of modifications he and the corresponding GH commit.

Alternatively, we can use also

default_display_unit = quantity_def.m_annotations.get(
  eln", [None] 
  0].defaultDisplayUnit

@TLCFEM TLCFEM merged commit 2cd16cd into master Sep 29, 2025
16 checks passed
@TLCFEM
Copy link
Contributor

TLCFEM commented Sep 29, 2025

Directly using quantity_def.m_annotations.get is not safe as quantity_def.m_annotations may store an annotation or a list of annotations.

The change made is more robust and safer.

@lukaspie lukaspie deleted the ModificationForMetainfo branch September 29, 2025 12:25
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