Skip to content
Closed
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
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,10 @@ repos:
language: system
types: [yaml]

- id: nixpkg-fmt
- id: nixfmt
name: Format *.nix
description: Format nix files.
entry: nixpkgs-fmt
entry: nixfmt
language: system
files: .*\.nix
types: [non-executable, file, text]
33 changes: 9 additions & 24 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,28 +1,13 @@
# Convenience makefile to build the dev env and run common commands
# Based on https://github.com/niteoweb/Makefile

PYTHON ?= python3.12

.PHONY: all
all: tests

# Lock version pins for Python dependencies
.PHONY: lock
lock:
@rm -rf .venv/
@poetry lock --no-update
@rm -rf .venv/
@nix-shell --run true
@direnv reload
@cat pyproject.toml \
| sed 's/openapi-core = ">=/openapi-core = "==/g' \
| sed 's/pyramid = ">=/pyramid = "==/g' \
> py310/pyproject.toml
@rm -rf .venv/
@poetry lock --no-update --directory py310
@rm -rf .venv/
@nix-shell --run true
@direnv reload
@uv lock

# Testing and linting targets
all = false
Expand All @@ -34,23 +19,23 @@ lint:
# 3. get all untracked files
# 4. run pre-commit checks on them
ifeq ($(all),true)
@pre-commit run --hook-stage push --all-files
@uv run pre-commit run --hook-stage push --all-files
else
@{ git diff --name-only ./; git diff --name-only --staged ./;git ls-files --other --exclude-standard; } \
| sort -u | uniq | xargs pre-commit run --hook-stage push --files
| sort -u | uniq | xargs uv run pre-commit run --hook-stage push --files
endif

.PHONY: type
type: types

.PHONY: types
types: .
@mypy examples/todoapp
@uv run mypy examples/todoapp
@cat ./typecov/linecount.txt
@typecov 100 ./typecov/linecount.txt
@mypy pyramid_openapi3
@uv run typecov 100 ./typecov/linecount.txt
@uv run mypy pyramid_openapi3
@cat ./typecov/linecount.txt
@typecov 100 ./typecov/linecount.txt
@uv run typecov 100 ./typecov/linecount.txt


# anything, in regex-speak
Expand Down Expand Up @@ -82,9 +67,9 @@ endif
.PHONY: unit
unit:
ifndef path
@$(PYTHON) -m pytest pyramid_openapi3 $(verbosity) $(full_suite_args) $(pytest_args)
@uv run pytest pyramid_openapi3 $(verbosity) $(full_suite_args) $(pytest_args)
else
@$(PYTHON) -m pytest $(path)
@uv run pytest $(path)
endif

.PHONY: test
Expand Down
2,255 changes: 0 additions & 2,255 deletions poetry.lock

This file was deleted.

2 changes: 0 additions & 2 deletions poetry.toml

This file was deleted.

2,181 changes: 0 additions & 2,181 deletions py310/poetry.lock

This file was deleted.

113 changes: 0 additions & 113 deletions py310/pyproject.toml

This file was deleted.

113 changes: 57 additions & 56 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
[tool.poetry]
[project]
name = "pyramid_openapi3"
version = "0.21.0"
description = "Pyramid addon for OpenAPI3 validation of requests and responses."
readme = "README.md"
license = "MIT"
authors = [
"Neyts Zupan",
"Domen Kozar"
{ name = "Neyts Zupan" },
{ name = "Domen Kozar" },
]
license = "MIT"
repository = "https://github.com/Pylons/pyramid_openapi3"
keywords = ["pyramid", "openapi3", "openapi", "rest", "restful"]
classifiers = [
"Development Status :: 4 - Beta",
Expand All @@ -17,62 +16,64 @@ classifiers = [
"Topic :: Internet :: WWW/HTTP",
"Topic :: Software Development :: Libraries :: Python Modules",
]
packages = [
{ include = "pyramid_openapi3", from = "." },
requires-python = ">=3.10"
dependencies = [
"openapi-core>=0.19.1,<0.20",
"pyramid>=1.10.7",
]
exclude = ["pyramid_openapi3/tests/"]


[tool.poetry.dependencies]
python = "^3.10"

openapi-core = ">=0.19.1"
pyramid = ">=1.10.7"

[project.urls]
Repository = "https://github.com/Pylons/pyramid_openapi3"

[tool.poetry.dev-dependencies]
autoflake = "*"
black = "*"
codespell = "*"
coverage = "*"
docutils = "*"
flake8 = "*"
flake8-assertive = "*"
flake8-blind-except = "*"
flake8-bugbear = "*"
flake8-builtins = "*"
flake8-comprehensions = "*"
flake8-debugger = "*"
flake8-deprecated = "*"
flake8-docstrings = "*"
flake8-ensure-ascii = "*"
flake8-plone-hasattr = "*"
flake8-print = "*"
flake8-self = "*"
flake8-super-call = "*"
flake8-tuple = "*"
isort = "*"
mccabe = "*"
more-itertools = "*"
mypy = "<1.19" # 1.19+ pulls librt, whose riscv64 wheels break poetry2nix
pdbpp = "*"
pre-commit = "*"
pre-commit-hooks = "*"
pytest = "*"
pytest-cov = "*"
pytest-instafail = "*"
pytest-randomly = "*"
pytest-socket = "*"
pyupgrade = "*"
typecov = "*"
types-pytest-lazy-fixture = "*"
webtest = "*"
yamllint = "*"

[dependency-groups]
dev = [
"autoflake",
"black",
"codespell",
"coverage",
"docutils",
"flake8",
"flake8-assertive",
"flake8-blind-except",
"flake8-bugbear",
"flake8-builtins",
"flake8-comprehensions",
"flake8-debugger",
"flake8-deprecated",
"flake8-docstrings",
"flake8-ensure-ascii",
"flake8-plone-hasattr",
"flake8-print",
"flake8-self",
"flake8-super-call",
"flake8-tuple",
"isort",
"mccabe",
"more-itertools",
"mypy",
"pdbpp",
"pre-commit",
"pre-commit-hooks",
"pytest",
"pytest-cov",
"pytest-instafail",
"pytest-randomly",
"pytest-socket",
"pyupgrade",
"typecov",
"types-pytest-lazy-fixture",
"webtest",
"yamllint",
]

[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
requires = ["uv_build>=0.9.30,<0.10.0"]
build-backend = "uv_build"

[tool.uv.build-backend]
module-name = "pyramid_openapi3"
module-root = ""
source-exclude = ["pyramid_openapi3/tests"]


[tool.autoflake]
Expand Down
Loading
Loading