Open
Conversation
Signed-off-by: F.N. Claessen <felix@seita.nl>
Signed-off-by: Vlad Iftime <vladiftime60@gmail.com>
Signed-off-by: Vlad Iftime <vladiftime60@gmail.com>
Signed-off-by: Vlad Iftime <vladiftime60@gmail.com>
Flix6x
commented
Jan 22, 2025
Contributor
Author
Flix6x
left a comment
There was a problem hiding this comment.
Just a pointer. Thanks for creating the example JSON.
Comment on lines
24
to
25
| # Define the test object | ||
| test_device_state = S2FrbcDeviceState( |
Contributor
Author
There was a problem hiding this comment.
Let's define two variables here:
example_serialized_device_state, which loads the JSON you added. This variable is the one that the conftest should import, because we want to store a serialized state on the asset attributesexample_deserialized_device_state, which is the object you already defined here. This variable could be used in a new schema test, as an expected outcome of loading (i.e. deserializing)example_serialized_device_stateusing the S2FlexModelSchema`.
Signed-off-by: Vlad Iftime <vladiftime60@gmail.com>
Signed-off-by: Vlad Iftime <vladiftime60@gmail.com>
Signed-off-by: Vlad Iftime <vladiftime60@gmail.com>
Signed-off-by: Vlad Iftime <vladiftime60@gmail.com>
Flix6x
commented
Jan 24, 2025
Contributor
Author
Flix6x
left a comment
There was a problem hiding this comment.
Going in the right direction.
| flex_model={}, # S2Scheduler fetches this from asset attributes | ||
| flex_context={}, | ||
| ) | ||
| assert scheduler.deserialize_config() == example_deserialized_device_state |
Contributor
Author
There was a problem hiding this comment.
assert scheduler.deserialize_config().flex_model == example_deserialized_device_state?
Contributor
Author
|
What's the status on this PR? |
Contributor
Author
|
We discussed moving one of the test devices from #5 into this PR. @VladIftime, did you mean this test device? |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Closes #3.
Todo @VladIftime:
# todo: port test cases from Java testplease add at least one example of the profile you found in the Java code, then let me know and we can discuss how to adjust the schemas to make that test pass.# todo: add serialized stateplease assign the serialized state to a variable in a separate Python file and then import the variable here. Otherwise, theconftest.pywill become too large. Then we can start adjusting theS2FlexModelSchemato use thes2-pythonlibrary.