Skip to content

Commit 987c9c6

Browse files
committed
rebased
1 parent 8f932f2 commit 987c9c6

File tree

4 files changed

+269
-1
lines changed

4 files changed

+269
-1
lines changed

.github/workflows/ci-python.yml

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
name: CI / Python
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
11+
cancel-in-progress: true
12+
13+
defaults:
14+
run:
15+
shell: bash --noprofile --norc -eo pipefail -ux {0}
16+
17+
jobs:
18+
lint:
19+
name: Lint
20+
runs-on: ubuntu-latest
21+
22+
steps:
23+
- uses: actions/checkout@v4
24+
25+
- uses: astral-sh/setup-uv@85856786d1ce8acfbcc2f13a5f3fbd6b938f9f41 # v7.1.2
26+
with:
27+
version: '0.9.3'
28+
enable-cache: false # we just cache the venv-dir directly in action-setup-venv
29+
30+
- uses: getsentry/action-setup-venv@0958463ee0e02b9e8aa8f8e031afae1f84b80881 # v3.0.0
31+
with:
32+
cache-dependency-path: uv.lock
33+
install-cmd: uv sync --frozen --active
34+
35+
- name: Run black
36+
run: uv run black --check --diff python-objectstore-client
37+
38+
- name: Run isort
39+
run: uv run isort --check-only --diff python-objectstore-client
40+
41+
- name: Run flake8
42+
run: uv run flake8 python-objectstore-client
43+
44+
- name: Run mypy
45+
run: uv run mypy python-objectstore-client
46+
47+
test:
48+
name: Test
49+
runs-on: ubuntu-latest
50+
51+
steps:
52+
- uses: actions/checkout@v4
53+
54+
- uses: astral-sh/setup-uv@85856786d1ce8acfbcc2f13a5f3fbd6b938f9f41 # v7.1.2
55+
with:
56+
version: '0.9.3'
57+
enable-cache: false # we just cache the venv-dir directly in action-setup-venv
58+
59+
- uses: getsentry/action-setup-venv@0958463ee0e02b9e8aa8f8e031afae1f84b80881 # v3.0.0
60+
with:
61+
cache-dependency-path: uv.lock
62+
install-cmd: uv sync --frozen --active
63+
64+
- name: Run tests
65+
run: pytest

python-objectstore-client/pyproject.toml

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,35 @@ readme = "README.md"
66
requires-python = ">=3.11.11"
77
dependencies = []
88

9-
[build-system]
109
requires = ["uv_build==0.9.3"] # must match the version specified in devenv/config.ini
1110
build-backend = "uv_build"
11+
12+
[dependency-groups]
13+
dev = [
14+
"pytest>=8.3.3",
15+
"black>=25.1.0",
16+
"isort>=5.13.2",
17+
"flake8>=7.3.0",
18+
"mypy>=1.17.1",
19+
]
20+
21+
[tool.mypy]
22+
check_untyped_defs = true
23+
no_implicit_reexport = true
24+
warn_unreachable = true
25+
warn_unused_configs = true
26+
warn_unused_ignores = true
27+
warn_redundant_casts = true
28+
enable_error_code = ["ignore-without-code", "redundant-self"]
29+
local_partial_types = true
30+
disallow_any_generics = true
31+
disallow_untyped_defs = true
32+
33+
[tool.black]
34+
line-length = 200
35+
target-version = ['py311']
36+
37+
[tool.isort]
38+
profile = "black"
39+
line_length = 200
40+
lines_between_sections = 1
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[flake8]
2+
extend-ignore = E501

uv.lock

Lines changed: 172 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)