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

Nyaml #1282

Closed
wants to merge 35 commits into from
Closed

Nyaml #1282

wants to merge 35 commits into from

Conversation

sanbrock
Copy link
Contributor

Facilitating the human editing of nxdl definitions in yaml. Tool converts from nxdl.xml to nyaml and backwards

@sanbrock sanbrock self-assigned this Jun 19, 2023
@sanbrock
Copy link
Contributor Author

nyaml2nxdl is now added to support a solution of offering a make option make nxdl as suggested during the Code Camp. This can convert the definitions from the nxdl.xml files (which hold the single source of truth) into nyaml which is easier to edit by humans. The tool can then convert the edited yaml files back to nxdl.xml format for being committed.

@sanbrock sanbrock requested a review from PeterC-DLS June 20, 2023 09:48
Copy link
Contributor

@PeterC-DLS PeterC-DLS left a comment

Choose a reason for hiding this comment

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

Perhaps base this change off #1272

.gitignore Outdated Show resolved Hide resolved
manual/source/conf.py Show resolved Hide resolved
@phyy-nx
Copy link
Contributor

phyy-nx commented Jun 21, 2023

This is very cool :) Some comments from code review in code camp:

I needed to run this to get make nyaml to work:

pip install -e .

Could the above be added to the README? Alternatively, could make nymal detect the presence of nyaml2nxdl and recommend the above if not present?

Optional request: if I edit a .yml file generated by nyaml, could make nymal detect the change and do the reverse conversion automatically?

Finally, I ran these steps to attempt a "round trip":

  1. make nyaml
  2. cd applications/nyaml
  3. nyaml2nxdl --input-file NXmx.yaml
  4. diff -uBb ../NXmx.nxdl.xml NXmx.nxdl.xml

The white space changes are expected, no worries. This seems like it could trip up other software though:

-                            group_names: ["DET", "DTL", "DTR", "DLL", "DLR"]
+                       group_names: ["DET", "DTL", "DTR", "DLL", "DLR"]

Seems to have issues translated quotes inside a doc string.

@sanbrock
Copy link
Contributor Author

new PR is under preparation for conserving micro-credits

@sanbrock sanbrock marked this pull request as draft July 11, 2023 14:37
@sanbrock
Copy link
Contributor Author

PR #1303 is replacing this one

@sanbrock sanbrock closed this Jul 18, 2023
@PeterC-DLS PeterC-DLS deleted the nyaml branch February 8, 2024 15:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Ready for Review
Development

Successfully merging this pull request may close these issues.

None yet

4 participants