question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

`test_perturbations.py` takes a lot of time

See original GitHub issue

While testing using pytest, the test hangs for a sufficiently long time while test_perturbations.py runs.

Running the following shows that it takes ~140s to run test_solar_pressure in test_perturbations.py which when combined with other durations, gives a significant test time as a whole.

pytest --durations=4

Output:

======================================================================== slowest 4 durations =========================================================================
143.81s call     tests/tests_twobody/test_perturbations.py::test_solar_pressure[200-deltas_expected0]
142.41s call     tests/tests_twobody/test_perturbations.py::test_solar_pressure[400-deltas_expected1]
138.72s call     tests/tests_twobody/test_perturbations.py::test_solar_pressure[600-deltas_expected2]
59.31s call     tests/tests_twobody/test_perturbations.py::test_3rd_body_Curtis[test_params2]

Specifically, the problem seems to be in the test_solar_pressure function. This particularly stood out to me since other tests take much less time.

Thanks!

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:14 (12 by maintainers)

github_iconTop GitHub Comments

4reactions
astrojuanlucommented, Jan 18, 2021

And yes, unfortunately these tests take a lot of time because we validate against long propagations found in the literature. They are sort of “integration tests” and there’s not much we can do about them, except perhaps give them another pass and see if we can rewrite absolutely everything in numba.

1reaction
astrojuanlucommented, Jun 12, 2021

Partially addressed in #1250 (thanks @jtegedor!), however there is still more work to do. In particular, one of the functions was jitted in object mode because otherwise numba would give a weird error. We need to investigate more.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to speed up pytest - python - Stack Overflow
It seems to spend a lot of time collecting tests, even if I specify which files to execute on the command line. I...
Read more >
Frequency Response Testing in Nuclear Reactors
Typical rod motions are fiin. per step and the minimum time between steps is ... However, because of the small displacement per step,...
Read more >
Scientific and Technical Aerospace Reports
Analysis of astronomical spectra requires accurate atomic data , and in ... space - time , as well as ' test ' perturbations...
Read more >
Bioinformatics in Microbiota - Page 241 - Google Books Result
(H) Evaluation of the similarity between the observed and predicted time series ... This option can be used to test perturbations in the...
Read more >
Rounds of the Teaching Staff
However , serum samples for insulin must be kept frozen from the time of ... PRA requires very special attention to prevent renin...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found