Skip to content

Commit

Permalink
Create subfolder and updated path accordinly (#393)
Browse files Browse the repository at this point in the history
  • Loading branch information
tech3371 authored Nov 18, 2024
1 parent 6d95102 commit 9a008ce
Show file tree
Hide file tree
Showing 22 changed files with 26 additions and 26 deletions.
2 changes: 1 addition & 1 deletion sds_data_manager/constructs/database_construct.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ def __init__(
id="CreateMetadataSchema",
function_name="create-schema",
code=code,
handler="SDSCode.create_schema.lambda_handler",
handler="SDSCode.pipeline_lambdas.create_schema.lambda_handler",
runtime=lambda_.Runtime.PYTHON_3_12,
timeout=cdk.Duration.seconds(60),
memory_size=1000,
Expand Down
2 changes: 1 addition & 1 deletion sds_data_manager/constructs/indexer_lambda_construct.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def __init__(
id="IndexerLambda",
function_name="file-indexer",
code=code,
handler="SDSCode.indexer.lambda_handler",
handler="SDSCode.pipeline_lambdas.indexer.lambda_handler",
runtime=lambda_.Runtime.PYTHON_3_12,
timeout=cdk.Duration.minutes(1),
memory_size=1000,
Expand Down
2 changes: 1 addition & 1 deletion sds_data_manager/constructs/instrument_lambdas.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def __init__(
"BatchStarterLambda",
function_name="BatchStarterLambda",
code=code,
handler="SDSCode.batch_starter.lambda_handler",
handler="SDSCode.pipeline_lambdas.batch_starter.lambda_handler",
runtime=lambda_.Runtime.PYTHON_3_12,
environment=lambda_environment,
memory_size=512,
Expand Down
8 changes: 4 additions & 4 deletions sds_data_manager/constructs/sds_api_manager_construct.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def __init__(
id="UploadAPILambda",
function_name="upload-api-handler",
code=code,
handler="SDSCode.upload_api.lambda_handler",
handler="SDSCode.api_lambdas.upload_api.lambda_handler",
runtime=lambda_.Runtime.PYTHON_3_12,
timeout=cdk.Duration.minutes(1),
memory_size=1000,
Expand Down Expand Up @@ -108,7 +108,7 @@ def __init__(
id="QueryAPILambda",
function_name="query-api-handler",
code=code,
handler="SDSCode.query_api.lambda_handler",
handler="SDSCode.api_lambdas.query_api.lambda_handler",
runtime=lambda_.Runtime.PYTHON_3_12,
timeout=cdk.Duration.minutes(1),
memory_size=1000,
Expand All @@ -135,7 +135,7 @@ def __init__(
id="DownloadAPILambda",
function_name="download-api-handler",
code=code,
handler="SDSCode.download_api.lambda_handler",
handler="SDSCode.api_lambdas.download_api.lambda_handler",
runtime=lambda_.Runtime.PYTHON_3_12,
timeout=cdk.Duration.minutes(1),
environment={
Expand All @@ -160,7 +160,7 @@ def __init__(
id="universal-spin-table-api-handler",
function_name="universal-spin-table-api-handler",
code=code,
handler="SDSCode.spin_table_api.lambda_handler",
handler="SDSCode.api_lambdas.spin_table_api.lambda_handler",
runtime=lambda_.Runtime.PYTHON_3_12,
timeout=cdk.Duration.minutes(1),
memory_size=1000,
Expand Down
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

from sqlalchemy import select

from .database import database as db
from .database import models
from ..database import database as db
from ..database import models

# Logger setup
logger = logging.getLogger(__name__)
Expand Down
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
from sqlalchemy import select
from sqlalchemy.exc import IntegrityError

from ..database import database as db
from ..database import models
from . import dependency_config
from .database import database as db
from .database import models

# Logger setup
logger = logging.getLogger(__name__)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
import boto3
from imap_data_access import ScienceFilePath

from .database import database as db
from .database import models
from ..database import database as db
from ..database import models
from .lambda_custom_events import IMAPLambdaPutEvent

# Logger setup
Expand Down
2 changes: 1 addition & 1 deletion tests/infrastructure/test_database_construct.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def test_create_schema(template):
props={
"FunctionName": "create-schema",
"Runtime": "python3.12",
"Handler": "SDSCode.create_schema.lambda_handler",
"Handler": "SDSCode.pipeline_lambdas.create_schema.lambda_handler",
"MemorySize": 1000,
"Timeout": 60,
"Role": {
Expand Down
14 changes: 7 additions & 7 deletions tests/lambda_endpoints/test_batch_starter.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,18 @@
from imap_data_access import ScienceFilePath
from sqlalchemy.exc import IntegrityError

from sds_data_manager.lambda_code.SDSCode import batch_starter
from sds_data_manager.lambda_code.SDSCode.batch_starter import (
get_downstream_dependencies,
get_file,
is_job_in_processing_table,
lambda_handler,
)
from sds_data_manager.lambda_code.SDSCode.database import models
from sds_data_manager.lambda_code.SDSCode.database.models import (
ProcessingJob,
ScienceFiles,
)
from sds_data_manager.lambda_code.SDSCode.pipeline_lambdas import batch_starter
from sds_data_manager.lambda_code.SDSCode.pipeline_lambdas.batch_starter import (
get_downstream_dependencies,
get_file,
is_job_in_processing_table,
lambda_handler,
)

from .conftest import POSTGRES_AVAILABLE

Expand Down
2 changes: 1 addition & 1 deletion tests/lambda_endpoints/test_download_api.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""Tests for the Download API."""

from sds_data_manager.lambda_code.SDSCode import download_api
from sds_data_manager.lambda_code.SDSCode.api_lambdas import download_api


def test_object_exists(s3_client):
Expand Down
4 changes: 2 additions & 2 deletions tests/lambda_endpoints/test_indexer_lambda.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
from imap_data_access import ScienceFilePath
from sqlalchemy import select

from sds_data_manager.lambda_code.SDSCode import indexer
from sds_data_manager.lambda_code.SDSCode.database import models
from sds_data_manager.lambda_code.SDSCode.indexer import (
from sds_data_manager.lambda_code.SDSCode.pipeline_lambdas import indexer
from sds_data_manager.lambda_code.SDSCode.pipeline_lambdas.indexer import (
send_event_from_indexer,
)

Expand Down
2 changes: 1 addition & 1 deletion tests/lambda_endpoints/test_query_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

import pytest

from sds_data_manager.lambda_code.SDSCode import query_api
from sds_data_manager.lambda_code.SDSCode.api_lambdas import query_api
from sds_data_manager.lambda_code.SDSCode.database import models


Expand Down
2 changes: 1 addition & 1 deletion tests/lambda_endpoints/test_upload_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

import pytest

from sds_data_manager.lambda_code.SDSCode import upload_api
from sds_data_manager.lambda_code.SDSCode.api_lambdas import upload_api


@pytest.fixture(autouse=True)
Expand Down

0 comments on commit 9a008ce

Please sign in to comment.