Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
30 changes: 6 additions & 24 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,32 +33,14 @@ cd snowpark-python

#### Install the library in edit mode and install its dependencies

- Create a new Python virtual environment with any Python version that we support.
- The Snowpark Python API supports **Python 3.9, Python 3.10, Python 3.11, Python 3.12 and Python 3.13**.
- The Snowpark pandas API supports **Python 3.9, Python 3.10, and Python 3.11**. Additionally, Snowpark pandas requires **Modin 0.36.x or 0.37.x**, and **pandas 2.2.x or 2.3.x**.
Install [`uv`](https://docs.astral.sh/uv/) and run

```bash
conda create --name snowpark-dev python=3.9
```

- Activate the new Python virtual environment. For example,

```bash
conda activate snowpark-dev
```

- Go to the cloned repository root folder.
- To install the Snowpark Python API in edit/development mode, use:

```bash
python -m pip install -e ".[development, pandas]"
```
- To install the Snowpark pandas API in edit/development mode, use:
```bash
python -m pip install -e ".[modin-development]"
```
```console
uv sync --all-extras
```

The `-e` tells `pip` to install the library in [edit, or development mode](https://pip.pypa.io/en/stable/cli/pip_install/#editable-installs).
This will create a virtual environment that your IDE can find to offer
language server features during development.

#### Setup your IDE

Expand Down
167 changes: 162 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,164 @@
[build-system]
requires = [
"setuptools",
"protoc-wheel-0==21.1", # Protocol buffer compiler for Snowpark IR
"mypy-protobuf", # used in generating typed Python code from protobuf for Snowpark IR
requires = ["hatchling", "hatch-protobuf"]
build-backend = "hatchling.build"

[project]
name = "snowflake-snowpark-python"
dynamic = ["version"]
description = "Snowflake Snowpark for Python"
readme = "README.md"
requires-python = ">=3.9,<3.14"
license = {text = "Apache License, Version 2.0"}
authors = [
{name = "Snowflake, Inc", email = "snowflake-python-libraries-dl@snowflake.com"}
]
build-backend = "setuptools.build_meta"
keywords = ["Snowflake", "db", "database", "cloud", "analytics", "warehouse"]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Environment :: Console",
"Environment :: Other Environment",
"Intended Audience :: Developers",
"Intended Audience :: Education",
"Intended Audience :: Information Technology",
"Intended Audience :: System Administrators",
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
"Programming Language :: SQL",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Database",
"Topic :: Software Development",
"Topic :: Software Development :: Libraries",
"Topic :: Software Development :: Libraries :: Application Frameworks",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Scientific/Engineering :: Information Analysis",
]

dependencies = [
"snowflake-connector-python>=3.14.0,<4.0.0",
"typing-extensions>=4.1.0,<5.0.0",
"pyyaml",
"cloudpickle>=1.6.0,<=3.0.0,!=2.1.0,!=2.2.0",
"python-dateutil",
"tzlocal",
"protobuf>=6.33.4",
]

[project.optional-dependencies]
pandas = [
"snowflake-connector-python[pandas]>=3.17.0,<4.0.0",
]

modin = [
"snowflake-connector-python[pandas]>=3.17.0,<4.0.0",
"modin>=0.36.0,<0.38.0",
"tqdm",
"ipywidgets",
]

secure-local-storage = [
"snowflake-connector-python[secure-local-storage]>=3.14.0,<4.0.0",
]

development = [
"pytest<8.0.0",
"pytest-cov",
"wrapt",
"coverage",
"sphinx==5.0.2",
"cachetools",
"pytest-timeout",
"pytest-xdist",
"openpyxl",
"matplotlib",
"pre-commit",
"graphviz",
"pytest-assume",
"decorator",
"lxml",
"tox",
"snowflake.core>=1.0.0,<2",
"psutil",
]

modin-development = [
"snowflake-connector-python[pandas]>=3.14.0,<4.0.0",
"modin>=0.36.0,<0.38.0",
"tqdm",
"ipywidgets",
"pytest<8.0.0",
"pytest-cov",
"wrapt",
"coverage",
"sphinx==5.0.2",
"cachetools",
"pytest-timeout",
"pytest-xdist",
"openpyxl",
"matplotlib",
"pre-commit",
"graphviz",
"pytest-assume",
"decorator",
"lxml",
"tox",
"snowflake.core>=1.0.0,<2",
"psutil",
"scipy",
"statsmodels",
"scikit-learn",
"plotly<6.0.0",
"snowflake-ml-python>=1.8.0; python_version<'3.12'",
"s3fs",
]

localtest = [
"pandas",
"requests",
]

opentelemetry = [
"opentelemetry-api>=1.0.0,<2.0.0",
"opentelemetry-sdk>=1.0.0,<2.0.0",
]

[project.urls]
Homepage = "https://www.snowflake.com/"
Documentation = "https://docs.snowflake.com/en/developer-guide/snowpark/python/index.html"
Source = "https://github.com/snowflakedb/snowpark-python"
Issues = "https://github.com/snowflakedb/snowpark-python/issues"
Changelog = "https://github.com/snowflakedb/snowpark-python/blob/main/CHANGELOG.md"

[tool.hatch.version]
source = "code"
path = "src/snowflake/snowpark/version.py"
expression = '".".join([str(v) for v in VERSION if v is not None])'

[tool.hatch.build]
sources = ["src"]

[tool.hatch.build.targets.wheel]
packages = ["src/snowflake"]

[tool.hatch.build.targets.sdist]
include = [
"/src",
"/pyproject.toml",
"/README.md",
"/CHANGELOG.md",
]

[tool.hatch.build.hooks.protobuf]
dependencies = ["hatch-protobuf", "mypy-protobuf~=3.0"]
proto_paths = ["src/snowflake/snowpark/_internal/proto"]
output_path = "src/snowflake/snowpark/_internal/proto/generated"
generate_pyi = false
generate_grpc = false

[[tool.hatch.build.hooks.protobuf.generators]]
name = "mypy"
outputs = ["{proto_name}_pb2.pyi"]
Loading
Loading