Skip to content

feat: uv #3132

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft
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
20 changes: 9 additions & 11 deletions .github/workflows/cfn-nag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,12 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: 3.11
- name: Install Requirements
run: |
cd test_infra
python -m pip install --upgrade pip
python -m pip install poetry
poetry env use python
poetry env info
source $(poetry env info --path)/bin/activate
poetry install -vvv --no-root
- name: Rust latest
run: rustup update
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
enable-cache: true
- name: Set up cdk.json
run: |
cd test_infra
Expand All @@ -75,8 +72,9 @@ jobs:
- name: CDK Synth
run: |
cd test_infra
source $(poetry env info --path)/bin/activate
cdk synth
uv sync --frozen --no-install-project --verbose
uv run cdk synth
working-directory: ${{ github.workspace }}
- uses: stelligent/cfn_nag@master
with:
input_path: test_infra/cdk.out
Expand Down
28 changes: 16 additions & 12 deletions .github/workflows/minimal-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,20 +34,24 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Upgrade Pip
run: python -m pip install --upgrade pip
- name: Install Poetry
run: python -m pip install poetry
- name: Rust latest
run: rustup update
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
enable-cache: true
- name: Install Requirements
run: |
poetry config virtualenvs.in-project true
poetry config virtualenvs.path .venv
poetry install -vvv
run: uv sync --frozen --dev --verbose
working-directory: ${{ github.workspace }}
- name: Test Metadata
run: poetry run pytest tests/unit/test_metadata.py
run: uv run pytest tests/unit/test_metadata.py
working-directory: ${{ github.workspace }}
- name: Test Session
run: poetry run pytest tests/unit/test_session.py
run: uv run pytest tests/unit/test_session.py
working-directory: ${{ github.workspace }}
- name: Test Utils
run: poetry run pytest tests/unit/test_utils.py
run: uv run pytest tests/unit/test_utils.py
working-directory: ${{ github.workspace }}
- name: Test Moto
run: poetry run pytest -n 4 tests/unit/test_moto.py
run: uv run pytest -n 4 tests/unit/test_moto.py
working-directory: ${{ github.workspace }}
41 changes: 26 additions & 15 deletions .github/workflows/static-checking.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,19 +26,30 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Rust latest
run: rustup update
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
enable-cache: true
- name: Install Requirements
run: |
python -m pip install --upgrade pip
python -m pip install poetry
poetry config virtualenvs.create false --local
poetry install --all-extras -vvv
- name: ruff format check
run: ruff format --check .
- name: ruff check
run: ruff check --output-format=github .
- name: mypy check
run: mypy --install-types --non-interactive awswrangler
- name: Documentation check
run: doc8 --max-line-length 120 docs/source
- name: Check poetry.lock consistency with pyproject.toml
run: poetry check --lock
run: uv sync --frozen --all-extras --dev --verbose
working-directory: ${{ github.workspace }}
- name: Run ruff format
run: uv run ruff format --check .
working-directory: ${{ github.workspace }}
- name: Run ruff check
run: uv run ruff check --output-format=github .
working-directory: ${{ github.workspace }}
- name: Run mypy check
run: uv run mypy --install-types --non-interactive awswrangler
working-directory: ${{ github.workspace }}
- name: Run mypy check
run: uv run mypy --install-types --non-interactive awswrangler
working-directory: ${{ github.workspace }}
- name: Run documentation check
run: uv run doc8 --max-line-length 120 docs/source
working-directory: ${{ github.workspace }}
- name: Run uv lock check
run: uv lock --check
working-directory: ${{ github.workspace }}
7,854 changes: 0 additions & 7,854 deletions poetry.lock

This file was deleted.

226 changes: 109 additions & 117 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,138 +1,130 @@
[tool.poetry]
[project]
name = "awswrangler"
version = "3.11.0"
description = "Pandas on AWS."
authors = ["Amazon Web Services"]
license = "Apache License 2.0"

authors = [{ name = "Amazon Web Services" }]
requires-python = ">=3.9, <4.0"
readme = "README.md"

include = ["awswrangler/py.typed"]

exclude = ["*.so", "*.pyc", "*~", "#*", ".git*", ".coverage*", "DS_Store", "__pycache__"]

homepage = "https://aws-sdk-pandas.readthedocs.io/"
repository = "https://github.com/aws/aws-sdk-pandas"
documentation = "https://aws-sdk-pandas.readthedocs.io/"

keywords = ["pandas", "aws"]

license = {text = "Apache-2.0"}
license-files = ["LICENSE", "NOTICE" ]
keywords = [
"pandas",
"aws",
]
classifiers = [
"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",
]
dependencies = [
"boto3>=1.20.32,<2",
"botocore>=1.23.32,<2",
"pandas>=1.2.0,<3.0.0",
"numpy>=1.26,<3.0",
"pyarrow>=8.0.0,<19.0.0",
"typing-extensions>=4.4.0,<5",
"packaging>=21.1,<25.0",
'setuptools ; python_version >= "3.12"',
]

[tool.poetry.dependencies]
python = ">=3.9, <4.0"

# Required
boto3 = "^1.20.32"
botocore = "^1.23.32"
pandas = { version = ">=1.2.0,<3.0.0" }
numpy = [
{ version = ">=1.26,<2.1.0", markers = "python_version < \"3.10\"" },
{ version = ">=1.26,<3.0", markers = "python_version >= \"3.10\"" }
[project.optional-dependencies]
redshift = ["redshift-connector>=2.0.0,<3"]
mysql = ["pymysql>=1.0.0,<2"]
postgres = ["pg8000>=1.29.0,<2"]
sqlserver = ["pyodbc>=4,<6"]
oracle = ["oracledb>=1,<4"]
gremlin = [
"gremlinpython>=3.7.1,<4",
"requests>=2.0.0,<3",
"aiohttp>=3.9.0,<4",
"async-timeout>=4.0.3,<6.0.0",
]
pyarrow = [
{ version = ">=8.0.0,<19.0.0", markers = "python_version < \"3.13\"" },
{ version = ">=18.0.0,<19.0.0", markers = "python_version >= \"3.13\"" }
sparql = [
"SPARQLWrapper>=2.0.0,<3",
"requests>=2.0.0,<3",
]
opencypher = ["requests>=2.0.0,<3"]
opensearch = [
"opensearch-py>=2.0.0,<3",
"jsonpath-ng>=1.5.3,<2",
"requests-aws4auth>=1.1.1,<2",
]
openpyxl = ["openpyxl>=3.0.0,<4"]
progressbar = ["progressbar2>=4.0.0,<5"]
deltalake = ["deltalake>=0.18.0,<0.26.0"]
geopandas = ["geopandas>=1.0.0,<2"]
modin = ["modin>=0.31,<0.33"]
ray = ["ray[default, data]>=2.30.0,<2.38.0"]

[project.urls]
Homepage = "https://aws-sdk-pandas.readthedocs.io/"
Repository = "https://github.com/aws/aws-sdk-pandas"
Documentation = "https://aws-sdk-pandas.readthedocs.io/"

[dependency-groups]
dev = [
"setuptools",
"wheel>=0.45.1,<0.46",
"msgpack",
"poetry>=2.0.1,<3",
"boto3-stubs[athena, cleanrooms, chime, cloudwatch, dynamodb, ec2, emr, emr-serverless, glue, kms, logs, neptune, opensearch, opensearchserverless, quicksight, rds, rds-data, redshift, redshift-data, s3, secretsmanager, ssm, sts, timestream-query, timestream-write]>=1.36.2,<2",
"doc8~=1.1",
"mypy~=1.14",
"ruff>=0.9.2,<0.12.0",
"moto~=5.0",
"openpyxl~=3.1",
"pyparsing>=3.2.1,<4",
"pytest>=8.3.4,<9",
"pytest-cov~=6.0",
"pytest-rerunfailures~=15.0",
"pytest-timeout>=2.3.1,<3",
"pytest-xdist>=3.6.1,<4",
"s3fs==0.4.2",
"tox>=4.23.2,<5",
"bump-my-version>=0.29,<1.2",
"IPython>=8.18.1,<9",
"jupyterlab~=4.3",
"nbsphinx>=0.9.6,<0.10",
"nbsphinx-link>=1.3.1,<2",
"sphinx~=7.1",
"sphinx-autodoc-typehints>=2.0.1,<3",
"sphinx-bootstrap-theme>=0.8,<0.9",
"sphinx-copybutton>=0.5.1,<0.6",
"pydot>=3.0.3,<4",
"myst-parser>=3.0.1,<4",
]
typing-extensions = "^4.4.0"
packaging = ">=21.1,<25.0"

# needed because Py 3.12 removed distutils, which some libraries still need
setuptools = {version = "*", markers = "python_version >= \"3.12\""}

# Databases
redshift-connector = { version = "^2.0.0", optional = true }
pymysql = { version = "^1.0.0", optional = true }
pg8000 = { version = "^1.29.0", optional = true }
pyodbc = { version = ">=4,<6", optional = true }
oracledb = { version = ">=1,<4", optional = true }

# Graph
gremlinpython = { version = "^3.7.1", optional = true }
SPARQLWrapper = { version = "^2.0.0", optional = true }
requests = { version = "^2.0.0", optional = true }
aiohttp = { version = "^3.9.0", optional = true }
async-timeout = { version = ">=4.0.3,<6.0.0", optional = true }

# OpenSearch
opensearch-py = { version = "^2.0.0", optional = true }
requests-aws4auth = { version = "^1.1.1", optional = true }
jsonpath-ng = { version = "^1.5.3", optional = true }

# Other
openpyxl = { version = "^3.0.0", optional = true }
progressbar2 = { version = "^4.0.0", optional = true }
deltalake = { version = ">=0.18.0,<0.26.0", optional = true }
geopandas = { version = "^1.0.0", optional = true }

# Distributed
modin = { version = ">=0.31,<0.33", optional = true }
ray = { version = ">=2.30.0,<2.38.0", extras = ["default", "data"], optional = true }

[tool.poetry.extras]
redshift = ["redshift-connector"]
mysql = ["pymysql"]
postgres = ["pg8000"]
sqlserver = ["pyodbc"]
oracle = ["oracledb"]
gremlin = ["gremlinpython", "requests", "aiohttp", "async-timeout"]
sparql = ["SPARQLWrapper", "requests"]
opencypher = ["requests"]
opensearch = ["opensearch-py", "jsonpath-ng", "requests-aws4auth"]
openpyxl = ["openpyxl"]
progressbar = ["progressbar2"]
deltalake = ["deltalake"]
geopandas = ["geopandas"]
modin = ["modin"]
ray = ["ray"]

[tool.poetry.group.dev.dependencies]
# Build
setuptools = "*"
wheel = "^0.45.1"
msgpack = "*"
poetry = "^2.0.1"

# Lint
boto3-stubs = {version = "^1.36.2", extras = ["athena", "cleanrooms", "chime", "cloudwatch", "dynamodb", "ec2", "emr", "emr-serverless", "glue", "kms", "logs", "neptune", "opensearch", "opensearchserverless", "quicksight", "rds", "rds-data", "redshift", "redshift-data", "s3", "secretsmanager", "ssm", "sts", "timestream-query", "timestream-write"]}
doc8 = "^1.1"
mypy = "^1.14"
ruff = ">=0.9.2,<0.12.0"

# Test
moto = "^5.0"
openpyxl = "^3.1"
pyparsing = "^3.2.1"
pytest = "^8.3.4"
pytest-cov = "^6.0"
pytest-rerunfailures = "^15.0"
pytest-timeout = "^2.3.1"
pytest-xdist = "^3.6.1"
s3fs = "0.4.2" # Must be pinned to 0.4.2
tox = "^4.23.2"
[tool.hatch.build.targets.sdist]
include = ["awswrangler/py.typed"]
exclude = [
"*.so",
"*.pyc",
"*~",
"#*",
".git*",
".coverage*",
"DS_Store",
"__pycache__",
]

# Docs
bump-my-version = ">=0.29,<1.2"
IPython = "^8.18.1"
jupyterlab = "^4.3"
nbsphinx = "^0.9.6"
nbsphinx-link = "^1.3.1"
sphinx = "^7.1"
sphinx-autodoc-typehints = "^2.0.1"
sphinx-bootstrap-theme = "^0.8"
sphinx-copybutton = "^0.5.1"
pydot = "^3.0.3"
myst-parser = "^3.0.1"
[tool.hatch.build.targets.wheel]
include = ["awswrangler/py.typed"]
exclude = [
"*.so",
"*.pyc",
"*~",
"#*",
".git*",
".coverage*",
"DS_Store",
"__pycache__",
]

[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
requires = ["hatchling"]
build-backend = "hatchling.build"

[tool.ruff]
extend-include = ["*.ipynb"]
Expand Down
Loading
Loading