Reader
Reader
¶
Bases: ABC
Base class for all readers.
checks()
¶
Optional pre‐flight checks (e.g. dependencies). Override if needed.
extract(prj, ens_id, run_id, ctx)
¶
Extract and parse all possible information given the context. This method is responsible for calling all other methods.
| PARAMETER | DESCRIPTION |
|---|---|
|
Destination project to put extracted information.
TYPE:
|
|
ID to store any ensemble data under.
TYPE:
|
|
Information needed for the reader.
|
| RETURNS | DESCRIPTION |
|---|---|
Project
|
Project after extracting all information. |
prepare(*args, **kwargs)
¶
Load files, open handles, build FSM state, etc. Return a dict representing the full parsing context.
run(prj, ens_id, run_id, reader_args=None, reader_kwargs=None)
¶
Read and extract data from start to finish for a single ensemble.
| PARAMETER | DESCRIPTION |
|---|---|
|
Project to store all extracted data to.
TYPE:
|
|
ID of this ensemble. This function will create the ensemble
if it does not exist in
TYPE:
|
|
Arguments for preparing the context needed for the reader.
TYPE:
|
|
Keyword arguments for preparing the context needed for the reader.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
Project
|
Project after extracting data. |