-
Notifications
You must be signed in to change notification settings - Fork 83
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Jan Forster
committed
Dec 28, 2023
1 parent
f4f1e6e
commit 3b78f86
Showing
23 changed files
with
1,502 additions
and
105 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
IS_DEBUG = False | ||
API_KEY = sample_api_key | ||
DEFAULT_MODEL_PATH=./sample_model/lin_reg_california_housing_model.joblib | ||
IS_DEBUG=False | ||
API_KEY=sample_api_key | ||
DEFAULT_MODEL_PATH=./sample_model/lin_reg_california_housing_model.joblib |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,122 @@ | ||
[flake8] | ||
|
||
################### PROGRAM ################################ | ||
|
||
# Specify the number of subprocesses that Flake8 will use to run checks in parallel. | ||
jobs = auto | ||
|
||
|
||
################### OUTPUT ################################# | ||
|
||
########## Verbosity ########## | ||
|
||
# Increase the verbosity of Flake8’s output. | ||
verbose = 0 | ||
# Decrease the verbosity of Flake8’s output. | ||
quiet = 0 | ||
|
||
|
||
########## Formatting ########## | ||
|
||
# Select the formatter used to display errors to the user. | ||
format = default | ||
|
||
# Print the total number of errors. | ||
count = True | ||
# Print the source code generating the error/warning in question. | ||
show-source = True | ||
# Count the number of occurrences of each error/warning code and print a report. | ||
statistics = True | ||
|
||
|
||
########## Targets ########## | ||
|
||
# Redirect all output to the specified file. | ||
output-file = .flake8.log | ||
# Also print output to stdout if output-file has been configured. | ||
tee = True | ||
|
||
|
||
################### FILE PATTERNS ########################## | ||
|
||
# Provide a comma-separated list of glob patterns to exclude from checks. | ||
exclude = | ||
# git folder | ||
.git, | ||
# python cache | ||
__pycache__, | ||
# pytest cache | ||
.pytest_cache, | ||
# mypy cache | ||
.mypy_cache | ||
# Provide a comma-separate list of glob patterns to include for checks. | ||
filename = | ||
*.py | ||
|
||
|
||
################### LINTING ################################ | ||
|
||
########## Environment ########## | ||
|
||
# Provide a custom list of builtin functions, objects, names, etc. | ||
builtins = | ||
|
||
|
||
########## Options ########## | ||
|
||
# Report all errors, even if it is on the same line as a `# NOQA` comment. | ||
disable-noqa = False | ||
|
||
# Set the maximum length that any line (with some exceptions) may be. | ||
max-line-length = 88 | ||
# Set the maximum allowed McCabe complexity value for a block of code. | ||
max-complexity = 10 | ||
# Toggle whether pycodestyle should enforce matching the indentation of the opening bracket’s line. | ||
# incluences E131 and E133 | ||
hang-closing = True | ||
|
||
|
||
########## Rules ########## | ||
|
||
# ERROR CODES | ||
# | ||
# E/W - PEP8 errors/warnings (pycodestyle) | ||
# F - linting errors (pyflakes) | ||
# C - McCabe complexity error (mccabe) | ||
# | ||
# E133 - closing bracket is missing indentation (conflicts with black) | ||
# E203 - whitespace before ‘:’ (conflicts with black) | ||
# W503 - line break before binary operator | ||
# F401 - module imported but unused | ||
# F403 - ‘from module import *’ used; unable to detect undefined names | ||
# | ||
|
||
# Specify a list of codes to ignore. | ||
ignore = | ||
E133, | ||
E203, | ||
W503 | ||
# Specify the list of error codes you wish Flake8 to report. | ||
select = | ||
E, | ||
W, | ||
F, | ||
C | ||
# Specify a list of mappings of files and the codes that should be ignored for the entirety of the | ||
# file. | ||
per-file-ignores = | ||
__init__.py:F401,F403 | ||
|
||
# Enable off-by-default extensions. | ||
enable-extensions = | ||
|
||
|
||
########## Docstring ########## | ||
|
||
# Enable PyFlakes syntax checking of doctests in docstrings. | ||
# doctests = True | ||
|
||
# Specify which files are checked by PyFlakes for doctest syntax. | ||
include-in-doctest = | ||
# Specify which files are not to be checked by PyFlakes for doctest syntax. | ||
exclude-in-doctest = |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
|
||
from fastapi import APIRouter | ||
|
||
from fastapi_skeleton.models.heartbeat import HearbeatResult | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,7 @@ | ||
|
||
|
||
from fastapi import APIRouter | ||
|
||
from fastapi_skeleton.api.routes import heartbeat, prediction | ||
|
||
api_router = APIRouter() | ||
api_router.include_router(heartbeat.router, tags=["health"], prefix="/health") | ||
api_router.include_router(prediction.router, tags=[ | ||
"prediction"], prefix="/model") | ||
api_router.include_router(prediction.router, tags=["prediction"], prefix="/model") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
|
||
|
||
from starlette.config import Config | ||
from starlette.datastructures import Secret | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
|
||
|
||
import secrets | ||
from typing import Optional | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
|
||
|
||
from pydantic import BaseModel | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
|
||
|
||
from pydantic import BaseModel | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.