MetOffice / MetOffice/CMEW

Use a regular expression to extract the streams from variables files.

Open Beginner friendly
#545 0 comments 0 reactions 0 assignees View on GitHub
technical debt technical discussion
Dominant language
Python
Stars
5
Forks
3
Avg merge
5d 6h
Merged PRs (30d)
8

Description

`CMEW/app/configure_standardise/bin/create_request_file.py` the stream is currently extracted with

```
# Get the whole stream including substream
whole_stream = line.strip().split(":")[-1]

# But don't list the substream
stream = whole_stream.split("/")[0]
```

but this could be done more efficiently with a regular expression.

Contributor guide

Open the contributing guide

Research direction

Read CMEW/app/configure_standardise/bin/create_request_file.py and inspect the current stream extraction around the shown code. Replace the split-based extraction with a regular-expression approach while preserving the existing behavior of keeping the main stream and excluding its substream. Verify the script still produces the expected request-file stream values.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
tooling
Issue type
Refactor
Difficulty
1/5
Estimated time
Under an hour
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
78/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.