Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/datacustomcode/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
)

from datacustomcode.config import config
from datacustomcode.scan import get_package_type
from datacustomcode.scan import find_base_directory, get_package_type


def _set_config_option(config_obj, key: str, value: str) -> None:
Expand Down Expand Up @@ -68,7 +68,8 @@ def run_entrypoint(
f"config.json not found at {config_json_path}. config.json is required."
)

package_type = get_package_type(entrypoint_dir)
base_directory = find_base_directory(entrypoint)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we move the find_base_directory usage into the CLI run method?

package_type = get_package_type(base_directory)

try:
with open(config_json_path, "r") as f:
Expand Down
18 changes: 0 additions & 18 deletions src/datacustomcode/templates/function/Dockerfile

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM public.ecr.aws/emr-on-eks/spark/emr-7.3.0:latest
FROM python:3.11-slim

USER root

Expand Down
86 changes: 0 additions & 86 deletions src/datacustomcode/templates/function/account.ipynb

This file was deleted.

This file was deleted.

This file was deleted.

97 changes: 0 additions & 97 deletions src/datacustomcode/templates/function/jupyterlab.sh

This file was deleted.

6 changes: 3 additions & 3 deletions src/datacustomcode/templates/function/payload/entrypoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ def chunk_text(text: str, chunk_size: int = 1000) -> List[str]:
return chunks


def dc_function(request: dict) -> dict:
logger.info("Inside DC Function")
def function(request: dict) -> dict:
logger.info("Inside Function")
logger.info(request)

items = request["input"]
Expand Down Expand Up @@ -107,7 +107,7 @@ def dc_function(request: dict) -> dict:
}

# Run the function
result = dc_function(test_request)
result = function(test_request)

# Print the results in a more readable format
print("\nChunking Results:")
Expand Down
7 changes: 0 additions & 7 deletions src/datacustomcode/templates/function/requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
# Required packages for the project - Do not modify
salesforce-cdp-connector>=1.0.16
pyspark==3.5.1
pandas
numpy
pydantic
jupyterlab
ipywidgets
tqdm
salesforce-data-customcode