diff --git a/scripts/benchmarks/requirements/pydantic.in b/scripts/benchmarks/requirements/pydantic.in new file mode 100644 index 000000000..0d4942440 --- /dev/null +++ b/scripts/benchmarks/requirements/pydantic.in @@ -0,0 +1,42 @@ +# Based on https://github.com/pydantic/pydantic/blob/1e32b011ed0ad260d0b94939ac84585ce0a229e1/pyproject.toml +# Replaced pydantic-core==2.11.0 with pydantic-core==2.10.1 to make it resolve because we lack the root pydantic from +# main here that exists when resolving the actual project +annotated-types>=0.4.0 +ansi2html +autoflake +cloudpickle +coverage[toml] +devtools +dirty-equals +email-validator>=2.0.0 +faker>=18.13.0 +greenlet>=3.0.0rc3 +importlib_metadata; python_version=='3.7' +mike @ git+https://github.com/jimporter/mike.git +mkdocs +mkdocs-embed-external-markdown +mkdocs-embed-external-markdown>=2.3.0 +mkdocs-exclude +mkdocs-material +mkdocs-redirects +mkdocs-simple-hooks +mkdocstrings-python +mypy +mypy~=1.1.1 +pydantic-core==2.10.1 +pydantic-extra-types @ git+https://github.com/pydantic/pydantic-extra-types.git@main +pydantic-settings>=2.0.0 +pydantic-settings>=2.0b1 +pytest +pytest-benchmark>=4.0.0 +pytest-examples +pytest-examples>=0.0.10 +pytest-memray; platform_system != 'Windows' +pytest-memray==1.5.0 +pytest-mock +pytest-pretty +pyupgrade +ruff==0.1.3 +sqlalchemy>=2.0,<3.0 +tomli +typing-extensions>=4.6.1 diff --git a/scripts/compare_with_pip.sh b/scripts/compare_with_pip.sh new file mode 100755 index 000000000..e4b085489 --- /dev/null +++ b/scripts/compare_with_pip.sh @@ -0,0 +1,17 @@ +#!/usr/bin/env bash + +# Compare the resolutions of pip(-tools) and puffin, e.g. +# ```bash +# scripts/compare_with_pip.sh scripts/benchmarks/requirements/pydantic.in +# ``` + +set -euo pipefail + +TEMPD=$(mktemp -d) + +# `| grep -v " *#"` to ignore the comment when diffing +time RUST_LOG=puffin=debug cargo run --bin puffin -- pip-compile ${1} | grep -v " *#" > $TEMPD/puffin.txt +# > WARNING: --strip-extras is becoming the default in version 8.0.0. To silence this warning, either use --strip-extras +# > to opt into the new default or use --no-strip-extras to retain the existing behavior. +time pip-compile --strip-extras -o - -q ${1} | grep -v " *#" > $TEMPD/pip-compile.txt +diff -u $TEMPD/pip-compile.txt $TEMPD/puffin.txt