Conversation
Signed-off-by: Adam.Dybbroe <a000680@c21856.ad.smhi.se>
Signed-off-by: Adam.Dybbroe <a000680@c21856.ad.smhi.se>
Codecov Report
@@ Coverage Diff @@
## main #22 +/- ##
==========================================
- Coverage 78.59% 76.91% -1.69%
==========================================
Files 12 19 +7
Lines 995 1373 +378
==========================================
+ Hits 782 1056 +274
- Misses 213 317 +104
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Signed-off-by: Adam.Dybbroe <a000680@c21856.ad.smhi.se>
Signed-off-by: Adam.Dybbroe <a000680@c21856.ad.smhi.se>
Signed-off-by: Adam.Dybbroe <a000680@c21856.ad.smhi.se>
Signed-off-by: Adam.Dybbroe <a000680@c21856.ad.smhi.se>
Signed-off-by: Adam.Dybbroe <a000680@c21856.ad.smhi.se>
Signed-off-by: Adam.Dybbroe <a000680@c21856.ad.smhi.se>
Signed-off-by: Adam.Dybbroe <a000680@c21856.ad.smhi.se>
Signed-off-by: Adam.Dybbroe <a000680@c21856.ad.smhi.se>
Signed-off-by: Adam.Dybbroe <a000680@c21856.ad.smhi.se>
Signed-off-by: Adam.Dybbroe <a000680@c21856.ad.smhi.se>
Signed-off-by: Adam.Dybbroe <a000680@c21856.ad.smhi.se>
# Conflicts: # cspp_runner/runner.py # cspp_runner/viirs_dr_runner.py
Signed-off-by: Adam.Dybbroe <a000680@c21856.ad.smhi.se>
gerritholl
left a comment
There was a problem hiding this comment.
Good work. I have only minor comments and some questions. Some functions can do with better docstrings.
Could you edit the PR description itself to better summarise the changes?
| # Author(s): | ||
|
|
||
| # Adam Dybbroe <Firstname.Lastname at smhi.se> |
There was a problem hiding this comment.
This is redundant, as the authors are already listed in AUTHORS.md.
| _DEFAULT_LOG_FORMAT = '[%(levelname)s: %(asctime)s : %(name)s] %(message)s' | ||
|
|
||
|
|
||
| LOG = logging.getLogger(__name__) |
There was a problem hiding this comment.
Not a constant, to logger would be a better name.
| try: | ||
| atms = AtmsSdrRunner(cmd_args.config_file) | ||
| except Exception as err: | ||
| LOG.error('ATMS RDR to SDR processing crashed: %s', str(err)) |
There was a problem hiding this comment.
| LOG.error('ATMS RDR to SDR processing crashed: %s', str(err)) | |
| LOG.exception('ATMS RDR to SDR processing crashed: %s', str(err)) |
full traceback information is useful here, otherwise one might just get ...crashed: KeyError.
| #!/usr/bin/env python | ||
| # -*- coding: utf-8 -*- | ||
|
|
There was a problem hiding this comment.
This module is only for importing, so those lines are redundant.
| # Author(s): | ||
|
|
||
| # Adam Dybbroe <Firstname.Lastname@smhi.se> | ||
|
|
There was a problem hiding this comment.
Authors are already listed in AUTHORS.md and cumbersome to maintain per module, so those lines could be removed here.
| #!/usr/bin/env python | ||
| # -*- coding: utf-8 -*- | ||
|
|
There was a problem hiding this comment.
| #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- |
Redundant lines for a module.
| # Author(s): | ||
|
|
||
| # Adam Dybbroe <Firstname.Lastname@smhi.se> | ||
|
|
There was a problem hiding this comment.
| # Author(s): | |
| # Adam Dybbroe <Firstname.Lastname@smhi.se> |
Redundant lines; authors are in AUTHORS.md.
| def test_move_files_to_destination_pathlib(fake_yamlconfig_file, fake_sdr_homedir, fake_atms_sdr_files_one_pass): | ||
| """Test move the ATMS SDR files to a destination dir.""" | ||
| config = read_config(fake_yamlconfig_file) | ||
| patterns = config['sdr_file_patterns'] | ||
|
|
||
| sdr_file_paths = glob(str(fake_atms_sdr_files_one_pass / '*h5')) | ||
| expected = [os.path.basename(f) for f in sdr_file_paths] | ||
| expected.sort() | ||
|
|
||
| filelist = move_files_to_destination(sdr_file_paths, patterns, fake_sdr_homedir) | ||
|
|
||
| assert len(filelist) == 3 | ||
| assert os.path.basename(os.path.normpath(os.path.dirname(filelist[0]))) == "noaa20_20230209_1317_27088" | ||
| bnames = [os.path.basename(f) for f in filelist] | ||
| bnames.sort() | ||
|
|
||
| assert bnames == expected |
There was a problem hiding this comment.
This function looks very similar to test_move_files_to_destination_dir_is_str. The two test functions can/should be merged into a single one that is parameterised.
| posttroll: | ||
| level: ERROR | ||
| propagate: false | ||
| handlers: [console,] |
There was a problem hiding this comment.
Does the trailing , do anything in YAML?
| author_email='adam.dybroe@smhi.se', | ||
| author='The Pytroll Team', | ||
| author_email='pytroll@googlegroups.com', | ||
| classifiers=["Development Status :: 3 - Alpha", |
There was a problem hiding this comment.
Is it still Alpha if we're using it in production?
Signed-off-by: Adam.Dybbroe <a000680@c21856.ad.smhi.se>
…nner into add-atms-runner
# Conflicts: # cspp_runner/runner.py
Signed-off-by: Adam.Dybbroe <a000680@c22526.ad.smhi.se>
pytest cspp_runnerflake8