-
Notifications
You must be signed in to change notification settings - Fork 6
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
ketchup: json string switch and unready function #80
Conversation
ketchup unready [pipeline] is also added and working now |
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.
In general, it's not a bad idea to do a JSON interface instead of a YAML one for tomato-1.0
, too. I'm not super happy with the YAML output as it's very bulky.
if args.payload.endswith("json"): | ||
pldict = json.load(infile) | ||
elif args.payload.endswith("yml") or args.payload.endswith("yaml"): | ||
pldict = yaml.full_load(infile) |
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.
Not sure why I'm using yaml.full_load()
here. Could you check with a safe_load
and see if the tests pass?
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 can't get the pytest to work properly so can't check this
9/10 tests fail with assert 'cd' == 'c'
Not sure if it is the cause but I see:
INFO:dgbowl_schemas.tomato:Could not parse 'kwargs' using Payload v0.2.
INFO:dgbowl_schemas.tomato:1 validation error for Payload
version
unexpected value; permitted: '0.2' (type=value_error.const; given=0.1; permitted=('0.2',))
DEBUG:tomato.ketchup.functions:Payload=Payload(version='0.1' tomato=Tomato(unlock_when_done=False, verbosity='WARNING', output=Output(path=None, prefix=None)) sample=Sample(name='dummy_random_5_2') method=[Method(device='worker', technique='random', delay=2, time=5)])
I can send you the full log if you want
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.
Sorry, the test fails with safe_load
or fails always with this PR?
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.
Always even without this PR, on one PC I get 1 test passing, on another I get all fails
Refactor ketchup status -J argument only on status and submit functions
@g-kimbell I've pushed a modified workflow file into this branch, so the tests are being run here on github. You'll have to pull the branch first. Let's get the tests fixed before merging. In GH's logs I see:
So I'm guessing we broke it in the previous PR - the dummy device doesn't have |
Thanks, I will move the memory stuff into biologic main |
Now it breaks because I in data_poller I started using get_data to also return the status, which works for biologic and cuts the API calls by half, but it is not general. Maybe it is best to duct tape fix this with a try except and have a better think about how to implement this in 1.0 |
This one I'm not sure about. We have "sphinx==4.5.0" in setup.py, nothing about applehelp in the repo |
This looks like an issue with the environment, so not caused by this PR. I'll fix the |
@g-kimbell The docs should be fixed in #87 on the |
zip(*running) would fail if no cells were running, now only does this if running is not empty. Also delete extraneous print statements.
Refactor ketchup status -J argument only on status and submit functions
Memory filled/size is not guaranteed by all drivers, should be made driver-specific
Somehow data was NoneType but did not short circuit the previous 'if data and ....' statement
Change get_status and get_data order to avoid race conditions when polling rate is the same as test duration
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.
🔋 ♻️ 🪫
Adds a [-J/--json] switch to ketchup to send/receive json strings
ketchup -J submit [payload]
Expects the payload to be a base64 encoded (to avoid issues with spaces and special characters) json string
ketchup -J status
Returns a json string instead of a formatted table