-
Notifications
You must be signed in to change notification settings - Fork 40
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
Moved the configuration from the .env
file to beamline-configuration.yml
and ui.yml
#1139
Conversation
__root__: Dict[str, UIPropertiesModel] | ||
sample_view: UIPropertiesModel | ||
beamline_setup: UIPropertiesModel | ||
camera_setup: UICameraConfigModel |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The UIComponentModel
is checked against the HardwareObject
it configures to avoid mistakes. However the this caused a warning for the objects in the
camera_setup` section
@@ -11,3 +11,20 @@ class SimpleNameValue(BaseModel): | |||
class AppSettingsModel(BaseModel): | |||
mode: ModeEnum = Field(ModeEnum.OSC, description="MXCuBE mode SSX or OSC") | |||
version: str = Field("", description="MXCuBE version") | |||
mesh_result_format: str = Field( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Most of the setting from the .env
file was moved to general application settings, configured via beamline-config.yaml
@@ -78,76 +78,81 @@ run_processing_parallel: true | |||
run_number: 1 | |||
click_centring_num_clicks: 3 | |||
|
|||
mesh_result_format: PNG |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
New configuration added here
attribute: diffractometer.sampx | ||
role: focus | ||
step: 0.1 | ||
precision: 3 | ||
suffix: mm | ||
|
||
sample_view_video_controls: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The option to display the focus control on the video display was moved to ui.yml
and the same option was added to all controls (in case it would be needed)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are you thinking on potentially hide the 3 click, zoom. etc?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Exactly, I thought it was better to simply generalize the visibility of these controls, as there already was one that could be hidden/shown. Its less likely for some controls but it is useful for a few especially for SSX
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice and useful addition! I left ew minor comments/questions
tack,
mxcubeweb/core/models/generic.py
Outdated
"PNG", description="Format of mesh result for display" | ||
) | ||
use_native_mesh: bool = Field( | ||
True, description=" Use the native mesh feature available, true by default" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please remind me what this one meant... this would be the md3 command? no workflow?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Exactly, so its basically just to disable the native mesh method so that its not available to the users. Its useful for instance for us as we have the workflow meshes, and it would mean that there are two kinds of meshes and that is of course a bit confusing. So this option is simply to disable the native one and favor the workflow one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good, less confusion is always good :)
attribute: diffractometer.sampx | ||
role: focus | ||
step: 0.1 | ||
precision: 3 | ||
suffix: mm | ||
|
||
sample_view_video_controls: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are you thinking on potentially hide the 3 click, zoom. etc?
} | ||
|
||
getControlAvailability(name) { | ||
const avilable = find( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
:), thanks
}, | ||
) || { show: false }; | ||
|
||
return available.show; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd move the fallback here: return available?.show || false
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh, yes thats nice :)
Thanks for the input everybody ! :) |
Moved the configuration from the
.env
file tobeamline-configuration.yml
andui.yml
. At the same time improved the handling of the data model forui.yml
.Each section can now have its own data model, which is needed since the server check objects types as
UIComponentModel
for the actualHardwareObject
correspondens, leading to the following error message for thecamera_setup
section inui.yml
:Needs PR #821 on mxcubecore to work