New recipe format called flexformat + more tests #266
New recipe format called flexformat + more tests #266
Conversation
Note: The CouchDB setup on the PFC needs to allow for the recipes database to have a phases field instead of operations (or we could update the new format to use operations instead of phases).
|
Some suggestions:
|
@rbaynes I merged your changes from PR267 this PR. I agree a different name would be better. I started with "phased_dense" as it is a phased recipe that can contain a dense amount of information. I'd be glad to change it to anything else though. Unfortunately, I used the name quite a few places so I'll need to go back through to update the name to something else. |
@rbaynes It looks like it would take the cloud team about a day to change from phases to operations, so I'll look into updating the couchdb to handle both for now or remove the restriction. |
@rbaynes I updated the recipe name to "flexformat" to create a bigger difference from the prior recipe formats. Rather than changing "phases" to "operations" I'd like to remove the "operations" requirement check from the couchdb doc database. This is a simple one line change. See openag_python PR#41 |
This should be ready to be merged into master. Let me know if you see anything else. Thanks! |
Addresses Issue #194 |
Love the "flexformat" 💪 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @gordonbrander !
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good 💪
Is there a reason there are variable units in the recipe? We already have that information in the var_types param server which will allow us to maintain a single reference point to what we mean when we say "light_illuminance" or whatnot. We have a problem where we declare the same thing in multiple places and they all need to sync up. |
This new recipe format allows for any complexity that the simple recipe format can provide, but with the smaller file size of phased recipes.
Recipe Format structure:
phase:
step: {
variable: [start_time, end_time, value]
}
The phases can be repeated as many times as needed as well as the steps. Each step is ideally a 24 hour period.
See
openag_brain/data/mock_recipes
for an exampleThis new format is compatible with the cloud software.