From 449564ccce5a435ac3f19aa42bbc762e2a09433f Mon Sep 17 00:00:00 2001 From: Evan Stoll Date: Sun, 14 Nov 2021 16:44:24 -0500 Subject: [PATCH 1/3] pythonPackages.allure-python-commons-test: init at 2.9.45 --- .../allure-python-commons-test/default.nix | 45 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 47 insertions(+) create mode 100644 pkgs/development/python-modules/allure-python-commons-test/default.nix diff --git a/pkgs/development/python-modules/allure-python-commons-test/default.nix b/pkgs/development/python-modules/allure-python-commons-test/default.nix new file mode 100644 index 000000000000..3c43e698b8e7 --- /dev/null +++ b/pkgs/development/python-modules/allure-python-commons-test/default.nix @@ -0,0 +1,45 @@ +{ lib +, fetchPypi +, buildPythonPackage +, pythonOlder +, attrs +, pluggy +, six +, pyhamcrest +, setuptools-scm +, python +}: + +buildPythonPackage rec { + pname = "allure-python-commons-test"; + version = "2.9.45"; + + disabled = pythonOlder "3.4"; + + src = fetchPypi { + inherit pname version; + sha256 = "0rn8ccxxrm27skv3avdiw56zc4fk2h7nrk3jamqmx6fnvmshiz5f"; + }; + + nativeBuildInputs = [ + setuptools-scm + ]; + + propagatedBuildInputs = [ attrs pluggy six pyhamcrest ]; + + checkPhase = '' + ${python.interpreter} -m doctest ./src/container.py + ${python.interpreter} -m doctest ./src/report.py + ${python.interpreter} -m doctest ./src/label.py + ${python.interpreter} -m doctest ./src/result.py + ''; + + pythonImportsCheck = [ "allure_commons_test" ]; + + meta = with lib; { + description = "Just pack of hamcrest matchers for validation result in allure2 json format"; + homepage = "https://github.com/allure-framework/allure-python"; + license = licenses.asl20; + maintainers = with maintainers; [ evanjs ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index a6abc29d1357..269a3858103f 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -431,6 +431,8 @@ in { allpairspy = callPackage ../development/python-modules/allpairspy { }; + allure-python-commons-test = callPackage ../development/python-modules/allure-python-commons-test { }; + alot = callPackage ../development/python-modules/alot { }; alpha-vantage = callPackage ../development/python-modules/alpha-vantage { }; From 5a13ad11ee26387448ddebc1e5d691be37ae8695 Mon Sep 17 00:00:00 2001 From: Evan Stoll Date: Sun, 14 Nov 2021 16:51:12 -0500 Subject: [PATCH 2/3] pythonPackages.allure-python-commons: init at 2.9.45 --- .../allure-python-commons/default.nix | 43 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 45 insertions(+) create mode 100644 pkgs/development/python-modules/allure-python-commons/default.nix diff --git a/pkgs/development/python-modules/allure-python-commons/default.nix b/pkgs/development/python-modules/allure-python-commons/default.nix new file mode 100644 index 000000000000..56eb0bbf55ed --- /dev/null +++ b/pkgs/development/python-modules/allure-python-commons/default.nix @@ -0,0 +1,43 @@ +{ lib +, fetchPypi +, buildPythonPackage +, pythonOlder +, attrs +, pluggy +, six +, allure-python-commons-test +, setuptools-scm +, python +}: + +buildPythonPackage rec { + pname = "allure-python-commons"; + version = "2.9.45"; + + disabled = pythonOlder "3.4"; + + src = fetchPypi { + inherit pname version; + sha256 = "17alymsivw8fs89j6phbqgrbprasw8kj72kxa5y8qpn3xa5d4f62"; + }; + + nativeBuildInputs = [ + setuptools-scm + ]; + + propagatedBuildInputs = [ attrs pluggy six allure-python-commons-test ]; + + checkPhase = '' + ${python.interpreter} -m doctest ./src/utils.py + ${python.interpreter} -m doctest ./src/mapping.py + ''; + + pythonImportsCheck = [ "allure" "allure_commons" ]; + + meta = with lib; { + description = "Common engine for all modules. It is useful for make integration with your homemade frameworks"; + homepage = "https://github.com/allure-framework/allure-python"; + license = licenses.asl20; + maintainers = with maintainers; [ evanjs ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 269a3858103f..029f9c202b25 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -431,6 +431,8 @@ in { allpairspy = callPackage ../development/python-modules/allpairspy { }; + allure-python-commons = callPackage ../development/python-modules/allure-python-commons { }; + allure-python-commons-test = callPackage ../development/python-modules/allure-python-commons-test { }; alot = callPackage ../development/python-modules/alot { }; From 17444e7a7643a285923f43f422af2afd8bc05a12 Mon Sep 17 00:00:00 2001 From: Evan Stoll Date: Sun, 14 Nov 2021 16:52:39 -0500 Subject: [PATCH 3/3] pythonPackages.allure-pytest: init at 2.9.45 --- .../python-modules/allure-pytest/default.nix | 80 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 82 insertions(+) create mode 100644 pkgs/development/python-modules/allure-pytest/default.nix diff --git a/pkgs/development/python-modules/allure-pytest/default.nix b/pkgs/development/python-modules/allure-pytest/default.nix new file mode 100644 index 000000000000..49b5f683a6b4 --- /dev/null +++ b/pkgs/development/python-modules/allure-pytest/default.nix @@ -0,0 +1,80 @@ +{ lib +, fetchPypi +, buildPythonPackage +, six +, pythonOlder +, allure-python-commons +, pytest +, pytestCheckHook +, pytest-check +, pytest-flakes +, pytest-lazy-fixture +, pytest-rerunfailures +, pytest-xdist +, pyhamcrest +, mock +, setuptools-scm +}: + +buildPythonPackage rec { + pname = "allure-pytest"; + version = "2.9.45"; + + disabled = pythonOlder "3.4"; + + src = fetchPypi { + inherit pname version; + sha256 = "18ys5gi64jlfya6a7shj5lqhwc6cplwgyq3s2n5mg5x513g0yqi0"; + }; + + buildInputs = [ + pytest + ]; + + nativeBuildInputs = [ + setuptools-scm + ]; + + pythonImportsCheck = [ "allure_pytest" ]; + + propagatedBuildInputs = [ + allure-python-commons + six + ]; + + checkInputs = [ + pyhamcrest + mock + pytestCheckHook + pytest-check + pytest-flakes + pytest-lazy-fixture + pytest-rerunfailures + pytest-xdist + ]; + + pytestFlagsArray = [ + "--basetemp" + "$(mktemp -d)" + "--alluredir" + "$(mktemp -d allure-results.XXXXXXX)" + "-W" + "ignore::pytest.PytestExperimentalApiWarning" + "-p" + "pytester" + ]; + + # we are skipping some of the integration tests for now + disabledTests = [ + "test_pytest_check" + "test_pytest_check_example" + "test_select_by_testcase_id_test" + ]; + + meta = with lib; { + description = "Allure pytest integration. It's developed as pytest plugin and distributed via pypi"; + homepage = "https://github.com/allure-framework/allure-python"; + license = licenses.asl20; + maintainers = with maintainers; [ evanjs ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 029f9c202b25..46ee261b7327 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -435,6 +435,8 @@ in { allure-python-commons-test = callPackage ../development/python-modules/allure-python-commons-test { }; + allure-pytest = callPackage ../development/python-modules/allure-pytest { }; + alot = callPackage ../development/python-modules/alot { }; alpha-vantage = callPackage ../development/python-modules/alpha-vantage { };