Skip to content

Commit

Permalink
improve exception message for response validation error.
Browse files Browse the repository at this point in the history
  • Loading branch information
flask-pro committed Sep 2, 2024
1 parent 4ae715f commit 030634f
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 19 deletions.
31 changes: 20 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,16 +1,25 @@
VENV_DIR = venv
PYTHON = python3.12
PIP = $(VENV_DIR)/bin/pip
PYTHON_VENV = $(VENV_DIR)/bin/python
TOX = $(VENV_DIR)/bin/tox
PRE_COMMIT = $(VENV_DIR)/bin/pre-commit


.PHONY: venv test tox format clean build install upload_to_testpypi upload_to_pypi all


venv:
venv: venv/pyvenv.cfg $(PKG_DIR)
# Create virtual environment.
python3.12 -m venv venv
./venv/bin/pip3 -q install --upgrade pip setuptools wheel
./venv/bin/pip3 -q install -e ".[dev]"
./venv/bin/pip3 -q install -e .

venv/pyvenv.cfg: pyproject.toml $(PKG_DIR)
$(PYTHON) -m venv $(VENV_DIR)
$(PIP) -q install --upgrade pip wheel
$(PIP) -q install -e ".[dev]" && $(PIP) -q install -e .

format: venv
# Run checking and formatting sources.
./venv/bin/pre-commit run -a
$(PRE_COMMIT) run -a

test: venv
# Run pytest.
Expand All @@ -19,22 +28,22 @@ test: venv

tox: venv
# Testing project via several Python versions.
./venv/bin/tox
$(TOX)

clean:
rm -rf dist/
rm -rf src/Flask_First.egg-info

build: clean venv
./venv/bin/python3 -m build
$(PYTHON_VENV) -m build

install: build
./venv/bin/pip install dist/Flask-First-*.tar.gz
$(PIP) install dist/Flask-First-*.tar.gz

upload_to_testpypi: build
./venv/bin/python3 -m twine upload --repository testpypi dist/*
$(PYTHON_VENV) -m twine upload --repository testpypi dist/*

upload_to_pypi: build
./venv/bin/python3 -m twine upload --repository pypi dist/*
$(PYTHON_VENV) -m twine upload --repository pypi dist/*

all: venv tox build
16 changes: 8 additions & 8 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,15 @@ version = "0.18.1"

[project.optional-dependencies]
dev = [
"bandit==1.7.7",
"build==1.1.1",
"mypy==1.8.0",
"pre-commit==3.6.2",
"pytest==8.1.2",
"pytest-cov==4.1.0",
"bandit==1.7.9",
"build==1.2.1",
"mypy==1.11.2",
"pre-commit==3.8.0",
"pytest==8.3.2",
"pytest-cov==5.0.0",
"python-dotenv==1.0.1",
"tox==4.13.0",
"twine==5.0.0"
"tox==4.18.0",
"twine==5.1.1"
]

[project.urls]
Expand Down

0 comments on commit 030634f

Please sign in to comment.