Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
eb22f80
feat(client-py): Add a (empty) package for the Python client
lcian Oct 28, 2025
d37032c
use workspace, use internal PyPI for whole workspace, uv sync
lcian Oct 28, 2025
86c75cb
specify build system, install client as editable
lcian Oct 28, 2025
8f932f2
uv sync --all-packages in envrc for unified venv
lcian Oct 28, 2025
987c9c6
rebased
lcian Oct 28, 2025
1e9388c
lockfile
lcian Oct 28, 2025
ac5bc03
adjst commands
lcian Oct 28, 2025
a29e932
add pre-commit
lcian Oct 28, 2025
58d5309
disclaimer on pre-commit
lcian Oct 28, 2025
daca135
readme
lcian Oct 28, 2025
ca248cb
build_system
lcian Oct 29, 2025
1c93543
os matrix
lcian Oct 29, 2025
33ff8b4
os matrix
lcian Oct 29, 2025
1f5d760
improve
lcian Oct 29, 2025
790e69a
improve
lcian Oct 29, 2025
e209b31
only tests in matrix
lcian Oct 29, 2025
ad1a998
exclude mypy on windows
lcian Oct 29, 2025
25c4df6
exclude precommit on windows
lcian Oct 29, 2025
5296238
make internal pypi not exclusive - packages are missing on win
lcian Oct 29, 2025
41c5edf
ci only on win and macos
lcian Oct 29, 2025
5c2305e
default = true
lcian Oct 29, 2025
7a6d503
lower py version, regenerate uv.lock
lcian Oct 29, 2025
e0c1a52
lower .python-version as well for CI
lcian Oct 29, 2025
1ac9c9c
just require 3.11
lcian Oct 29, 2025
5c0e09f
lower req to 3.11.9 due to GH runners availability
lcian Oct 29, 2025
b7ebd66
regerate lockfile with 3.11
lcian Oct 29, 2025
75c6065
use public PyPI for now
lcian Oct 29, 2025
06d8d11
Merge branch 'main' into lcian/feat/python-client-devsetup
lcian Oct 29, 2025
074da70
back to python 3.13
lcian Oct 29, 2025
e1b78e9
use ruff; less pre-commit hooks; less overriding things
lcian Oct 29, 2025
0bbe63b
use uv run for CI
lcian Oct 29, 2025
b592a34
test only on ubuntu-latest
lcian Oct 29, 2025
10d6c92
specify workflow permissions; remove concurrency
lcian Oct 29, 2025
114e0d4
format py file in devenv dir
lcian Oct 29, 2025
96c25d5
move pytest to top level; run uv sync in CI
lcian Oct 29, 2025
664e211
try removing uv run prefix from CI commands
lcian Oct 29, 2025
76c8943
delete gitignore
lcian Oct 29, 2025
395963c
ignore just dist
lcian Oct 29, 2025
0bb4a6f
unify CI
lcian Oct 29, 2025
2e19ec3
fix workflow file
lcian Oct 29, 2025
088fd48
improve
lcian Oct 29, 2025
7d1d979
improve
lcian Oct 29, 2025
6f6a046
improve
lcian Oct 29, 2025
5389be3
change mypy rules slightly
lcian Oct 29, 2025
10fb7cd
pin minor python version
lcian Oct 29, 2025
28f41b4
simplify build requirement
lcian Oct 29, 2025
93ada0e
improve
lcian Oct 29, 2025
e861c49
Update .pre-commit-config.yaml
lcian Oct 29, 2025
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
36 changes: 36 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,27 @@ jobs:
env:
RUSTDOCFLAGS: -Dwarnings

lint-python:
name: Lint Python
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- uses: astral-sh/setup-uv@85856786d1ce8acfbcc2f13a5f3fbd6b938f9f41 # v7.1.2

- name: Install dependencies
run: uv sync --all-packages --all-groups

- name: Format
run: uv run ruff format

- name: Lint
run: uv run ruff check

- name: Run mypy
run: uv run mypy .

