From 9223fdbd6db97956966810b8445f066f29bb16c0 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 2 Jul 2023 13:18:54 +0200 Subject: [PATCH 1/3] python311Packages.dirty-equals: add changelog to meta --- pkgs/development/python-modules/dirty-equals/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/development/python-modules/dirty-equals/default.nix b/pkgs/development/python-modules/dirty-equals/default.nix index 50f4b03123a3..6063f98166e2 100644 --- a/pkgs/development/python-modules/dirty-equals/default.nix +++ b/pkgs/development/python-modules/dirty-equals/default.nix @@ -42,6 +42,7 @@ buildPythonPackage rec { meta = with lib; { description = "Module for doing dirty (but extremely useful) things with equals"; homepage = "https://github.com/samuelcolvin/dirty-equals"; + changelog = "https://github.com/samuelcolvin/dirty-equals/releases/tag/v${version}"; license = with licenses; [ mit ]; maintainers = with maintainers; [ fab ]; }; From eade7923a0823c7367ba2da594331e99d4a4e271 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 2 Jul 2023 16:08:42 +0200 Subject: [PATCH 2/3] python311Packages.pytest-examples: init at 0.0.9 --- .../pytest-examples/default.nix | 66 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 68 insertions(+) create mode 100644 pkgs/development/python-modules/pytest-examples/default.nix diff --git a/pkgs/development/python-modules/pytest-examples/default.nix b/pkgs/development/python-modules/pytest-examples/default.nix new file mode 100644 index 000000000000..37e7c2fe6bfe --- /dev/null +++ b/pkgs/development/python-modules/pytest-examples/default.nix @@ -0,0 +1,66 @@ +{ lib +, black +, buildPythonPackage +, fetchFromGitHub +, hatchling +, pytest +, pytestCheckHook +, pythonOlder +, pythonRelaxDepsHook +, ruff +}: + +buildPythonPackage rec { + pname = "pytest-examples"; + version = "0.0.9"; + format = "pyproject"; + + disabled = pythonOlder "3.8"; + + src = fetchFromGitHub { + owner = "pydantic"; + repo = "pytest-examples"; + rev = "refs/tags/v${version}"; + hash = "sha256-ecxSLbPnHdL60vlc7EjKmw5rATTePqJCa5QIdyxevv0="; + }; + + postPatch = '' + # ruff binary is used directly, the ruff Python package is not needed + substituteInPlace pytest_examples/lint.py \ + --replace "'ruff'" "'${ruff}/bin/ruff'" + ''; + + pythonRemoveDeps = [ + "ruff" + ]; + + nativeBuildInputs = [ + hatchling + pythonRelaxDepsHook + ]; + + buildInputs = [ + pytest + ]; + + propagatedBuildInputs = [ + black + ruff + ]; + + nativeCheckInputs = [ + pytestCheckHook + ]; + + pythonImportsCheck = [ + "pytest_examples" + ]; + + meta = with lib; { + description = "Pytest plugin for testing examples in docstrings and markdown files"; + homepage = "https://github.com/pydantic/pytest-examples"; + changelog = "https://github.com/pydantic/pytest-examples/releases/tag/v${version}"; + license = licenses.mit; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 9987879dca20..14c83e485afe 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -9715,6 +9715,8 @@ self: super: with self; { pytest-error-for-skips = callPackage ../development/python-modules/pytest-error-for-skips { }; + pytest-examples = callPackage ../development/python-modules/pytest-examples { }; + pytest-expect = callPackage ../development/python-modules/pytest-expect { }; pytest-factoryboy = callPackage ../development/python-modules/pytest-factoryboy { }; From 9fb920443c849adb84167f0b89652591503b2ad2 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 2 Jul 2023 16:10:20 +0200 Subject: [PATCH 3/3] python311Packages.dirty-equals: 0.5.0 -> 0.6.0 Diff: https://github.com/samuelcolvin/dirty-equals/compare/refs/tags/v0.5.0...v0.6.0 Changelog: https://github.com/samuelcolvin/dirty-equals/releases/tag/v0.6.0 --- .../python-modules/dirty-equals/default.nix | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/pkgs/development/python-modules/dirty-equals/default.nix b/pkgs/development/python-modules/dirty-equals/default.nix index 6063f98166e2..a7195fcee166 100644 --- a/pkgs/development/python-modules/dirty-equals/default.nix +++ b/pkgs/development/python-modules/dirty-equals/default.nix @@ -2,24 +2,25 @@ , buildPythonPackage , fetchFromGitHub , hatchling +, pydantic +, pytest-examples , pytestCheckHook , pythonOlder , pytz -, typing-extensions }: buildPythonPackage rec { pname = "dirty-equals"; - version = "0.5.0"; + version = "0.6.0"; format = "pyproject"; - disabled = pythonOlder "3.7"; + disabled = pythonOlder "3.8"; src = fetchFromGitHub { owner = "samuelcolvin"; repo = pname; rev = "refs/tags/v${version}"; - hash = "sha256-yYptO6NPhQRlF0T2eXliw2WBms9uqTZVzdYzGj9pCug="; + hash = "sha256-j+EqsKVRG2DDka1G3Px8ExYZt8QkqHkhojRnAHObdR4="; }; nativeBuildInputs = [ @@ -28,10 +29,11 @@ buildPythonPackage rec { propagatedBuildInputs = [ pytz - typing-extensions ]; nativeCheckInputs = [ + pydantic + pytest-examples pytestCheckHook ];