Skip to content

Commit

Permalink
Refactor Lambda subpackage into proper python package to allow instal…
Browse files Browse the repository at this point in the history
…lation as a dev dependency for type hinting and code completion
  • Loading branch information
medley56 committed Oct 29, 2024
1 parent a47aa9c commit 3746c1b
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions lasp_opensearch_data_center/lambda/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ ENV PATH="$PATH:/root/.local/bin"
# Copy contents of directory
COPY lambda_entrypoint.sh .
COPY pyproject.toml .
COPY *.py .
COPY opensearch_data_center_lambda_runtime opensearch_data_center_lambda_runtime
# We lock all dependencies early so that it can be cached for other builds since dependencies don't change much
RUN poetry lock
# Install dependencies
Expand All @@ -48,4 +48,4 @@ ENTRYPOINT [ "./lambda_entrypoint.sh" ]

# Target for OS snapshot lambda
FROM lambda-base AS snapshot-lambda
CMD [ "snapshot_handler.handler" ]
CMD [ "opensearch_data_center_lambda_runtime.snapshot_handler.handler" ]
Empty file.
2 changes: 1 addition & 1 deletion lasp_opensearch_data_center/lambda/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tool.poetry]
name = "lambda_runtime"
name = "opensearch_data_center_lambda_runtime"
version = "0.1.0"
description = "Dependency manager for lambda runtime of lasp_opensearch_data_center construct library"
authors = [
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "lasp_opensearch_data_center"
version = "1.0.0"
version = "1.0.1"
description = "Construct library for creating a CSV ingest pipeline into OpenSearch with a front end website."
authors = [
"Gavin Medley <[email protected]>",
Expand All @@ -18,7 +18,7 @@ aws-cdk-lib = "^2.0.0"
constructs = "^10.0.0"

[tool.poetry.group.dev.dependencies]
lambda_runtime = {path="lasp_opensearch_data_center/lambda", develop=true}
opensearch_data_center_lambda_runtime = {path="lasp_opensearch_data_center/lambda", develop=true}

[build-system]
requires = ["poetry-core"]
Expand Down

0 comments on commit 3746c1b

Please sign in to comment.