test_all:
name: Test (all features)
runs-on: ubuntu-latest
Expand Down Expand Up @@ -89,6 +110,21 @@ jobs:
- name: Run Tests
run: cargo test --workspace --all-features

test-python:
name: Test Python
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- uses: astral-sh/setup-uv@85856786d1ce8acfbcc2f13a5f3fbd6b938f9f41 # v7.1.2

- name: Install dependencies
run: uv sync --all-packages --all-groups

- name: Run tests
run: uv run pytest python-objectstore-client

docs:
name: Cargo Docs
runs-on: ubuntu-latest
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ profile.json.gz
.*.sw*

**/__pycache__
/dist
28 changes: 28 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# This pre-commit config is mainly aimed at formatting and linting the Python files in python-objectstore-client.
# However, pre-commit requires this file to be placed at the root of the repository.

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-merge-conflict

- repo: local
hooks:
- id: ruff-check
name: ruff check
entry: ruff check
language: system
types_or: [python, pyi]
- id: ruff-format
name: ruff format
entry: ruff format
language: system
types_or: [python, pyi]
- id: mypy
name: mypy
entry: .venv/bin/mypy
language: system
types: [python]
3 changes: 2 additions & 1 deletion devenv/sync.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from devenv import constants
from devenv.lib import config, uv

from devenv import constants


def main(context: dict[str, str]) -> int:
reporoot = context["reporoot"]
Expand Down
27 changes: 22 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,16 +1,33 @@
[project]
name = "objectstore"
version = "0.1.0"
requires-python = ">=3.13"
requires-python = ">=3.13.1"

[[tool.uv.index]]
url = "https://pypi.devinfra.sentry.io/simple"
default = true
[tool.uv]
required-version = "==0.9.3" # keep in sync with devenv/config.ini

[tool.uv.workspace]
members = [
"python-objectstore-client",
]

[dependency-groups]
dev = ["devservices>=1.2.2"]
dev = [
"devservices>=1.2.2",
"pytest>=8.3.3",
"mypy>=1.17.1",
"ruff>=0.14.2",
Comment on lines +17 to +19
Copy link
Member Author

@lcian lcian Oct 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These could be moved to the subdir with no problem as our uv sync would take care of installing them anyway.
The annoyance still stands with their configuration though (see comment below).
I just put them here as to me it makes sense to have tool + version + configuration in the same file.

"pre-commit>=4.2.0",
]

[tool.ruff.lint]
select = ["E", "F", "I", "UP"] # pycodestyle, pyflakes, isort, pyupgrade

[tool.mypy]
no_implicit_reexport = true
warn_unreachable = true
warn_redundant_casts = true
local_partial_types = true
disallow_any_generics = true
disallow_untyped_defs = true
warn_unused_configs = true
10 changes: 0 additions & 10 deletions python-objectstore-client/.gitignore

This file was deleted.

23 changes: 22 additions & 1 deletion python-objectstore-client/README.md
Original file line number Diff line number Diff line change
@@ -1 +1,22 @@
# objectstore-client
# Objectstore Client

## Usage

TODO

## Development

### Environment Setup

The considerations for setting up the development environment that can be found in the main [README](../README.md) apply for this package as well.

### Pre-commit hook

A configuration to set up a git pre-commit hook using [pre-commit](https://github.com/pre-commit/pre-commit) is available at the root of the repository.

To install it, run
```sh
pre-commit install
```

The hook will automatically run some checks before every commit, including the linters and formatters we run in CI.
4 changes: 2 additions & 2 deletions python-objectstore-client/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ name = "objectstore-client"
version = "0.1.0"
description = "Python client for the Sentry Objectstore service"
readme = "README.md"
requires-python = ">=3.11.11"
requires-python = ">=3.13.1"
dependencies = []

[build-system]
requires = ["uv_build==0.9.3"] # must match the version specified in devenv/config.ini
requires = ["uv_build"]
build-backend = "uv_build"
4 changes: 4 additions & 0 deletions python-objectstore-client/tests/test_smoke.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
def test_imports() -> None:
import objectstore_client

_ = objectstore_client
312 changes: 275 additions & 37 deletions uv.lock

Large diffs are not rendered by default.