-
Notifications
You must be signed in to change notification settings - Fork 7
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
added time range splitting and process status management #41
Conversation
Codecov Report
@@ Coverage Diff @@
## main #41 +/- ##
==========================================
- Coverage 87.23% 85.92% -1.32%
==========================================
Files 31 31
Lines 1489 1520 +31
Branches 252 258 +6
==========================================
+ Hits 1299 1306 +7
- Misses 127 151 +24
Partials 63 63
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
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 left few comments in the code. I'm still not 100% sure I want to follow this option.
My main concern is about using a fixed threshold that might really impact DL performances of slow products. For examples trajectories that are sampled each minute could be downloaded for 1 year in one go would be split in 365 requests. And we would pay 365 times the requests latency (IIRC generating requests has side effects on AMDA about TMP folder, is this still true @brenard-irap?).
This PR should have at least one test.
A simple rule could be defined to automatically adapt the threshold in relation with the min sampling of the parameter.
I don't see any problem in my side. The same session will be used for all "splitted request", and the result will have almost the same size in our TMP folder even it's split into several files. |
I prefer something like this, then I don't think we need anymore to let the user change it. We now have to define a good threshold.
Ok, I didn't remember if there was something bound to requests count. |
This pull request introduces 1 alert when merging 03bde87 into 6282950 - view on LGTM.com new alerts:
|
This pull request introduces 1 alert when merging 7490295 into 6282950 - view on LGTM.com new alerts:
|
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 better to me, can you add a test that validates the case when the request is too long?
How do you propose to implement the test. speasy does not check if the request is too long, it will just split the requests if the time range exceeds 1 day. I don't like the idea of having a test that tries to download more than a day's worth of data from AMDA. |
I think we don't have the choice, if this is implemented, this has to be tested. If this is something users might do then the CI has also to reproduce this behavior, I don't see any other way to ensure this code path works and will work in the future (we might brake it changing something else for example). |
Alright, in that case I would propose to modify the test
On another note : the instructions in the documentation for running a single test suite doesn't seem to work : running
|
This test focuses on AMDA parameter properties, so the best is to add a test here https://github.com/SciQLop/speasy/blob/main/tests/test_amda.py#L53-L71 as we already test few requests, you can name it test_long_request. The benefit also to make a dedicated test is to be able to tag it and skip it in some configs on CI if we have some issues.
Exact it's inherited from https://github.com/audreyfeldroy/cookiecutter-pypackage/blob/master/%7B%7Bcookiecutter.project_slug%7D%7D/CONTRIBUTING.rst#tips :/ I'll update this, the syntax is |
This pull request introduces 1 alert when merging d6ac8aa into 651b52a - view on LGTM.com new alerts:
|
Signed-off-by: Alexis Jeandet <alexis.jeandet@member.fsf.org>
Signed-off-by: Alexis Jeandet <alexis.jeandet@member.fsf.org>
59d400d
to
7390321
Compare
Added process status management for AMDA requests
Split time range by days.