-
Notifications
You must be signed in to change notification settings - Fork 112
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
Refactor response classes #2113
Conversation
…ore/refactor-fast-api
…ore/refactor-fast-api
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.
Hi, I had a think through this and came up with a few changes. Please let me know if it makes sense to you and happy to get on a call to discuss further.
-
save_responses.py file contains all the save_api and write_api functions. It's purpose it to handle saving API responses to FS.
-
utils. py file contains all encoding related functions classes + utility funcs (get_kedro_project_json)
-
node.py contains all response class for NodeAPI, and NodeMetadataAPI + get_node_metadata_response_function
-
pipeline.py contains all response classes for GraphAPI, NamedEntity, ModularPipelineResponses, and get_selected_pipeline_response, get_default_response function
-
metadata.py contains the same as you suggested.
-
base.py contains the BaseAPIResponse and APIErrorMesage response.
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!! :) thank you this is a big refactor. @ravi-kumar-pilla
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.
Hey @ravi-kumar-pilla , thanks for this PR the refactoring looks good to me, I like the way you've split the files! I've left some minor comments!
Are we going with
|
Hi @jitu5 , yes it will be in pipelines.py as it is now |
Description
Partially resolves #2061
Development notes
responses.py
file and group the response classes underresponses
folder which helps in scaling and maintaining the responses code baseNetworkX
, deployer factory imports until useduvicorn.run
taking time is app building which involves importing all kedro project modules (example - for demo project, sklearn, matplotlib etc take time as shown below).Next steps:
QA notes
kedro viz build
,kedro viz deploy
are intactget_kedro_project_json_data
in responses file which is moved topipelines.py
file. I would request you to have a look at thisChecklist
RELEASE.md
file