nasa / dorado-scheduling

Dorado observation planning and scheduling simulations
Other
22 stars 8 forks source link

Fix nested multiprocessing on import #92

Closed lpsinger closed 5 months ago

lpsinger commented 5 months ago

The dorado-scheduling script raised a RuntimeError error because the dorado.scheduling.mission module called astropy.utils.download_files_in_parallel on import.

The error message was:

        An attempt has been made to start a new process before the
        current process has finished its bootstrapping phase.

Fix this by moving the call to download_files_in_parallel inside a function that is not called on import.

Fixes #89.

codecov[bot] commented 5 months ago

Codecov Report

Attention: Patch coverage is 25.00000% with 9 lines in your changes are missing coverage. Please review.

Project coverage is 28.78%. Comparing base (2cec69d) to head (469c394).

Files Patch % Lines
dorado/scheduling/mission.py 50.00% 3 Missing :warning:
dorado/scheduling/scripts/animate.py 0.00% 1 Missing :warning:
dorado/scheduling/scripts/animate_survey.py 0.00% 1 Missing :warning:
dorado/scheduling/scripts/main.py 0.00% 1 Missing :warning:
dorado/scheduling/scripts/metrics.py 0.00% 1 Missing :warning:
dorado/scheduling/scripts/simsurvey.py 0.00% 1 Missing :warning:
dorado/scheduling/scripts/survey_slicer.py 0.00% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #92 +/- ## ========================================== - Coverage 29.71% 28.78% -0.94% ========================================== Files 38 38 Lines 1817 1817 ========================================== - Hits 540 523 -17 - Misses 1277 1294 +17 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.