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
16 changes: 8 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ BIN := .tmp/bin
export PATH := $(BIN):$(PATH)
export GOBIN := $(abspath $(BIN))
export PYTHONPATH ?= gen
CONFORMANCE_ARGS ?= --strict_message --expected_failures=tests/conformance/nonconforming.yaml --timeout 10s
CONFORMANCE_ARGS ?= --strict_message --expected_failures=test/conformance/nonconforming.yaml --timeout 10s
ADD_LICENSE_HEADER := $(BIN)/license-header \
--license-type apache \
--copyright-holder "Buf Technologies, Inc." \
Expand All @@ -20,7 +20,7 @@ PROTOVALIDATE_VERSION ?= v0.14.0
# Version of the cel-spec that this implementation is conformant with
# This should be kept in sync with the version in format_test.py
CEL_SPEC_VERSION ?= v0.24.0
TESTDATA_FILE := tests/testdata/string_ext_$(CEL_SPEC_VERSION).textproto
TESTDATA_FILE := test/testdata/string_ext_$(CEL_SPEC_VERSION).textproto

.PHONY: help
help: ## Describe useful make targets
Expand All @@ -46,22 +46,22 @@ generate: $(BIN)/buf $(BIN)/license-header ## Regenerate code and license header
.PHONY: format
format: install $(BIN)/license-header ## Format code
$(ADD_LICENSE_HEADER)
uv run -- ruff format protovalidate tests
uv run -- ruff check --fix protovalidate tests
uv run -- ruff format protovalidate test
uv run -- ruff check --fix protovalidate test

.PHONY: test
test: generate install gettestdata ## Run unit tests
uv run -- pytest
uv run -- python -m unittest

.PHONY: conformance
conformance: $(BIN)/protovalidate-conformance generate install ## Run conformance tests
protovalidate-conformance $(CONFORMANCE_ARGS) uv -- run python3 -m tests.conformance.runner
protovalidate-conformance $(CONFORMANCE_ARGS) uv -- run python3 -m test.conformance.runner

.PHONY: lint
lint: install ## Lint code
uv run -- ruff format --check --diff protovalidate tests
uv run -- ruff format --check --diff protovalidate test
uv run -- mypy protovalidate
uv run -- ruff check protovalidate tests
uv run -- ruff check protovalidate test
uv sync --locked

.PHONY: install
Expand Down
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ Issues = "https://github.com/bufbuild/protovalidate-python/issues"

[dependency-groups]
dev = [
"pytest",
"mypy",
"ruff",
"types-protobuf==6.30.2.20250503",
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions tests/format_test.py → test/test_format.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,9 @@ class TestFormat(unittest.TestCase):
@classmethod
def setUpClass(cls):
# The test data from the cel-spec conformance tests
cel_test_data = load_test_data(f"tests/testdata/string_ext_{CEL_SPEC_VERSION}.textproto")
cel_test_data = load_test_data(f"test/testdata/string_ext_{CEL_SPEC_VERSION}.textproto")
# Our supplemental tests of functionality not in the cel conformance file, but defined in the spec.
supplemental_test_data = load_test_data("tests/testdata/string_ext_supplemental.textproto")
supplemental_test_data = load_test_data("test/testdata/string_ext_supplemental.textproto")

# Combine the test data from both files into one
sections = cel_test_data.section
Expand Down
File renamed without changes.
File renamed without changes.
64 changes: 0 additions & 64 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.