Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentsarago committed Feb 20, 2024
1 parent 64e67b7 commit c7904ef
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 11 deletions.
1 change: 1 addition & 0 deletions integration_tests/cdk/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from pydantic_core.core_schema import FieldValidationInfo
from pydantic_settings import BaseSettings, SettingsConfigDict


class AppConfig(BaseSettings):
model_config = SettingsConfigDict(
env_file=".env"
Expand Down
10 changes: 4 additions & 6 deletions integration_tests/cdk/eoapi_template/pgStacInfra.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,16 @@ def __init__(
version=aws_rds.PostgresEngineVersion.VER_14
),
vpc_subnets=aws_ec2.SubnetSelection(
subnet_type=aws_ec2.SubnetType.PUBLIC
subnet_type=aws_ec2.SubnetType.PUBLIC,
),
allocated_storage=app_config.db_allocated_storage,
instance_type=aws_ec2.InstanceType(app_config.db_instance_type),
bootstrapper_lambda_function_options={
bootstrapper_lambda_function_options={
"allow_public_subnet": True,
}
)

pgstac_db.db.connections.allow_default_port_from_any_ipv4()

pgstac_db.db.connections.allow_default_port_from_any_ipv4()

PgStacApiLambda(
self,
Expand All @@ -71,6 +70,5 @@ def __init__(
buckets=[],
lambda_function_options={
"allow_public_subnet": True,
},
},
)

5 changes: 2 additions & 3 deletions integration_tests/cdk/eoapi_template/vpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,16 @@ def __init__(self, scope: Construct, app_config: AppConfig, **kwargs) -> None:
]
)


self.vpc.add_interface_endpoint(
"SecretsManagerEndpoint",
service=aws_ec2.InterfaceVpcEndpointAwsService.SECRETS_MANAGER,
)

self.vpc.add_interface_endpoint(
"CloudWatchEndpoint",
service=aws_ec2.InterfaceVpcEndpointAwsService.CLOUDWATCH_LOGS,
)

self.export_value(
self.vpc.select_subnets(subnet_type=aws_ec2.SubnetType.PUBLIC)
.subnets[0]
Expand Down
8 changes: 7 additions & 1 deletion lib/database/bootstrapper_runtime/handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Custom resource lambda handler to bootstrap Postgres db.
Source: https://github.com/developmentseed/eoAPI/blob/master/deployment/handlers/db_handler.py
"""

import json

import boto3
Expand Down Expand Up @@ -58,7 +59,12 @@ def send(
headers = {"content-type": "", "content-length": str(len(json_responseBody))}

try:
response = httpx.put(responseUrl, data=json_responseBody, headers=headers, timeout=30)
response = httpx.put(
responseUrl,
data=json_responseBody,
headers=headers,
timeout=30,
)
print("Status code: " + response.status_code)
except Exception as e:
print("send(..) failed executing httpx.put(..): " + str(e))
Expand Down
1 change: 1 addition & 0 deletions lib/ingestor-api/runtime/src/loader.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Utilities to bulk load data into pgstac from json/ndjson."""

import logging

from pypgstac.load import Loader as BaseLoader
Expand Down
2 changes: 1 addition & 1 deletion lib/ingestor-api/runtime/src/services.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,5 @@ def fetch_many(
}


class NotInDb(Exception):
class NotInDb(Exception): # noqa
...
1 change: 1 addition & 0 deletions lib/stac-api/runtime/src/config.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
"""API settings.
Based on https://github.com/developmentseed/eoAPI/tree/master/src/eoapi/stac"""

import base64
import json
from typing import Optional
Expand Down

0 comments on commit c7904ef

Please sign in to comment.