pytroll / pytroll-pps-runner

Pytroll runner for PPS
GNU General Public License v3.0
1 stars 8 forks source link

Add level1c runner #28

Closed adybbroe closed 3 years ago

adybbroe commented 3 years ago

This PR adds another runner to generate the level-1c file input which is needed by the NWCSF/PPS. From version 2021 and onwards the PPS package will require a standard (PPS) netCDF/CF level-1c format as input. This level-1c formatting is done with Satpy via the level1c4pps package (not Pytroll).

ghost commented 3 years ago

Congratulations :tada:. DeepCode analyzed your code in 3.702 seconds and we found no issues. Enjoy a moment of no bugs :sunny:.

👉 View analysis in DeepCode’s Dashboard | Configure the bot

👉 The DeepCode service and API will be deprecated in August, 2021. Here is the information how to migrate. Thank you for using DeepCode 🙏 ❤️ !

If you are using our plugins, you might be interested in their successors: Snyk's JetBrains plugin and Snyk's VS Code plugin.

codecov[bot] commented 3 years ago

Codecov Report

Merging #28 (ea993fa) into main (b917f0a) will increase coverage by 16.95%. The diff coverage is 78.85%.

Impacted file tree graph

@@             Coverage Diff             @@
##             main      #28       +/-   ##
===========================================
+ Coverage   32.01%   48.96%   +16.95%     
===========================================
  Files          11       14        +3     
  Lines        1690     1640       -50     
  Branches      221      216        -5     
===========================================
+ Hits          541      803      +262     
+ Misses       1143      825      -318     
- Partials        6       12        +6     
Flag Coverage Δ
unittests 48.96% <78.85%> (+16.95%) :arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
nwcsafpps_runner/logger.py 0.00% <0.00%> (ø)
nwcsafpps_runner/pps_posttroll_hook.py 77.24% <ø> (-0.47%) :arrow_down:
nwcsafpps_runner/config.py 20.22% <56.25%> (+20.22%) :arrow_up:
nwcsafpps_runner/l1c_processing.py 65.04% <65.04%> (ø)
nwcsafpps_runner/message_utils.py 77.41% <77.41%> (ø)
nwcsafpps_runner/tests/test_level1c_runner.py 99.27% <99.27%> (ø)
nwcsafpps_runner/tests/test_config.py 100.00% <100.00%> (ø)
nwcsafpps_runner/tests/test_pps_hook.py 100.00% <100.00%> (ø)
nwcsafpps_runner/utils.py 26.61% <100.00%> (+0.22%) :arrow_up:
... and 9 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update b917f0a...ea993fa. Read the comment docs.

adybbroe commented 3 years ago

@mraspaud PR is improved I think. Good enough?

mraspaud commented 3 years ago

I would just like to have the stopping mechanism before merging this if possible.

adybbroe commented 3 years ago

I would just like to have the stopping mechanism before merging this if possible.

@mraspaud I made an attempt, without re-factoring too much. Not so very comfortable with these kind of mechanisms. Was it something like this you had in mind?

mraspaud commented 3 years ago

Sorry I didn't have time to review this PR this afternoon. Just a note regarding the loop variable. The way you implemented it, you don't need to make it global, it's enough that it is defined in the context of the outer function.