anjishnu / ask-alexa-pykit

A minimalist SDK for developing skills for the Amazon Echo's ASK - Alexa Skills Kit using Amazon Web Services's Python Lambda Functions. Currently supported profiles are for Linux servers and AWS Lambda. Check the appropriate release branch. The cherrypy release branches have added components for request validation.
MIT License
275 stars 58 forks source link

Handling metadata #6

Closed JoeGermuska closed 8 years ago

JoeGermuska commented 8 years ago

This looks like an inadvertent inconsistency:

When a request is initialized, it is given a metadata property initialized to {}

But when route_request is called, the metadata passed in is assigned to request.meta_data (note the underscore)

Maybe it would be more clear to pass the metadata into the Request constructor anyway, if it's meant to always be there?

anjishnu commented 8 years ago

That definitely sounds like a better approach - please submit a PR if you have time otherwise I will try to improve the handling before the next formal version release.

JoeGermuska commented 8 years ago

I'm happy to submit a pull request. I'm not sure if I'm totally clear on the rationale for the diverse branches. In the code I've been developing, I was working off of python_lambda_0.4_release which seems to have diverged from master in some significant ways.

anjishnu commented 8 years ago

The release branches are supposed to be stable and tested, and not being actively developed apart from important bug fixes. I usually do some E2E testing before releasing one, but that needs to be taken with a grain of salt since there are no actual unit tests. I usually develop on the master - Ideally I should be working on a development branch but since it's only been me up till now I didn't really think much about it. Ideally you should branch off master and commit back to it, and it will be in the next release.