-
Notifications
You must be signed in to change notification settings - Fork 4
Use daq config server for UndulatorDCM config #1497
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
Merged
Merged
Changes from all commits
Commits
Show all changes
42 commits
Select commit
Hold shift + click to select a range
97783aa
Convert test beamlineParameters files
jacob720 4cae7d8
Add mock config server
jacob720 4c37ed9
Pin dodal
jacob720 9136e23
Fix
jacob720 2a89044
Require newest daq-config-server
jacob720 26aa661
Fix against dodal
jacob720 1605fca
Remove redundant fixture
jacob720 13c2a2b
Merge branch 'main' into 1504_read_beamlineParameters_through_config_…
jacob720 8810f9f
Merge branch 'main' into 1504_read_beamlineParameters_through_config_…
jacob720 623de3b
Fix lint
jacob720 230bcd8
Merge branch 'main' into 1504_read_beamlineParameters_through_config_…
jacob720 af04fae
Merge branch 'main' into 1504_read_beamlineParameters_through_config_…
jacob720 bf3d105
Use config server fixtures from dodal and patch beamline environment
jacob720 fdaed05
Reduce use of get_beamline_name default
jacob720 992b067
Fix tests
jacob720 d53c9f9
Merge branch 'main' into 1504_read_beamlineParameters_through_config_…
jacob720 095a052
Fix
jacob720 f70f9b6
Merge branch 'main' into 1504_read_beamlineParameters_through_config_…
jacob720 6f17235
Merge branch 'main' into 1504_read_beamlineParameters_through_config_…
jacob720 5bd5224
Use config server to read pitch and roll config
jacob720 9a555a3
Fix tests and test data
jacob720 fe31780
Pin dodal and daq-config-server
jacob720 90a847c
Use specific lut models for each undulator lut
jacob720 1b566f7
Fix for columns becoming a property
jacob720 85c2752
Use latest config server version
jacob720 c887f44
Set BEAMLINE env variable in undulator fixture
jacob720 df5e56b
Merge branch 'main' into 1504_read_beamlineParameters_through_config_…
jacob720 92bc727
Merge branch 'main' into 1504_read_beamlineParameters_through_config_…
jacob720 a60d219
Merge branch '1504_read_beamlineParameters_through_config_server' int…
jacob720 5d46d8f
Merge branch 'main' into use_daq_config_server
jacob720 33f5b44
Use i03 config client
jacob720 d6b77ad
Merge branch 'main' into use_daq_config_server
jacob720 a4c34c0
Use beamline config client constants
jacob720 ba1158d
Update lockfile
jacob720 6522c4c
Remove unneeded patch
jacob720 2a1ffb6
Add system tests
jacob720 8e36263
Fix lint
jacob720 001cce4
Use new get_config_client and remove where possible
jacob720 3ede4ee
Fix tests
jacob720 93b6d75
Merge branch 'main' into use_daq_config_server
jacob720 161d678
Update lockfile
jacob720 cbec4e9
Fix tests
jacob720 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
Empty file.
42 changes: 42 additions & 0 deletions
42
tests/system_tests/common/daq_config_server/test_daq_config_server.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| import pytest | ||
| from daq_config_server import ConfigClient | ||
| from daq_config_server.models.feature_settings.hyperion_feature_settings import ( | ||
| HyperionFeatureSettings, | ||
| ) | ||
| from dodal.common.beamlines.beamline_parameters import BEAMLINE_PARAMETER_PATHS | ||
| from dodal.common.beamlines.beamline_utils import get_config_client | ||
|
|
||
| from mx_bluesky.hyperion.external_interaction.config_server import ( | ||
| GDA_DOMAIN_PROPERTIES_PATH, | ||
| ) | ||
| from tests.system_tests.conftest import LOCAL_CONFIG_SERVER_URL | ||
|
|
||
|
|
||
| @pytest.mark.system_test | ||
| def test_can_get_file_from_real_config_server(config_client: ConfigClient): | ||
| filepath = "/dls_sw/i03/software/daq_configuration/testfile.txt" | ||
| result = config_client.get_file_contents(filepath, desired_return_type=str) | ||
| assert result == "this is for system tests" | ||
|
|
||
|
|
||
| @pytest.mark.system_test | ||
| def test_get_beamline_paramaters_from_real_config_server( | ||
| config_client: ConfigClient, | ||
| ): | ||
| filepath = BEAMLINE_PARAMETER_PATHS["i03"] | ||
| config_client.get_file_contents(filepath, desired_return_type=dict) | ||
|
|
||
|
|
||
| @pytest.mark.system_test | ||
| def test_get_domain_proeprties_from_real_config_server( | ||
| config_client: ConfigClient, | ||
| ): | ||
| filepath = GDA_DOMAIN_PROPERTIES_PATH | ||
| config_client.get_file_contents( | ||
| filepath, desired_return_type=HyperionFeatureSettings | ||
| ) | ||
|
|
||
|
|
||
| @pytest.mark.system_test | ||
| def test_local_config_server_being_used_with_get_config_client(): | ||
| assert get_config_client()._url == LOCAL_CONFIG_SERVER_URL |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
could consider renaming the file here to config_client