diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 627d951..7184dfc 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -19,8 +19,12 @@ git clone git@github.com:bufbuild/protovalidate-python.git cd protovalidate-python ``` -Then, make any changes you'd like. We use a Makefile to test and lint our code, -so you'll need a few non-Python tools: +Next, install dependencies. You will need: + +* Python >=v3.9 +* [Pipenv](https://pipenv.pypa.io/en/latest/index.html) + +We use a Makefile to test and lint our code, so you'll also need a few non-Python tools: * GNU Make (to use the Makefile): part of the `build-essential` package on Debian-derived Linux distributions (including Ubuntu), and part of diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index e1c012d..8dd4a7c 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -32,6 +32,8 @@ jobs: uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} + cache: "pipenv" + - run: ${{steps.python.outputs.python-path}} -m pip install --upgrade pip pipenv - name: Execute tests run: make test PYTHON=${{ steps.python.outputs.python-path }} - name: Lint diff --git a/.github/workflows/conformance.yaml b/.github/workflows/conformance.yaml index e6f2178..6102076 100644 --- a/.github/workflows/conformance.yaml +++ b/.github/workflows/conformance.yaml @@ -32,5 +32,7 @@ jobs: uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} + cache: "pipenv" + - run: ${{steps.python.outputs.python-path}} -m pip install --upgrade pip pipenv - name: Test conformance run: make conformance PYTHON=${{ steps.python.outputs.python-path }} diff --git a/Makefile b/Makefile index a96320b..f5bc54e 100644 --- a/Makefile +++ b/Makefile @@ -62,7 +62,6 @@ lint: install ## Lint code .PHONY: install install: ## Install dependencies - $(PYTHON) -m pip install --upgrade pip pipenv pipenv --python $(PYTHON) sync --dev .PHONY: checkgenerate diff --git a/Pipfile b/Pipfile index 0163de0..e8d4884 100644 --- a/Pipfile +++ b/Pipfile @@ -11,7 +11,7 @@ protobuf = "==6.*" pytest = "*" mypy = "*" ruff = "*" -types-protobuf = "*" +types-protobuf = "==6.30.2.20250503" exceptiongroup = "*" tomli = "*" diff --git a/Pipfile.lock b/Pipfile.lock index a92ddd1..1f812aa 100644 --- a/Pipfile.lock +++ b/Pipfile.lock @@ -1,7 +1,7 @@ { "_meta": { "hash": { - "sha256": "2244230d5507f6a004047e0856c65eea89ab850a6932e9a2e96f63511b32a3ff" + "sha256": "f546975999f17cdad6eecce592ae22a1710abe4959bc3757e67e3fdd581548ae" }, "pipfile-spec": 6, "requires": { @@ -141,11 +141,11 @@ }, "types-pyyaml": { "hashes": [ - "sha256:7f07622dbd34bb9c8b264fe860a17e0efcad00d50b5f27e93984909d9363498c", - "sha256:fa4d32565219b68e6dee5f67534c722e53c00d1cfc09c435ef04d7353e1e96e6" + "sha256:652348fa9e7a203d4b0d21066dfb00760d3cbd5a15ebb7cf8d33c88a49546681", + "sha256:d7c13c3e6d335b6af4b0122a01ff1d270aba84ab96d1a1a1063ecba3e13ec075" ], - "markers": "python_version >= '3.8'", - "version": "==6.0.12.20241230" + "markers": "python_version >= '3.9'", + "version": "==6.0.12.20250402" } }, "develop": { @@ -160,11 +160,11 @@ }, "iniconfig": { "hashes": [ - "sha256:2d91e135bf72d31a410b17c16da610a82cb55f6b0477d1a902134b24a455b8b3", - "sha256:b6a85871a79d2e3b22d2d1b94ac2824226a63c6b741c88f7ae975f18b6778374" + "sha256:3abbd2e30b36733fee78f9c7f7308f2d0050e88f0087fd25c2645f63c773e1c7", + "sha256:9deba5723312380e77435581c6bf4935c94cbfab9b1ed33ef8d238ea168eb760" ], - "markers": "python_version >= '3.7'", - "version": "==2.0.0" + "markers": "python_version >= '3.8'", + "version": "==2.1.0" }, "mypy": { "hashes": [ @@ -207,19 +207,19 @@ }, "mypy-extensions": { "hashes": [ - "sha256:4392f6c0eb8a5668a69e23d168ffa70f0be9ccfd32b5cc2d26a34ae5b844552d", - "sha256:75dbf8955dc00442a438fc4d0666508a9a97b6bd41aa2f0ffe9d2f2725af0782" + "sha256:1be4cccdb0f2482337c4743e60421de3a356cd97508abadd57d47403e94f5505", + "sha256:52e68efc3284861e772bbcd66823fde5ae21fd2fdb51c62a211403730b916558" ], - "markers": "python_version >= '3.5'", - "version": "==1.0.0" + "markers": "python_version >= '3.8'", + "version": "==1.1.0" }, "packaging": { "hashes": [ - "sha256:09abb1bccd265c01f4a3aa3f7a7db064b36514d2cba19a2f694fe6150451a759", - "sha256:c228a6dc5e932d346bc5739379109d49e8853dd8223571c7c5b55260edc0b97f" + "sha256:29572ef2b1f17581046b3a2227d5c611fb25ec70ca1ba8554b24b0e69331a484", + "sha256:d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f" ], "markers": "python_version >= '3.8'", - "version": "==24.2" + "version": "==25.0" }, "pluggy": { "hashes": [ @@ -313,11 +313,11 @@ }, "typing-extensions": { "hashes": [ - "sha256:04e5ca0351e0f3f85c6853954072df659d0d13fac324d0072316b67d7794700d", - "sha256:1a7ead55c7e559dd4dee8856e3a88b41225abfe1ce8df57b7c13915fe121ffb8" + "sha256:a439e7c04b49fec3e5d3e2beaa21755cadbbdc391694e28ccdd36ca4a1408f8c", + "sha256:e6c81219bd689f51865d9e372991c540bda33a0379d5573cddb9a3a23f7caaef" ], "markers": "python_version >= '3.8'", - "version": "==4.12.2" + "version": "==4.13.2" } } } diff --git a/pyproject.toml b/pyproject.toml index ac8554a..883d40e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,7 +6,8 @@ build-backend = "hatchling.build" name = "protovalidate" description = "Protocol Buffer Validation for Python" readme = "README.md" -license = { file = "LICENSE" } +license-expression = "Apache 2.0" +license-file = "LICENSE" keywords = ["validate", "protobuf", "protocol buffer"] requires-python = ">=3.9" classifiers = [ @@ -15,7 +16,6 @@ classifiers = [ "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", - "License :: OSI Approved :: Apache Software License", "Operating System :: OS Independent", "Typing :: Typed", ]