Skip to content

Commit

Permalink
Merge branch 'main' into kb/secrets-in-docker
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinJBoyer committed Jun 28, 2024
2 parents 937a6a7 + 39affbf commit a145f07
Show file tree
Hide file tree
Showing 10 changed files with 1,092 additions and 1,040 deletions.
11 changes: 4 additions & 7 deletions app/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,14 @@ DECODE_LOG := 2>&1 | python3 -u src/logging/util/decodelog.py
SHELL = /bin/bash -o pipefail

# The APP_DIR variable is the path from the root of the repository to this Makefile.
# This variable is used to display errors from Flake8 and MyPy in the 'Files Changed'
# This variable is used to display errors from MyPy in the 'Files Changed'
# section of a pull request. If this is set to the incorrect value, you won't be able
# to see the errors on the correct files in that section
APP_DIR := app
ifdef CI
DOCKER_EXEC_ARGS := -T -e CI -e PYTEST_ADDOPTS="--color=yes"
FLAKE8_FORMAT := '::warning file=$(APP_DIR)/%(path)s,line=%(row)d,col=%(col)d::%(path)s:%(row)d:%(col)d: %(code)s %(text)s'
MYPY_FLAGS := --no-pretty
MYPY_POSTPROC := | perl -pe "s/^(.+):(\d+):(\d+): error: (.*)/::warning file=$(APP_DIR)\/\1,line=\2,col=\3::\4/"
else
FLAKE8_FORMAT := default
endif

# By default, all python/poetry commands will run inside of the docker container
Expand Down Expand Up @@ -199,10 +196,10 @@ format-check: ## Check file formatting

lint: lint-py ## Lint

lint-py: lint-flake lint-mypy
lint-py: lint-ruff lint-mypy

lint-flake:
$(PY_RUN_CMD) flake8 --format=$(FLAKE8_FORMAT) src tests
lint-ruff:
$(PY_RUN_CMD) ruff check src tests

