ImperialCollegeLondon / ImperialCollegeLondon/virtual_ecosystem

Clarify roles and structure of Grid, Core and Data objects and use in models and axis validation.

Open
#208 5 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
20
Forks
5
Avg merge
2d 1h
Merged PRs (30d)
34

Description

**Is your feature request related to a problem? Please describe.**

The current implementation of the core axis and axis validation passes in the `Grid` object and then `kwargs`. This was only ever really a placeholder for giving the axis validation setup access to more information from the configuration object to the axis definitions. More broadly, the Grid object is rather arbitrarily stuffed into Data and is passed around hidden in that.

The aim of this PR is therefore have consistent use of the three high level objects (`Data`, `Config`, `Grid`) in signatures. The Axis validators can then accept (`Config`, `Grid`) arguments and models can expect to use (`Data`, `Config`, `Grid`). We _could_ shove `Grid` into `Config` - it is a much more logical home than `Data` - but from a quick chat we think having three objects with clear roles is easier to understand.

**Describe the solution you'd like**

We want the whole of the configuration and the grid to be passed in to axis validators. That _should_ give access to all of the information required to configure the model and hence everything that an axis validator could want. We also need to update model code to accept `Data`, `Config` and `Grid` objects.

Contributor guide

Open the contributing guide

Research direction

Start by tracing the axis validation code and model signatures to map where Data, Config, Grid, and kwargs are currently passed. The work is done when axis validators consistently receive Config and Grid, and models consistently use Data, Config, and Grid with clear roles.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend-api-design
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.