Skip to content
Merged
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
6 changes: 3 additions & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
fail-fast: false
steps:
- name: Checkout sources
Expand Down Expand Up @@ -41,12 +41,12 @@ jobs:

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
if: "matrix.python-version == '3.11'"
if: "matrix.python-version == '3.12'"
with:
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}

- name: Run pre-commit
if: "matrix.python-version == '3.11'"
if: "matrix.python-version == '3.12'"
run: |
uv run pre-commit run --all-files
25 changes: 10 additions & 15 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,43 +2,38 @@ default_language_version:
python: python3.12
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
rev: v6.0.0
hooks:
- id: check-toml
- id: check-yaml
- id: end-of-file-fixer
- id: mixed-line-ending
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.11.5
rev: v0.15.6
hooks:
- id: ruff
- id: ruff-check
args: [--fix, --exit-non-zero-on-fix]
- id: ruff-format
- repo: https://github.com/PyCQA/bandit
rev: 1.8.3
rev: 1.9.4
hooks:
- id: bandit
additional_dependencies:
- ".[toml]"
args: [--config=pyproject.toml]
- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks
rev: v2.14.0
hooks:
- id: pretty-format-toml
files: "^.*.toml"
args:
- "--autofix"

- repo: https://github.com/astral-sh/uv-pre-commit
# uv version.
rev: 0.9.6
rev: 0.10.9
hooks:
- id: uv-lock
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.44.0
rev: v0.47.0
hooks:
- id: markdownlint
exclude: ^(CHANGELOG.md)
args:
- "--disable=MD013"
- "--fix"
- repo: https://github.com/tox-dev/pyproject-fmt
rev: v2.18.1
hooks:
- id: pyproject-fmt
12 changes: 6 additions & 6 deletions docs/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@ Tests convert randomly generated data from protobuf to arrow and back, making su
The tests take a long time to run. To run them faster:

```shell
pytest --numprocesses=auto -p no:benchmark ./tests
uv run pytest --numprocesses=auto -p no:benchmark ./tests
```

To Get coverage:

```shell
coverage run --branch --include "./protarrow/*" -m pytest tests
coverage report --show-missing
uv run coverage run --branch --include "./protarrow/*" -m pytest tests
uv run coverage report --show-missing
```

## Generating the change log
Expand Down Expand Up @@ -63,13 +63,13 @@ The CI will deploy to pypi automatically from then.
## Testing the documentation

```shell
mkdocs serve --livereload --watch=./
uv run mkdocs serve --livereload --watch=./
```

## Updating dependencies

- For the repo `uv update`
- For the doc: `(cd docs/;uvx --from=pip pip-compile ./requirements.in > ./requirements.txt)`
- For the repo `uv lock --upgrade`
- For the doc: `(cd docs/;uv pip compile ./requirements.in > ./requirements.txt)`
- For pre-commit: `pre-commit autoupdate; pre-commit run --all-files`

## Resources
Expand Down
58 changes: 26 additions & 32 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,26 +1,20 @@
#
# This file is autogenerated by pip-compile with Python 3.12
# by the following command:
#
# pip-compile ./requirements.in
#
babel==2.17.0
# This file was autogenerated by uv via the following command:
# uv pip compile ./requirements.in
babel==2.18.0
# via mkdocs-material
backrefs==5.9
backrefs==6.2
# via mkdocs-material
certifi==2025.10.5
certifi==2026.2.25
# via requests
charset-normalizer==3.4.4
charset-normalizer==3.4.5
# via requests
click==8.3.0
click==8.3.1
# via mkdocs
colorama==0.4.6
# via
# griffe
# mkdocs-material
# via mkdocs-material
ghp-import==2.1.0
# via mkdocs
griffe==1.14.0
griffelib==2.0.0
# via mkdocstrings-python
idna==3.11
# via requests
Expand All @@ -29,7 +23,7 @@ jinja2==3.1.6
# mkdocs
# mkdocs-material
# mkdocstrings
markdown==3.10
markdown==3.10.2
# via
# markdown-include
# mkdocs
Expand All @@ -38,7 +32,7 @@ markdown==3.10
# mkdocstrings
# pymdown-extensions
markdown-include==0.8.1
# via -r requirements.in
# via -r ./requirements.in
markupsafe==3.0.3
# via
# jinja2
Expand All @@ -51,41 +45,41 @@ mergedeep==1.3.4
# mkdocs-get-deps
mkdocs==1.6.1
# via
# -r requirements.in
# -r ./requirements.in
# mkdocs-autorefs
# mkdocs-material
# mkdocstrings
mkdocs-autorefs==1.4.3
mkdocs-autorefs==1.4.4
# via
# mkdocstrings
# mkdocstrings-python
mkdocs-get-deps==0.2.0
mkdocs-get-deps==0.2.2
# via mkdocs
mkdocs-material==9.6.23
# via -r requirements.in
mkdocs-material==9.7.5
# via -r ./requirements.in
mkdocs-material-extensions==1.3.1
# via
# -r requirements.in
# -r ./requirements.in
# mkdocs-material
mkdocstrings[python]==0.30.1
mkdocstrings==1.0.3
# via
# -r requirements.in
# -r ./requirements.in
# mkdocstrings-python
mkdocstrings-python==1.18.2
mkdocstrings-python==2.0.3
# via mkdocstrings
packaging==25.0
packaging==26.0
# via mkdocs
paginate==0.5.7
# via mkdocs-material
pathspec==0.12.1
pathspec==1.0.4
# via mkdocs
platformdirs==4.5.0
platformdirs==4.9.4
# via mkdocs-get-deps
pygments==2.19.2
# via mkdocs-material
pymdown-extensions==10.16.1
pymdown-extensions==10.21
# via
# -r requirements.in
# -r ./requirements.in
# mkdocs-material
# mkdocstrings
python-dateutil==2.9.0.post0
Expand All @@ -102,7 +96,7 @@ requests==2.32.5
# via mkdocs-material
six==1.17.0
# via python-dateutil
urllib3==2.5.0
urllib3==2.6.3
# via requests
watchdog==6.0.0
# via mkdocs
106 changes: 46 additions & 60 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,81 +1,67 @@
[build-system]
build-backend = "hatchling.build"
requires = ["hatchling", "uv-dynamic-versioning"]