lint-mypy:
$(PY_RUN_CMD) mypy --show-error-codes $(MYPY_FLAGS) src $(MYPY_POSTPROC)
Expand Down
230 changes: 220 additions & 10 deletions app/openapi.generated.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,28 @@ paths:
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPError'
type: object
properties:
message:
type: string
description: The message to return
data:
$ref: '#/components/schemas/HTTPError'
status_code:
type: integer
description: The HTTP status code
warnings:
type: array
items:
$ref: '#/components/schemas/ValidationError'
errors:
type: array
items:
$ref: '#/components/schemas/ValidationError'
pagination_info:
description: The pagination information for paginated endpoints
allOf:
- $ref: '#/components/schemas/PaginationInfo'
description: Service Unavailable
tags:
- Health
Expand Down Expand Up @@ -85,13 +106,55 @@ paths:
content:
application/json:
schema:
$ref: '#/components/schemas/ValidationError'
type: object
properties:
message:
type: string
description: The message to return
data:
$ref: '#/components/schemas/ValidationError'
status_code:
type: integer
description: The HTTP status code
warnings:
type: array
items:
$ref: '#/components/schemas/ValidationError'
errors:
type: array
items:
$ref: '#/components/schemas/ValidationError'
pagination_info:
description: The pagination information for paginated endpoints
allOf:
- $ref: '#/components/schemas/PaginationInfo'
description: Validation error
'401':
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPError'
type: object
properties:
message:
type: string
description: The message to return
data:
$ref: '#/components/schemas/HTTPError'
status_code:
type: integer
description: The HTTP status code
warnings:
type: array
items:
$ref: '#/components/schemas/ValidationError'
errors:
type: array
items:
$ref: '#/components/schemas/ValidationError'
pagination_info:
description: The pagination information for paginated endpoints
allOf:
- $ref: '#/components/schemas/PaginationInfo'
description: Authentication error
tags:
- User
Expand Down Expand Up @@ -140,13 +203,55 @@ paths:
content:
application/json:
schema:
$ref: '#/components/schemas/ValidationError'
type: object
properties:
message:
type: string
description: The message to return
data:
$ref: '#/components/schemas/ValidationError'
status_code:
type: integer
description: The HTTP status code
warnings:
type: array
items:
$ref: '#/components/schemas/ValidationError'
errors:
type: array
items:
$ref: '#/components/schemas/ValidationError'
pagination_info:
description: The pagination information for paginated endpoints
allOf:
- $ref: '#/components/schemas/PaginationInfo'
description: Validation error
'401':
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPError'
type: object
properties:
message:
type: string
description: The message to return
data:
$ref: '#/components/schemas/HTTPError'
status_code:
type: integer
description: The HTTP status code
warnings:
type: array
items:
$ref: '#/components/schemas/ValidationError'
errors:
type: array
items:
$ref: '#/components/schemas/ValidationError'
pagination_info:
description: The pagination information for paginated endpoints
allOf:
- $ref: '#/components/schemas/PaginationInfo'
description: Authentication error
tags:
- User
Expand Down Expand Up @@ -198,13 +303,55 @@ paths:
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPError'
type: object
properties:
message:
type: string
description: The message to return
data:
$ref: '#/components/schemas/HTTPError'
status_code:
type: integer
description: The HTTP status code
warnings:
type: array
items:
$ref: '#/components/schemas/ValidationError'
errors:
type: array
items:
$ref: '#/components/schemas/ValidationError'
pagination_info:
description: The pagination information for paginated endpoints
allOf:
- $ref: '#/components/schemas/PaginationInfo'
description: Authentication error
'404':
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPError'
type: object
properties:
message:
type: string
description: The message to return
data:
$ref: '#/components/schemas/HTTPError'
status_code:
type: integer
description: The HTTP status code
warnings:
type: array
items:
$ref: '#/components/schemas/ValidationError'
errors:
type: array
items:
$ref: '#/components/schemas/ValidationError'
pagination_info:
description: The pagination information for paginated endpoints
allOf:
- $ref: '#/components/schemas/PaginationInfo'
description: Not found
tags:
- User
Expand Down Expand Up @@ -250,19 +397,82 @@ paths:
content:
application/json:
schema:
$ref: '#/components/schemas/ValidationError'
type: object
properties:
message:
type: string
description: The message to return
data:
$ref: '#/components/schemas/ValidationError'
status_code:
type: integer
description: The HTTP status code
warnings:
type: array
items:
$ref: '#/components/schemas/ValidationError'
errors:
type: array
items:
$ref: '#/components/schemas/ValidationError'
pagination_info:
description: The pagination information for paginated endpoints
allOf:
- $ref: '#/components/schemas/PaginationInfo'
description: Validation error
'401':
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPError'
type: object
properties:
message:
type: string
description: The message to return
data:
$ref: '#/components/schemas/HTTPError'
status_code:
type: integer
description: The HTTP status code
warnings:
type: array
items:
$ref: '#/components/schemas/ValidationError'
errors:
type: array
items:
$ref: '#/components/schemas/ValidationError'
pagination_info:
description: The pagination information for paginated endpoints
allOf:
- $ref: '#/components/schemas/PaginationInfo'
description: Authentication error
'404':
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPError'
type: object
properties:
message:
type: string
description: The message to return
data:
$ref: '#/components/schemas/HTTPError'
status_code:
type: integer
description: The HTTP status code
warnings:
type: array
items:
$ref: '#/components/schemas/ValidationError'
errors:
type: array
items:
$ref: '#/components/schemas/ValidationError'
pagination_info:
description: The pagination information for paginated endpoints
allOf:
- $ref: '#/components/schemas/PaginationInfo'
description: Not found
tags:
- User
Expand Down
Loading

0 comments on commit a145f07

Please sign in to comment.