MetOffice / MetOffice/CMEW

Investigate alternatives to `scrape_ini.py`

Open
#516 0 comments 0 reactions 1 assignee Claimed by @ehogan View on GitHub
Dominant language
Python
Stars
5
Forks
3
Avg merge
5d 6h
Merged PRs (30d)
8

Description

The `scrape_ini.py` module was added to CMEW via #432. It is stored in the `lib/python/` directory so that it can be imported by the `flow.cylc` file, as described by [Cylc documentation: Importing Python modules](https://cylc.github.io/cylc-doc/stable/html/user-guide/writing-workflows/jinja2.html#jinja2-importing-python-modules).

This is needed, since `scrape_ini.py` determines the value of `datasets`, which is the list of datasets used by the parameterisation.

Unfortunately, this makes it difficult to move this code into the `cmewpy` package (#511), since the code is required during the processing of the `flow.cylc` file, which happens before any tasks (e.g. install tasks) are run.

It may be possible to use Python code directly within the `flow.cylc` file.

Alternatively, we may need to keep a tiny bit of code in the `lib/python/` directory explicitly for this purpose.

There are probably other options.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.