diff --git a/.pylintrc b/.pylintrc deleted file mode 100644 index 4cd47ce..0000000 --- a/.pylintrc +++ /dev/null @@ -1,8 +0,0 @@ -[pylint] -ignore-patterns=test_ -good-names=df -ignore= - __init__.py -disable= - import-error, - import-outside-toplevel \ No newline at end of file diff --git a/app.toml b/app.toml deleted file mode 100644 index 700ad49..0000000 --- a/app.toml +++ /dev/null @@ -1,7 +0,0 @@ -snowsql_config_path = "" -snowsql_connection_name = "" - -database = "" -schema = "" -role = "" -warehouse = "" diff --git a/environment.yml b/environment.yml index 5b1d311..8fb5013 100644 --- a/environment.yml +++ b/environment.yml @@ -1,7 +1,7 @@ # Snowpark environment file # https://docs.snowflake.com/en/developer-guide/snowpark/python/setup.html -name: snowpark +name: snowpark2 channels: - snowflake dependencies: diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..5f63f62 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,28 @@ +[build-system] +requires = ["hatchling", "hatch-requirements-txt"] +build-backend = "hatchling.build" + +[tool.hatch.metadata.hooks.requirements_txt] +files = ["requirements.txt"] + +[snow.default] +snowsql_config_path = "" +snowsql_connection_name = "" + +[snow.dev] +database = "" +schema = "" +role = "" +warehouse = "" + +[tool.pytest.ini_options] +markers = snowflake_vcr: marks Snowflake-specific vcrpy tests + +[tool.pylint] +ignore-patterns=test_ +good-names=df +ignore= + __init__.py +disable= + import-error, + import-outside-toplevel \ No newline at end of file diff --git a/pytest.ini b/pytest.ini deleted file mode 100644 index 7e71013..0000000 --- a/pytest.ini +++ /dev/null @@ -1,2 +0,0 @@ -[pytest] -markers = snowflake_vcr: marks Snowflake-specific vcrpy tests diff --git a/requirements.txt b/requirements.txt index e8deba4..66d7041 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,3 +3,4 @@ tomli toml pytest snowflake-vcrpy @ git+https://github.com/Snowflake-Labs/snowflake-vcrpy.git@v0.1.1 +pytest-grpc \ No newline at end of file diff --git a/setup.py b/setup.py deleted file mode 100644 index 19a6bf4..0000000 --- a/setup.py +++ /dev/null @@ -1,12 +0,0 @@ -""" -Run `conda env create --file environment.yaml` to create an editable -install of this project -""" - -from setuptools import setup, find_packages - -setup( - name="Example Snowpark Python project", - version="0.1.0", - packages=find_packages() -) diff --git a/src/app.py b/src/app.py index 95b1ff4..009bfd9 100644 --- a/src/app.py +++ b/src/app.py @@ -32,9 +32,7 @@ def run(snowpark_session: Session) -> DataFrame: return df2 -if __name__ == "__main__": - # This entrypoint is used for local development (`$ python src/procs/app.py`) - +def main(): from src.util.local import get_env_var_config print("Creating session...") @@ -46,3 +44,7 @@ def run(snowpark_session: Session) -> DataFrame: print("Stored procedure complete:") result.show() + + +if __name__ == "__main__": + main()