-
Notifications
You must be signed in to change notification settings - Fork 69
Blueprint interfaces implementation #116
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
Conversation
Codecov Report
@@ Coverage Diff @@
## dev #116 +/- ##
==========================================
+ Coverage 89.23% 89.35% +0.11%
==========================================
Files 51 51
Lines 2946 2959 +13
Branches 393 396 +3
==========================================
+ Hits 2629 2644 +15
Misses 241 241
+ Partials 76 74 -2
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
cbe7213
to
39264f7
Compare
…-library into wangbill/blueprint
|
||
:return: Decorator function. | ||
def register_functions(self, function_container: DecoratorApi) -> None: |
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.
@YunchuWang - As this is only used for registering blueprints, should be call is register_blueprint
? or you are using this to register for other other generic cases? We can use pointers to functions and use specific handlers for such cases.
Define a generic _register_functions
def _register_functions(...):
...
and then
register_blueprint=_register_functions
register_wsgiapp=_register_functions
...
such that it is easier to understand what the method would actually be used for.
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.
it can be used to register custom defined classes extending triggerapi or bindingapi or both. i am thinking aliasing a register_blueprint and keeping register_functions public to register any other types of custom defined function container classes?
**kwargs | ||
) -> Callable: | ||
|
||
class FunctionRegister(DecoratorApi, HttpFunctionsAuthLevelMixin, ABC): |
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.
So - this would be used by the Worker now?
/cc @gavin-aguiar
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.
yes, need to make change on worker to index FunctionRegister instead of functionapp
respond to an event sent to an event grid topic. | ||
All optional fields will be given default value by function host when | ||
they are parsed by function host. | ||
super().__init__(auth_level=http_auth_level) |
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.
we have to think for the future - if auth_level is set and no HTTP function is registered - we should give some sort of a warning - just in case. Not for this PR.
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.
will add a task for this
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.
LGTM
Introducing blueprint concepts to new programming model (referenced to flask blueprint)
The benefits of blueprint is:
New public classes blueprint exposes: