Skip to content

Commit

Permalink
Sort imports
Browse files Browse the repository at this point in the history
  • Loading branch information
slesaad committed May 22, 2024
1 parent ebaca03 commit 7c547ea
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 13 deletions.
3 changes: 1 addition & 2 deletions ingest_api/runtime/src/dependencies.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,10 @@

import boto3
import src.services as services
from src.config import auth, settings

from fastapi import Depends, HTTPException, security

from src.config import auth, settings

logger = logging.getLogger(__name__)

token_scheme = security.HTTPBearer()
Expand Down
4 changes: 1 addition & 3 deletions ingest_api/runtime/src/main.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
from typing import Dict


import src.dependencies as dependencies
import src.schemas as schemas
import src.services as services
from aws_lambda_powertools.metrics import MetricUnit
from src.collection_publisher import CollectionPublisher, ItemPublisher
from src.config import settings, auth
from src.config import auth, settings
from src.doc import DESCRIPTION
from src.monitoring import LoggerRouteHandler, logger, metrics, tracer

Expand All @@ -16,7 +15,6 @@
from fastapi.security import OAuth2PasswordRequestForm
from starlette.requests import Request


app = FastAPI(
title="VEDA Ingestion API",
description=DESCRIPTION,
Expand Down
1 change: 0 additions & 1 deletion stac_api/runtime/handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
from src.app import app
from src.monitoring import logger, metrics, tracer


logging.getLogger("mangum.lifespan").setLevel(logging.ERROR)
logging.getLogger("mangum.http").setLevel(logging.ERROR)

Expand Down
2 changes: 1 addition & 1 deletion stac_api/runtime/src/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
from src.config import post_request_model as POSTModel
from src.extension import TiTilerExtension

from common.auth import Auth
from fastapi import APIRouter, FastAPI
from fastapi.params import Depends
from fastapi.responses import ORJSONResponse
Expand All @@ -19,7 +20,6 @@
from starlette.templating import Jinja2Templates
from starlette_cramjam.middleware import CompressionMiddleware

from common.auth import Auth
from .api import VedaStacApi
from .core import VedaCrudClient
from .monitoring import LoggerRouteHandler, logger, metrics, tracer
Expand Down
3 changes: 2 additions & 1 deletion stac_api/runtime/src/routes.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
"""Dependency injection in to fastapi routes"""

from typing import List
from fastapi.params import Depends

from fastapi.dependencies.utils import get_parameterless_sub_dependant
from fastapi.params import Depends
from fastapi.routing import APIRoute
from starlette.routing import Match
from starlette.types import Scope
Expand Down
9 changes: 4 additions & 5 deletions stac_api/runtime/src/validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,14 @@
import re
from typing import Dict

from pydantic import BaseModel, Field, ValidationError
from src.config import ApiSettings
from stac_pydantic import Collection, Item

from fastapi import Request
from fastapi.responses import JSONResponse
from pydantic import ValidationError, BaseModel, Field
from stac_pydantic import Item, Collection
from starlette.middleware.base import BaseHTTPMiddleware

from src.config import ApiSettings


api_settings = ApiSettings()
prepend_path = api_settings.root_path or ""

Expand Down

0 comments on commit 7c547ea

Please sign in to comment.