Skip to content
This repository has been archived by the owner on Jan 5, 2019. It is now read-only.

New recipe format called flexformat + more tests #266

Merged

Conversation

rwdavis513
Copy link
Contributor

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 example

This new format is compatible with the cloud software.

@rwdavis513
Copy link
Contributor Author

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).

couchdb.http.ServerError: (403, (u'forbidden', u'Recipe instances are required to have a operations field'))

@rbaynes
Copy link
Contributor

rbaynes commented Jun 2, 2017

Some suggestions:

  1. If we use "operations" instead of "phases" in the JSON of a recipe, we avoid the DB change.
  2. There are existing recipes and users currently using a recipe with the format name of "phased". I think we should pick a new name for this new format to avoid confusion. Perhaps call this new format "detailed" or anything you like.
  3. Thanks for breaking things up into their own files.
  4. I intended TRACE/trace() to be per node, but rospy.logdebug() does that already, so it will work.
  5. After reviewing my changes to the tests (PR 267) and merging to master, can we merge those changes into this branch?

@rwdavis513
Copy link
Contributor Author

@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.

@rwdavis513
Copy link
Contributor Author

@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.

@rwdavis513
Copy link
Contributor Author

@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

@rwdavis513
Copy link
Contributor Author

This should be ready to be merged into master. Let me know if you see anything else. Thanks!

@rwdavis513 rwdavis513 changed the title New recipe format called phased dense New recipe format called flexformat + more tests Jun 6, 2017
@rwdavis513
Copy link
Contributor Author

Addresses Issue #194

@rbaynes
Copy link
Contributor

rbaynes commented Jun 7, 2017

Love the "flexformat" 💪

Copy link
Contributor

@rbaynes rbaynes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @gordonbrander !

Copy link
Contributor

@rbaynes rbaynes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good 💪

@rbaynes rbaynes merged commit e93452d into OpenAgricultureFoundation:master Jun 7, 2017
@sp4ghet
Copy link
Collaborator

sp4ghet commented Jun 7, 2017

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants