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

Avoid 'new line' symbols in string edges (YODA writer) #59

Merged
merged 2 commits into from
Aug 22, 2024

Conversation

20DM
Copy link
Collaborator

@20DM 20DM commented Aug 12, 2024

Hi,

I came across a recent submission from CMS that encodes the string edges for the independent axis in Table 2 like so:

  - value: |-
      $c\overline{c}>H\gamma>e
      u_e\mu
      u_\mu\gamma$

which is an edge that involves two new line characters. These are not preserved by the browser-based view of the associated entry: it prints the edge in one line, which was presumably the intention anyway, but that is not necessarily the case for all output formats. I noticed them being propagated through by the YODA writer, which later on causes the reader to crash (which is a separate issue that I will deal with on the YODA side).

For the sake of this entry (and possibly others), I would propose to remove new-line characters entirely from string-based bin edges when assembling the YODA objects, as done in this change set.

@coveralls
Copy link

Coverage Status

coverage: 91.841%. remained the same
when pulling c05d905 on 20DM:cg_patch_for_newline_symbols
into d543b76 on HEPData:main.

Copy link
Member

@GraemeWatt GraemeWatt left a comment

Choose a reason for hiding this comment

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

Thanks for the PR! I'll merge now. It looks like the other output formats all tolerate the newline characters, although I agree it is probably unintentional for ins2709669 and it could complicate later processing of the downloads by users. I therefore edited Table 2 of Version 1 and Table 2 of Version 2 to replace the newline characters by a space (as done in your new code for the YODA writer).

@GraemeWatt GraemeWatt merged commit 193f60c into HEPData:main Aug 22, 2024
4 checks passed
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.

3 participants