[dependency-groups]
dev = [
"Jinja2>=3.1.2",
"coverage>=6.5.0",
"flake8>=5.0.4",
"git-changelog>=2.2.0",
"grpcio-tools>=1.46.0",
"inflection>=0.5.1",
"isort>=5.10.1",
"mkdocs>=1.4.2",
"mkdocs-material>=9.0.3",
"mkdocstrings[python]>=0.21.2",
"pip-tools>=6.12.1",
"pre-commit>=2.20.0",
"pylint>=2.15.0",
"pytest>=7.2.0",
"pytest-benchmark>=4.0.0",
"pytest-cov",
"pytest-xdist>=3.1.0",
"ruff"
]
requires = [ "hatchling", "uv-dynamic-versioning" ]

[project]
authors = [{name = "Tradewell Tech", email = "engineering@tradewelltech.co"}]
name = "protarrow"
description = "Convert from protobuf to arrow and back"
readme = "README.md"
keywords = [ "apache-arrow", "data", "protobuf" ]
license = "Apache-2.0"
maintainers = [ { name = "0x26res", email = "0x26res@gmail.com" } ]
authors = [ { name = "Tradewell Tech", email = "engineering@tradewelltech.co" } ]
requires-python = ">=3.9,<4"
classifiers = [
"Development Status :: 4 - Beta",
"License :: OSI Approved :: Apache Software License",
"Natural Language :: English",
"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"
]
dependencies = [
"googleapis-common-protos",
"protobuf",
"pyarrow"
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
]
description = "Convert from protobuf to arrow and back"
dynamic = [ "version" ]
dependencies = [ "googleapis-common-protos", "protobuf", "pyarrow" ]
urls."Bug Tracker" = "https://github.com/tradewelltech/protarrow/issues"
urls.Changelog = "https://github.com/tradewelltech/protarrow/blob/main/CHANGELOG.md"
documentation = "https://protarrow.readthedocs.io/en/latest/"
dynamic = ["version"]
keywords = ["apache-arrow", "protobuf", "data"]
license = "Apache-2.0"
maintainers = [{name = "0x26res", email = "0x26res@gmail.com"}]
name = "protarrow"
packages = [
{include = "protarrow"}
]
readme = "README.md"
packages = [ { include = "protarrow" } ]
repository = "https://github.com/tradewelltech/protarrow"
requires-python = ">=3.9,<4"

[project.urls]
"Bug Tracker" = "https://github.com/tradewelltech/protarrow/issues"
"Changelog" = "https://github.com/tradewelltech/protarrow/blob/main/CHANGELOG.md"

[tool.bandit]
skips = ["B101", "B311"]

[tool.hatch.build.hooks.version]
path = "protarrow/_version.py"
template = '''
version = "{version}"
'''
[dependency-groups]
dev = [
"coverage>=6.5",
"flake8>=5.0.4",
"git-changelog>=2.2",
"grpcio-tools>=1.46",
"inflection>=0.5.1",
"isort>=5.10.1",
"jinja2>=3.1.2",
"mkdocs>=1.4.2",
"mkdocs-material>=9.0.3",
"mkdocstrings[python]>=0.21.2",
"pip-tools>=6.12.1",
"pre-commit>=2.20",
"pylint>=2.15",
"pytest>=7.2",
"pytest-benchmark>=4",
"pytest-cov",
"pytest-xdist>=3.1",
"ruff"
]

[tool.hatch.version]
source = "uv-dynamic-versioning"
[tool.hatch]
build.hooks.version.path = "protarrow/_version.py"
build.hooks.version.template = """version = "{version}"
"""
version.source = "uv-dynamic-versioning"

[tool.ruff]
line-length = 88
lint.select = [ "C", "E", "F", "I", "PERF" ]

[tool.ruff.lint]
select = ["E", "F", "C", "I", "PERF"]

[tool.ruff.lint.isort]
known-first-party = ["protarrow", "protarrow_protos"]
[tool.bandit]
skips = [ "B101", "B311" ]
4 changes: 2 additions & 2 deletions tests/test_coverage.py
Original file line number Diff line number Diff line change
Expand Up @@ -517,14 +517,14 @@ def test_arrow_missing_function():
with pytest.raises(
pa.ArrowNotImplementedError,
match="DictionaryArray converter for type"
" dictionary\<values=large_string, indices=int32, ordered=0\> not implemented",
r" dictionary\<values=large_string, indices=int32, ordered=0\> not implemented",
):
pa.array([], pa.dictionary(pa.int32(), pa.large_string()))

with pytest.raises(
pa.ArrowNotImplementedError,
match="DictionaryArray converter for type"
" dictionary\<values=large_binary, indices=int32, ordered=0\> not implemented",
r" dictionary\<values=large_binary, indices=int32, ordered=0\> not implemented",
):
pa.array([], pa.dictionary(pa.int32(), pa.large_binary()))

Expand Down
Loading