lol

Merge pull request #163964 from yuuyins/strictdoc

strictdoc: init at 0.0.26

authored by

Sandro and committed by
GitHub
e59f65ca b2398812

+451
+15
pkgs/applications/science/engineering/strictdoc/conftest.py.patch
··· 1 + diff --git a/tests/unit/conftest.py b/tests/unit/conftest.py 2 + index 932747c..9b3d6ac 100644 3 + --- a/tests/unit/conftest.py 4 + +++ b/tests/unit/conftest.py 5 + @@ -1,9 +1,7 @@ 6 + import os 7 + import sys 8 + 9 + -STRICTDOC_ROOT_PATH = os.path.abspath( 10 + - os.path.join(__file__, "../../../../strictdoc") 11 + -) 12 + +STRICTDOC_ROOT_PATH = "@strictdoc_root_path@" 13 + assert os.path.exists(STRICTDOC_ROOT_PATH), "does not exist: {}".format( 14 + STRICTDOC_ROOT_PATH 15 + )
+100
pkgs/applications/science/engineering/strictdoc/default.nix
··· 1 + { lib 2 + , stdenv 3 + , buildPythonApplication 4 + , fetchFromGitHub 5 + , python3 6 + , pythonOlder 7 + , html5lib 8 + , invoke 9 + , openpyxl 10 + , poetry-core 11 + , tidylib 12 + , beautifulsoup4 13 + , dataclasses 14 + , datauri 15 + , docutils 16 + , jinja2 17 + , lxml 18 + , markupsafe 19 + , pygments 20 + , reqif 21 + , setuptools 22 + , textx 23 + , xlrd 24 + , XlsxWriter 25 + , pytestCheckHook 26 + }: 27 + 28 + buildPythonApplication rec { 29 + pname = "strictdoc"; 30 + version = "0.0.26"; 31 + format = "pyproject"; 32 + 33 + src = fetchFromGitHub { 34 + owner = "strictdoc-project"; 35 + repo = pname; 36 + rev = version; 37 + sha256 = "sha256-SMAwji75AjW8CzXRKBDF+fR/a5++GhgIvkcuD+a/vp4="; 38 + }; 39 + 40 + patches = [ 41 + ./conftest.py.patch 42 + ]; 43 + 44 + postPatch = '' 45 + substituteInPlace ./tests/unit/conftest.py \ 46 + --replace @strictdoc_root_path@ "${placeholder "out"}/${python3.sitePackages}/strictdoc" 47 + 48 + substituteInPlace requirements.txt \ 49 + --replace "jinja2 >= 2.11.2, <3.0" "jinja2 >= 2.11.2" \ 50 + --replace "reqif >= 0.0.18, == 0.*" "reqif>=0.0.8" \ 51 + --replace "==" ">=" \ 52 + --replace "~=" ">=" 53 + ''; 54 + 55 + nativeBuildInputs = [ 56 + html5lib 57 + invoke 58 + openpyxl 59 + poetry-core 60 + tidylib 61 + ]; 62 + 63 + propagatedBuildInputs = [ 64 + beautifulsoup4 65 + datauri 66 + docutils 67 + jinja2 68 + lxml 69 + markupsafe 70 + pygments 71 + reqif 72 + setuptools 73 + textx 74 + xlrd 75 + XlsxWriter 76 + ] ++ lib.optionals (pythonOlder "3.7") [ 77 + dataclasses 78 + ]; 79 + 80 + checkInputs = [ 81 + pytestCheckHook 82 + ]; 83 + 84 + pythonImportsCheck = [ 85 + "strictdoc" 86 + ]; 87 + 88 + disabledTests = [ 89 + # fixture 'fs' not found 90 + "test_001_load_from_files" 91 + ]; 92 + 93 + meta = with lib; { 94 + description = "Software requirements specification tool"; 95 + homepage = "https://github.com/strictdoc-project/strictdoc"; 96 + changelog = "https://github.com/strictdoc-project/strictdoc/releases"; 97 + license = licenses.asl20; 98 + maintainers = with maintainers; [ yuu ]; 99 + }; 100 + }
+37
pkgs/development/python-modules/datauri/default.nix
··· 1 + { lib 2 + , buildPythonPackage 3 + , fetchFromGitHub 4 + , pytestCheckHook 5 + }: 6 + 7 + buildPythonPackage rec { 8 + pname = "datauri"; 9 + version = "1.1.0"; 10 + 11 + src = fetchFromGitHub { 12 + owner = "fcurella"; 13 + repo = "python-datauri"; 14 + rev = "v${version}"; 15 + sha256 = "sha256-Eevd/xxKgxvvsAfI/L/KShH+PfxffBGyVwKewLgyEu0="; 16 + }; 17 + 18 + pythonImportsCheck = [ 19 + "datauri" 20 + ]; 21 + 22 + checkInputs = [ 23 + pytestCheckHook 24 + ]; 25 + 26 + disabledTestPaths = [ 27 + # UnicodeDecodeError: 'utf-8' codec can't decode 28 + "tests/test_file_ebcdic.txt" 29 + ]; 30 + 31 + meta = with lib; { 32 + description = "Data URI manipulation made easy."; 33 + homepage = "https://github.com/fcurella/python-datauri"; 34 + license = licenses.unlicense; 35 + maintainers = with maintainers; [ yuu ]; 36 + }; 37 + }
+60
pkgs/development/python-modules/reqif/default.nix
··· 1 + { lib 2 + , buildPythonPackage 3 + , python3 4 + , pythonOlder 5 + , fetchFromGitHub 6 + , poetry-core 7 + , beautifulsoup4 8 + , lxml 9 + , jinja2 10 + , dataclasses 11 + , pytestCheckHook 12 + }: 13 + 14 + buildPythonPackage rec { 15 + pname = "reqif"; 16 + version = "0.0.8"; 17 + format = "pyproject"; 18 + 19 + src = fetchFromGitHub { 20 + owner = "strictdoc-project"; 21 + repo = pname; 22 + rev = version; 23 + sha256 = "sha256-PtzRJUvv+Oee08+sdakFviKIhwfLngyal1WSWDtMELg="; 24 + }; 25 + 26 + postPatch = '' 27 + substituteInPlace ./tests/unit/conftest.py --replace \ 28 + "os.path.abspath(os.path.join(__file__, \"../../../../reqif\"))" \ 29 + "\"${placeholder "out"}/${python3.sitePackages}/reqif\"" 30 + substituteInPlace pyproject.toml --replace "^" ">=" 31 + substituteInPlace requirements.txt --replace "==" ">=" 32 + ''; 33 + 34 + nativeBuildInputs = [ 35 + poetry-core 36 + ]; 37 + 38 + propagatedBuildInputs = [ 39 + beautifulsoup4 40 + lxml 41 + jinja2 42 + ] ++ lib.optionals (pythonOlder "3.7") [ 43 + dataclasses 44 + ]; 45 + 46 + pythonImportsCheck = [ 47 + "reqif" 48 + ]; 49 + 50 + checkInputs = [ 51 + pytestCheckHook 52 + ]; 53 + 54 + meta = with lib; { 55 + description = "Python library for ReqIF format"; 56 + homepage = "https://github.com/strictdoc-project/reqif"; 57 + license = licenses.asl20; 58 + maintainers = with maintainers; [ yuu ]; 59 + }; 60 + }
+178
pkgs/development/python-modules/textx/default.nix
··· 1 + { lib 2 + , buildPythonPackage 3 + , python3 4 + , fetchFromGitHub 5 + , mkdocs 6 + , twine 7 + , arpeggio 8 + , click 9 + , future 10 + , setuptools 11 + , callPackage 12 + , gprof2dot 13 + , html5lib 14 + , jinja2 15 + , memory_profiler 16 + , psutil 17 + , pytestCheckHook 18 + }: 19 + 20 + let 21 + textx = buildPythonPackage rec { 22 + pname = "textx"; 23 + version = "3.0.0"; 24 + format = "setuptools"; 25 + 26 + src = fetchFromGitHub { 27 + owner = pname; 28 + repo = pname; 29 + rev = version; 30 + sha256 = "sha256-uZlO82dKtWQQR5+Q7dWk3+ZoUzAjDJ8qzC4UMLCtnBk="; 31 + }; 32 + 33 + postPatch = '' 34 + substituteInPlace setup.cfg --replace "click >=7.0, <8.0" "click >=7.0" 35 + ''; 36 + 37 + outputs = [ 38 + "out" 39 + "testout" 40 + ]; 41 + 42 + nativeBuildInputs = [ 43 + mkdocs 44 + twine 45 + ]; 46 + 47 + propagatedBuildInputs = [ 48 + arpeggio 49 + click 50 + future 51 + setuptools 52 + ]; 53 + 54 + postInstall = '' 55 + # FileNotFoundError: [Errno 2] No such file or directory: '$out/lib/python3.10/site-packages/textx/textx.tx 56 + cp "$src/textx/textx.tx" "$out/${python3.sitePackages}/${pname}/" 57 + 58 + # Install tests as the tests output. 59 + mkdir $testout 60 + cp -r tests $testout/tests 61 + ''; 62 + 63 + pythonImportsCheck = [ 64 + "textx" 65 + ]; 66 + 67 + # Circular dependencies, do tests in passthru.tests instead. 68 + doCheck = false; 69 + 70 + passthru.tests = { 71 + textxTests = callPackage ./tests.nix { 72 + inherit 73 + textx-data-dsl 74 + textx-example-project 75 + textx-flow-codegen 76 + textx-flow-dsl 77 + textx-types-dsl; 78 + }; 79 + }; 80 + 81 + meta = with lib; { 82 + description = "Domain-specific languages and parsers in Python"; 83 + homepage = "https://github.com/textx/textx/"; 84 + license = licenses.mit; 85 + maintainers = with maintainers; [ yuu ]; 86 + }; 87 + }; 88 + 89 + textx-data-dsl = buildPythonPackage rec { 90 + pname = "textx-data-dsl"; 91 + version = "1.0.0"; 92 + inherit (textx) src; 93 + # `format` isn't included in the output of `mk-python-derivation`. 94 + # So can't inherit format: `error: attribute 'format' missing`. 95 + format = "setuptools"; 96 + pathToSourceRoot = "tests/functional/registration/projects/data_dsl"; 97 + sourceRoot = "${src.name}/" + pathToSourceRoot; 98 + propagatedBuildInputs = [ 99 + textx 100 + textx-types-dsl 101 + ]; 102 + meta = with lib; { 103 + inherit (textx.meta) license maintainers; 104 + description = "Sample textX language for testing"; 105 + homepage = textx.homepage + "tree/${version}/" + pathToSourceRoot; 106 + }; 107 + }; 108 + 109 + textx-flow-codegen = buildPythonPackage rec { 110 + pname = "textx-flow-codegen"; 111 + version = "1.0.0"; 112 + inherit (textx) src; 113 + format = "setuptools"; 114 + pathToSourceRoot = "tests/functional/registration/projects/flow_codegen"; 115 + sourceRoot = "${src.name}/" + pathToSourceRoot; 116 + propagatedBuildInputs = [ 117 + click 118 + textx 119 + ]; 120 + meta = with lib; { 121 + inherit (textx.meta) license maintainers; 122 + description = "Sample textX language for testing"; 123 + homepage = textx.homepage + "tree/${version}/" + pathToSourceRoot; 124 + }; 125 + }; 126 + 127 + textx-flow-dsl = buildPythonPackage rec { 128 + pname = "textx-flow-dsl"; 129 + version = "1.0.0"; 130 + inherit (textx) src; 131 + format = "setuptools"; 132 + pathToSourceRoot = "tests/functional/registration/projects/flow_dsl"; 133 + sourceRoot = "${src.name}/" + pathToSourceRoot; 134 + propagatedBuildInputs = [ 135 + textx 136 + ]; 137 + meta = with lib; { 138 + inherit (textx.meta) license maintainers; 139 + description = "Sample textX language for testing"; 140 + homepage = textx.homepage + "tree/${version}/" + pathToSourceRoot; 141 + }; 142 + }; 143 + 144 + textx-types-dsl = buildPythonPackage rec { 145 + pname = "textx-types-dsl"; 146 + version = "1.0.0"; 147 + inherit (textx) src; 148 + format = "setuptools"; 149 + pathToSourceRoot = "tests/functional/registration/projects/types_dsl"; 150 + sourceRoot = "${src.name}/" + pathToSourceRoot; 151 + propagatedBuildInputs = [ 152 + textx 153 + ]; 154 + meta = with lib; { 155 + inherit (textx.meta) license maintainers; 156 + description = "Sample textX language for testing"; 157 + homepage = textx.homepage + "tree/${version}/" + pathToSourceRoot; 158 + }; 159 + }; 160 + 161 + textx-example-project = buildPythonPackage rec { 162 + pname = "textx-example-project"; 163 + version = "1.0.0"; 164 + inherit (textx) src; 165 + format = "setuptools"; 166 + pathToSourceRoot = "tests/functional/subcommands/example_project"; 167 + sourceRoot = "${src.name}/" + pathToSourceRoot; 168 + propagatedBuildInputs = [ 169 + textx 170 + ]; 171 + meta = with lib; { 172 + inherit (textx.meta) license maintainers; 173 + description = "Sample textX sub-command for testing"; 174 + homepage = textx.homepage + "tree/${version}/" + pathToSourceRoot; 175 + }; 176 + }; 177 + in 178 + textx
+53
pkgs/development/python-modules/textx/tests.nix
··· 1 + { lib 2 + , buildPythonPackage 3 + , click 4 + , gprof2dot 5 + , html5lib 6 + , jinja2 7 + , memory_profiler 8 + , psutil 9 + , pytestCheckHook 10 + , setuptools 11 + , textx 12 + , textx-data-dsl 13 + , textx-example-project 14 + , textx-flow-codegen 15 + , textx-flow-dsl 16 + , textx-types-dsl 17 + }: 18 + 19 + buildPythonPackage { 20 + pname = "textx-tests"; 21 + inherit (textx) version; 22 + 23 + srcs = textx.testout; 24 + 25 + dontBuild = true; 26 + dontInstall = true; 27 + 28 + checkInputs = [ 29 + click 30 + gprof2dot 31 + html5lib 32 + jinja2 33 + memory_profiler 34 + psutil 35 + pytestCheckHook 36 + setuptools 37 + textx-data-dsl 38 + textx-example-project 39 + textx-flow-codegen 40 + textx-flow-dsl 41 + textx-types-dsl 42 + ]; 43 + 44 + pytestFlagsArray = [ 45 + "tests/functional" 46 + ]; 47 + 48 + meta = with lib; { 49 + inherit (textx.meta) license maintainers; 50 + description = "passthru.tests for textx"; 51 + homepage = textx.homepage + "tree/${version}/" + "tests/"; 52 + }; 53 + }
+2
pkgs/top-level/all-packages.nix
··· 34073 34073 34074 34074 jflap = callPackage ../applications/science/engineering/jflap { }; 34075 34075 34076 + strictdoc = python3.pkgs.callPackage ../applications/science/engineering/strictdoc { }; 34077 + 34076 34078 ### SCIENCE / ELECTRONICS 34077 34079 34078 34080 adms = callPackage ../applications/science/electronics/adms { };
+6
pkgs/top-level/python-packages.nix
··· 2156 2156 2157 2157 datatable = callPackage ../development/python-modules/datatable { }; 2158 2158 2159 + datauri = callPackage ../development/python-modules/datauri { }; 2160 + 2159 2161 dateparser = callPackage ../development/python-modules/dateparser { }; 2160 2162 2161 2163 dateutils = callPackage ../development/python-modules/dateutils { }; ··· 9239 9241 9240 9242 reproject = callPackage ../development/python-modules/reproject { }; 9241 9243 9244 + reqif = callPackage ../development/python-modules/reqif { }; 9245 + 9242 9246 requests-aws4auth = callPackage ../development/python-modules/requests-aws4auth { }; 9243 9247 9244 9248 requests-cache = callPackage ../development/python-modules/requests-cache { }; ··· 10537 10541 text-unidecode = callPackage ../development/python-modules/text-unidecode { }; 10538 10542 10539 10543 textwrap3 = callPackage ../development/python-modules/textwrap3 { }; 10544 + 10545 + textx = callPackage ../development/python-modules/textx { }; 10540 10546 10541 10547 tflearn = callPackage ../development/python-modules/tflearn { }; 10542 10548