-
Notifications
You must be signed in to change notification settings - Fork 41
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
Agree solution to units.yaml
problem
#403
Comments
Initial proposal:
These changes would also require us to rethink some of our validation logic, and we would need to audit for additional side-effects. |
units.yaml
problemunits.yaml
problem
One option can be to provide a command line tool which provides ability to the developers to add a new unit to IF. Proposed folder structure
Rationale behind the folder structureIt is very likely that there may not be that many units to be added for IF but this approach keeps room for future growth. CLI utilityunits-parser Arguments--name name --description "description" --unit unit --aggregation allowed_aggregates ProcessTo begin with, the existing units file config/units.yml would be stored as config/units/unit_0001.yml The developer who wants to add new unit executes a CLI command The units-parser validates the new proposed unit against the unit_0001.yml (which is copy of the current units.yml file). The changes to the existing unit_000x.yml files would follow the same rules that are applicable for approving commits/merges to the IF repo (which can also include consensus on the new units added). If a developer tries to add already existing unit, e.g. To provide flexibility to the developers, the CLI tool may contain an update command which can be used to update description and aggregation, however name and unit would not be editable as they are immutable. UpdatedFollowing up on the above example, if the request is to add same unit cpu-unit but with another name say cpuunit, the tool can apply some intelligent logic and throw a warning and suggest similar units that can be used. |
Hi @mads6879 - very interesting proposal - thank you! We're going to be looking at this issue in fine detail in this sprint (starting today) so you can expect the discussion to continue here shortly. |
Noting that there is a related discussion started by a contributor in the hackathon ideas board |
Here's our preferred approach after a dev sync:
The benefits of this approach are:
|
@mads6879 great thinking there; I think as we start exploring moving the units.yml (or whatever we end up calling it) to another repo, it would make sense to have a tool that enforces the rules you specify above, even if it was run as a linter to check that a proposed change doesn't break any of the existing parameters that all by itself would be useful in the new-repo version of the units.yml. @jmcook1186 after some thinking over this, I believe, as well as what you proposed above, we need a naming convention. I've created an issue to discuss just the naming convention also: #410 |
Story
As a developer I want to be able to create new model plugins independently without having to update the IF core. Today this is not possible for plugins that create new parameters.
Rationale
We currently use a file,
units.yml
to define expected units and parameters names (and we also use this to define the method we should use to aggregate the values in our aggregation feature). We also use this file to do some internal validation. In order to improve the DX we have to find a way to remove our reliance onunits.yml
. however,units.yml
provides improtant protection against unit errors propagating through model pipelines, and also takes away some burden from plugin developers having to handle all kinds of unit corrections.Implementation details
This issue is only intended to discuss and agree on a fix for this problem. Once a solution is properly specified we will create a new issue for the actual implementation.
Priority
5/5
Scope
this issue is not for any actual code changes
Size
3 days
What does "done" look like?
Team agree on sensible, maximally future-proof solution
Does this require updates to documentation or other materials??
not at this stage
What testing is required?
none
Is this a known/expected update?
expected since start of year, discussed at several meetings including IF weekly call and internal meetings
The text was updated successfully, but these errors were encountered: