-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create base class that Proj
, Model
, and Run
all inherit from
#34
Comments
This sounds like a solid strategy for how to consolidate code for like functionality in With regard to |
Sure. I mean that we should support mappings of variables to the external data at the level of a Now that I've written that out, I'm convinced that this type of functionality should be separate from what |
Cool, that makes sense. I hadn't thought about exceptions to implicit file mappings. I agree about keeping this outside the current |
We could do that as well, but I think it still would be good to have a data-container style of object (i.e. the envisioned Not a high priority though...in fact none of this refactor is for me until at least mid-January. I create these issues as things come to mind, since its the most sensible place for them, but I realistically won't be able to do much substantive on these (beyond what naturally arises from my work) for the next couple of months. |
C.f. discussion in #156, considering adding a This would be in addition to, not in place of, the core object that all inherit from under discussion here. |
The data structures
Proj
,Model
, andRun
don't obey an "is-a" conceptual relationship relative to one another (a model is not a type of project, and a run is not a type of model), and thus shouldn't inherit from each other. It's more of a "has-a" relationship: a project has one or more model; a model has one or more runs).Nevertheless, each of them can be conceptualized as being a particular kind of container of data describing climate model/obs data saved somewhere on disk. So there should be a parent class, something like
InputDataSpecs
, that they each inherit from. Since we are wanting all specifications about the data to be made at any of the levels, c.f. #28 #27 and #26, this could be implemented all within this parent class, with any level-specific variations being done through overriding/adding methods within that particular child level. This may ultimately render theProj
, etc. classes with very little unique to them, but they should still be retained to facilitate easy organization/calculation specifications.Var
is a little trickier, because in addition to specifying where the data can be found (although its not really used in this way in my workflow at least), it also specifies physical aspects of the quantity being represented. So this requires more thinking -- one option would be to have two classes, one for each of these functions, with the former also inheriting from this parent class.The text was updated successfully, but these errors were encountered: