-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #21 from KiraPC/master
Dev alignment
- Loading branch information
Showing
22 changed files
with
272 additions
and
144 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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
[flake8] | ||
max-line-length = 88 | ||
max-complexity = 10 | ||
exclude = | ||
.git, | ||
__pycache__, | ||
docs/source/conf.py, | ||
old, | ||
build, | ||
dist | ||
src/gunicorn_conf.py | ||
src/catalog/migration.py |
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,6 +1,6 @@ | ||
name: Run Tests | ||
|
||
on: [push, pull_request] | ||
on: [ pull_request ] | ||
|
||
jobs: | ||
build: | ||
|
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,20 @@ | ||
name: Lint | ||
on: [ pull_request ] | ||
|
||
jobs: | ||
lint: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: [ 3.9 ] | ||
os: [ ubuntu-18.04 ] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: flake8 install | ||
run: pip3 install flake8 | ||
- name: lint | ||
run: flake8 fastapi_router_controller/ |
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,12 @@ | ||
repos: | ||
- repo: https://github.com/psf/black | ||
rev: 21.5b1 | ||
hooks: | ||
- id: black | ||
args: [ | ||
"fastapi_router_controller" | ||
] | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v2.0.0 | ||
hooks: | ||
- id: flake8 |
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,13 +1,13 @@ | ||
from fastapi import FastAPI | ||
from fastapi.testclient import TestClient | ||
from fastapi_router_controller import ControllersTags | ||
from controller.sample_controller import SampleController | ||
from controller.sample_controller_2 import AnotherSampleController | ||
|
||
app = FastAPI( | ||
title='A sample application using fastapi_router_controller', | ||
title="A sample application using fastapi_router_controller", | ||
version="0.1.0", | ||
openapi_tags=ControllersTags) | ||
openapi_tags=ControllersTags, | ||
) | ||
|
||
app.include_router(SampleController.router()) | ||
app.include_router(AnotherSampleController.router()) |
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
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
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.