MetOffice / MetOffice/CDDS

Minor bug in `prepare_generate_variable_list` logger output

Open
#834 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Python
Stars
8
Forks
7
Avg merge
1d 15h
Merged PRs (30d)
23

Description

I left a double space in the `streams` section of my cdds_convert request file by mistake e.g.
`streams = ap5 ap4` when it should have been `streams = ap5 ap4`

This resulted in this being output by the logger:
```
Stream "" found in request streams but not in variables list file: {'ap5', 'ap4'}
Issues found but continuing, a non zero exit code will be returned
```

If there are no extra spaces between specified streams in the request this no longer appears.

Very minor bug that doesn't cause any issues but might confuse someone. Would be good to fix.

Tip: The problem might be in this function: https://github.com/MetOffice/CDDS/blob/59224df35cddc943456976b1c1f1491c466621ae/cdds/cdds/prepare/generate.py#L174

Perhaps a step to clean the requested_streams of any whitespace before the rest of the function?

Contributor guide

No contributing guide indexed for this repository

Research direction

Start in cdds/cdds/prepare/generate.py at prepare_generate_variable_list, using the linked location and the request example to reproduce the logger output. Done means extra whitespace in the streams request no longer produces an empty stream warning while the valid stream names remain in the variables list check.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.