-
Notifications
You must be signed in to change notification settings - Fork 1
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
Design and consider porting from hydrus #1
Comments
Hey, @Mec-iS @xadahiya @chrizandr I have started working on it but I have a couple of questions. 1> How should we replace the application context code of Flask that we have in utils.py and have set_session, set_server_name etc methods? Right now I am using Falcon middleware to replace it. Using Falcon middleware in replacement of Flask app context is the right thing to do? I do not know any other options. The following gist shows the code. Right now it only works for the entry point. https://gist.github.com/vddesai1998/2037ea34f76d2103616447e8034da673 2> Right now we are creating the scoped session in main.py and using it everywhere.Instead, we should instantiate a session at the start of the request and remove it when the request ends.
|
@vddesai1998 |
@Mec-iS To encapsulate request context I tried few things and settled with these solutions.Both are working.
Also as you can see I have replaced getattr() function calls with try - except block as mentioned here |
try to use The challenge is to create the classes starting from an Hydra ApiDoc document. You can work on whatever you want, consider writing a proposal that includes this task, beside other related ones as defined in https://hydra-gsoc.appspot.com/#ideas |
Can you elaborate please? |
Hydrus reads from the HYDRA ApiDocumentation file written in JSON-LD to set up and deploy the server so that the server publishes the endpoints specified in the ApiDoc. In the same way the Falcon version should parse the ApiDoc (you can reuse the functions written for Flask) to create Falcon API classes. |
In Falcon every endpoint is a Resource that inherits form
Api
, all the endpoints and methods have to be created dynamically by parsing the HYDRA ApiDoc as happens inhydrus
. A lot of code can be ported to Falconon_*
methods, trying to preservehydrus
functional style.The Application should contain a design document and detail how the student wants to make the porting possible.
The text was updated successfully, but these errors were encountered: