Skip to content

Commit

Permalink
Update pyproject
Browse files Browse the repository at this point in the history
  • Loading branch information
vemel committed Dec 11, 2024
1 parent 9e8d0f6 commit a415278
Show file tree
Hide file tree
Showing 6 changed files with 157 additions and 99 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/on_push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,10 @@ jobs:
python-version: ${{ matrix.version }}
allow-prereleases: true
- name: Set up uv
uses: astral-sh/setup-uv@v3
uses: astral-sh/setup-uv@v4
with:
version: "latest"
enable-cache: true
- name: Install the project
run: |
uv sync --all-extras --dev
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish_on_update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
with:
python-version: "3.13"
- name: Set up uv
uses: astral-sh/setup-uv@v3
uses: astral-sh/setup-uv@v4
with:
version: "latest"
- name: Install the project
Expand Down
5 changes: 5 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,8 @@ repos:
language: system
pass_filenames: false
entry: uv run mypy s3transfer-stubs
- id: sanity
name: sanity
language: system
pass_filenames: false
entry: ./scripts/sanity_check.sh
18 changes: 8 additions & 10 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,22 +27,20 @@ classifiers = [
"Topic :: Software Development :: Libraries :: Python Modules",
]

[tool.uv]
config-settings = { editable-mode = "strict" }
dev-dependencies = [
"setuptools",
"awscrt",
"s3transfer",
"botocore",
"mypy",
"pyright",
"istub",
[dependency-groups]
dev = ["setuptools", "awscrt", "s3transfer", "mypy", "pyright", "istub"]
types = [
"botocore-stubs",
"types-awscrt",
"types-requests",
"types-python-dateutil",
"types-dataclasses",
]

[tool.uv]
config-settings = { editable-mode = "strict" }
default-groups = ["dev", "types"]

[project.urls]
Homepage = "https://github.com/youtype/types-s3transfer"
Documentation = "https://youtype.github.io/mypy_boto3_builder/"
Expand Down
11 changes: 11 additions & 0 deletions scripts/sanity_check.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/usr/bin/env bash
set -e

rm -rf dist/*
uv build --wheel
OUTPUT=`uvx --with dist/*.whl mypy test.py || true`
echo $OUTPUT
if [[ ${OUTPUT} != *"Found 1 error"* ]];then
echo "Stubs test failed: $TEST"
exit 1
fi
Loading

0 comments on commit a415278

Please sign in to comment.