-
Notifications
You must be signed in to change notification settings - Fork 4
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
Fastapi #40
base: master
Are you sure you want to change the base?
Conversation
@@ -0,0 +1,46 @@ | |||
import os |
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.
This entire file can and should be shared across model
, app
and 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.
making 2 docker images to share a common parent utils folder is a bit hard to setup.
as an easier workaround, I simply created a common.py
to contain common util function, and then duplicate common.py
into app/src
and api/src
@@ -0,0 +1,11 @@ | |||
REQUEST_URL = 'http://127.0.0.1' |
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.
Please adapt this to the configuration style we've adopted in model
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.
this config.py
is only used in pytest for testing.
it will not be used in production
|
||
SUCCESS_CODE = 200 | ||
|
||
IMAGE_PATH = '../app/demo/demo_img1.jpg' |
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.
This does not belong in api's config.
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.
same above
this config.py
is only used in pytest for testing.
Changes
app
) and fastAPI (api
) codebase