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

P11 config update #1095

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from
Open

P11 config update #1095

wants to merge 5 commits into from

Conversation

agruzinov
Copy link
Contributor

Before starting migration to the yaml it is good to have working set of scripts for the current setup.

Copy link
Member

@beteva beteva left a comment

Choose a reason for hiding this comment

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

Hi @agruzinov, good initiative to clean up obsolete files.
As a general remark, we have removed Device and Equipment classes, so everywhere in the config files you should replace device and equipment with object. It still works if you do not do this, but since you are anyhow cleaning up, it will be better if you do it. Also will be easier when you transfer from xml to yaml.

@@ -0,0 +1,12 @@
<object class="P11Beam">
Copy link
Member

Choose a reason for hiding this comment

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

This probably should be DESY.P11Beam, as the file is in the DESY sub directory.


<beam_divergence_vertical>0.05</beam_divergence_vertical>
<beam_divergence_horizontal>0.05</beam_divergence_horizontal>
<definer_type>"mirror"</definer_type>
Copy link
Member

Choose a reason for hiding this comment

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

I wonder if you have a definer mirror, than you should be having an object with a role mirror (just like aperture and slits)

@@ -0,0 +1,14 @@
<device class="P11BeamStop">
Copy link
Member

Choose a reason for hiding this comment

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

Same as above, should not this be DESY.P11BeamStop

@@ -0,0 +1,5 @@
<object class="P11EDNACharacterisation">
Copy link
Member

Choose a reason for hiding this comment

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

Same as above (DESY.P11EDNACharacterisation)

@@ -0,0 +1,14 @@
<object class="P11Collimator">
Copy link
Member

Choose a reason for hiding this comment

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

Same as above.

Comment on lines +1 to +2
<device class="ApertureMockup">
</device>
Copy link
Member

Choose a reason for hiding this comment

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

This should be as before - object, not device

Comment on lines +1 to +3
<device class="MotorMockup">
<actuator_name>Kappa</actuator_name>
</object>
</device>
Copy link
Member

Choose a reason for hiding this comment

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

Same here, object, not device

Comment on lines +1 to +3
<device class="MotorMockup">
<actuator_name>Phi</actuator_name>
</object>
</device>
Copy link
Member

Choose a reason for hiding this comment

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

Revert to previous version - should be object, not device

Comment on lines +1 to +2
<device class = "P11DoorInterlock">
</device>
Copy link
Member

Choose a reason for hiding this comment

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

object and also DESY.P11DoorInterlock

@@ -0,0 +1,11 @@
<equipment class="P11Energy">
Copy link
Member

Choose a reason for hiding this comment

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

object, not equipment, also DESY.P11Energy

@agruzinov
Copy link
Contributor Author

agruzinov commented Dec 13, 2024

Thanks for the comments @beteva!

I was wondering if someone is using the yamllinter that can lint files and not only show errors that needs to be changed one by one :)
P.S.
prettier, yamlfmt still can not make yamllint happy...
Thanks!

@fabcor-maxiv
Copy link
Contributor

fabcor-maxiv commented Dec 16, 2024

I was wondering if someone is using the yamllinter that can lint files and not only show errors that needs to be changed one by one :)
prettier, yamlfmt still can not make yamllint happy...

I had a very quick look at the job output. Looks like the YAML files have a lot of "long lines". It is possible to disable the "long lines" rule for a specific file. That would be acceptable, especially since it appears in DESY-specific files, it is up to DESY to maintain those files and possibly disable all linting rules for those files if it is what is wanted.

https://yamllint.readthedocs.io/en/stable/disable_with_comments.html

@marcus-oscarsson
Copy link
Member

@agruzinov, unfortunately I don't think there is formater that handles all the linting errors. I tried to find one a while back and I did not find any at the time. Perhaps someone out there have found a good tool ?

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