-
Notifications
You must be signed in to change notification settings - Fork 0
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
Add web client for DIDE portal #9
Conversation
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.
Looks good to me - one question on the toml...
@@ -42,6 +44,7 @@ path = "src/hipercow/__about__.py" | |||
dependencies = [ | |||
"pytest", | |||
"pytest-cov", | |||
"responses", |
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.
Should this be in the other batch of dependencies above (line 29ish?) - CI tests all fine, but I got "No module named 'responses'" running hatch test, so had a guess and moved it up, which sorted things for me.
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.
This is in the right place (alongside pytest
- these are not dependencies of the package but of the tests. Starting from a fresh clone works for me:
rfitzjoh@wpia-dide300:~/tmp$ git clone -b mrc-6201 git@github.com:mrc-ide/hipercow-py
Cloning into 'hipercow-py'...
remote: Enumerating objects: 389, done.
remote: Counting objects: 100% (48/48), done.
remote: Compressing objects: 100% (21/21), done.
remote: Total 389 (delta 28), reused 28 (delta 23), pack-reused 341 (from 1)
Receiving objects: 100% (389/389), 66.14 KiB | 868.00 KiB/s, done.
Resolving deltas: 100% (237/237), done.
rfitzjoh@wpia-dide300:~/tmp$ cd hipercow-py/
rfitzjoh@wpia-dide300:~/tmp/hipercow-py$ hatch run test
============================= test session starts ==============================
platform linux -- Python 3.13.1, pytest-8.3.4, pluggy-1.5.0
rootdir: /home/rfitzjoh/tmp/hipercow-py
configfile: pyproject.toml
plugins: cov-6.0.0
collected 47 items
tests/dide/test_web.py ................ [ 34%]
tests/test_cli.py ...... [ 46%]
tests/test_create.py . [ 48%]
tests/test_root.py ........ [ 65%]
tests/test_task.py .......... [ 87%]
tests/test_task_eval.py ... [ 93%]
tests/test_util.py ... [100%]
============================== 47 passed in 0.21s ==============================
"se": encode64(""), # stderr | ||
"so": encode64(""), # stdout | ||
"jobs": encode64(path_call), | ||
"dep": encode64(""), # dependencies, eventually |
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.
To be clear - this is comma-separated job-ids that this new job will depend on (ie, wait to successfully finish, before starting), rather than any other sorts of dependencies...
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.
yeah - this is copied from the defaults in the R client but refers to dependencies among jobs/tasks not packages https://github.com/mrc-ide/hipercow/blob/main/drivers/windows/R/web.R#L249-L263
The testing here could be expanded but as we expect this to change soon, I think we're largely ok for now. I've run a few calls against the real server while capturing the responses for testing, and the approach is almost identical to that in the R package