|
| 1 | +[build-system] |
| 2 | +requires = [ |
| 3 | + "setuptools", |
| 4 | + "setuptools-scm", |
| 5 | +] |
| 6 | +build-backend = "setuptools.build_meta" |
| 7 | + |
| 8 | +[project] |
| 9 | +name = "fastvector" |
| 10 | +authors = [ |
| 11 | + { name = "Jan Schaffranek", email = "[email protected]"}, |
| 12 | +] |
| 13 | +description = "This is a simple vector python package." |
| 14 | +readme = "README.md" |
| 15 | +license = {file = "LICENSE"} |
| 16 | +requires-python = ">=3.9" |
| 17 | +classifiers = [ |
| 18 | + "Programming Language :: Python :: 3", |
| 19 | + "Programming Language :: Python :: 3.9", |
| 20 | + "Programming Language :: Python :: 3.10", |
| 21 | + "Programming Language :: Python :: 3.11", |
| 22 | + "Programming Language :: Python :: 3.12", |
| 23 | + "Operating System :: Microsoft :: Windows", |
| 24 | + "Operating System :: POSIX :: Linux", |
| 25 | + "Operating System :: POSIX", |
| 26 | + "Operating System :: Unix", |
| 27 | + "Operating System :: MacOS", |
| 28 | +] |
| 29 | +dependencies = [ |
| 30 | + "numpy>=1.21.6; python_version<'3.11'", |
| 31 | + "numpy>=1.23.2; python_version>='3.11'", |
| 32 | +] |
| 33 | +dynamic = ["version"] |
| 34 | + |
| 35 | +[project.optional-dependencies] |
| 36 | +test = [ |
| 37 | + "pytest", |
| 38 | + "pytest-cov", |
| 39 | + "codecov", |
| 40 | + "pre-commit", |
| 41 | +] |
| 42 | +doc = [ |
| 43 | + "mkdocs", |
| 44 | + "mkdocstrings", |
| 45 | + "mkdocstrings[python]", |
| 46 | + "mkdocs-material", |
| 47 | + "Pygments", |
| 48 | +] |
| 49 | +dev = [ |
| 50 | + "black", |
| 51 | + "isort", |
| 52 | + "mypy", |
| 53 | + "pre-commit", |
| 54 | + "ruff", |
| 55 | +] |
| 56 | +all = ["fastvector[test,doc,dev]"] |
| 57 | + |
| 58 | +[tool.setuptools] |
| 59 | +platforms = ["unix", "linux", "osx", "cygwin", "win32"] |
| 60 | +packages = ["fastvector"] # optional |
| 61 | + |
| 62 | +[tool.setuptools.dynamic] |
| 63 | +version = {attr = "fastvector.__version__"} |
| 64 | + |
| 65 | +[tool.pytest.ini_options] |
| 66 | +minversion = "7.3" |
| 67 | +testpaths = "tests" |
| 68 | + |
| 69 | +[tool.coverage.run] |
| 70 | +branch = true |
| 71 | +parallel = true |
| 72 | +omit = [ |
| 73 | + "setup.py", |
| 74 | + "fastvector/__init__.py", |
| 75 | + "fastvector/version.py", |
| 76 | +] |
| 77 | + |
| 78 | +[tool.coverage.report] |
| 79 | +exclude_lines = [ |
| 80 | + "pragma: no cover", |
| 81 | + "def __repr__", |
| 82 | + "if self.debug", |
| 83 | + "raise AssertionError", |
| 84 | + "raise NotImplementedError", |
| 85 | + "if __name__ == .__main__.:", |
| 86 | + "raise AssertionError", |
| 87 | + "raise NotImplementedError", |
| 88 | +] |
| 89 | + |
| 90 | +[tool.coverage.paths] |
| 91 | +source = [ |
| 92 | + "fastvector/*", |
| 93 | +] |
| 94 | + |
| 95 | +[tool.coverage.html] |
| 96 | +directory = "reports" |
| 97 | + |
| 98 | +######## Tools |
| 99 | +[tool.black] |
| 100 | +target-version = ['py310'] |
| 101 | +line-length = 80 |
| 102 | +skip-string-normalization = false |
| 103 | +skip-magic-trailing-comma = false |
| 104 | +force-exclude = ''' |
| 105 | +/( |
| 106 | + | docs |
| 107 | + | setup.py |
| 108 | +)/ |
| 109 | +''' |
| 110 | + |
| 111 | +[tool.isort] |
| 112 | +py_version = 310 |
| 113 | +sections = [ |
| 114 | + "FUTURE", |
| 115 | + "STDLIB", |
| 116 | + "THIRDPARTY", |
| 117 | + "FIRSTPARTY", |
| 118 | + "LOCALFOLDER" |
| 119 | +] |
| 120 | +default_section = "FIRSTPARTY" |
| 121 | +known_third_party = [ |
| 122 | + "numpy", |
| 123 | + "pandas", |
| 124 | + "keras", |
| 125 | + "tensorflow", |
| 126 | + "sklearn", |
| 127 | + "matplotlib", |
| 128 | + "scipy", |
| 129 | + "h5py", |
| 130 | + "seaborn", |
| 131 | + "numba", |
| 132 | + "gym", |
| 133 | + "PyQt5", |
| 134 | + "PyQt6", |
| 135 | + "pyqtgraph", |
| 136 | + "torch", |
| 137 | + "tqdm", |
| 138 | + "cv2", |
| 139 | + "skimage", |
| 140 | + "tensorcross", |
| 141 | + "tensorflow_datasets" |
| 142 | +] |
| 143 | +known_first_party = [] |
| 144 | +known_local_folder = [] |
| 145 | +# style: black |
| 146 | +multi_line_output = 3 |
| 147 | +include_trailing_comma = true |
| 148 | +force_grid_wrap = 0 |
| 149 | +use_parentheses = true |
| 150 | +ensure_newline_before_comments = true |
| 151 | +line_length = 80 |
| 152 | +split_on_trailing_comma = true |
| 153 | +lines_after_imports = 2 |
| 154 | +force_single_line = true |
| 155 | +skip_glob = [ |
| 156 | + "docs/*", |
| 157 | + "setup.py" |
| 158 | +] |
| 159 | +filter_files = true |
| 160 | + |
| 161 | +[tool.ruff] |
| 162 | +target-version = "py310" |
| 163 | +select = ["F", "E"] |
| 164 | +extend-select = ["W", "C90", "I", "N", "UP", "YTT", "ANN", "ASYNC", "BLE", "B", "A", "COM", "C4", "EXE", "FA", "ISC", "ICN", "INP", "PIE", "PYI", "PT", "Q", "RSE", "RET", "SLF", "SLOT", "SIM", "TID", "TCH", "INT", "ARG", "PTH", "TD", "FIX", "PD", "PL", "TRY", "FLY", "NPY", "PERF", "FURB", "RUF"] |
| 165 | +ignore = ["I001", "ANN401", "SIM300", "PERF203", "ANN101", "B905", "NPY002", "COM812", "N999", "PTH", "INP001", "TRY003", "PLW1641"] |
| 166 | +fixable = ["W", "C90", "I", "N", "UP", "YTT", "ANN", "ASYNC", "BLE", "B", "A", "COM", "C4", "EXE", "FA", "ISC", "ICN", "INP", "PIE", "PYI", "PT", "Q", "RSE", "RET", "SLF", "SLOT", "SIM", "TID", "TCH", "INT", "ARG", "PTH", "TD", "FIX", "PD", "PL", "TRY", "FLY", "NPY", "PERF", "FURB", "RUF"] |
| 167 | +unfixable = [] |
| 168 | +line-length = 80 |
| 169 | +extend-exclude = ["docs", "test", "tests"] |
| 170 | +dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$" |
| 171 | +[tool.ruff.isort] |
| 172 | +force-single-line = true |
| 173 | +force-sort-within-sections = false |
| 174 | +lines-after-imports = 2 |
| 175 | +[tool.ruff.mccabe] |
| 176 | +max-complexity = 24 |
| 177 | +[tool.ruff.pycodestyle] |
| 178 | +ignore-overlong-task-comments = true |
| 179 | +[tool.ruff.pydocstyle] |
| 180 | +convention = "numpy" |
| 181 | +[tool.ruff.flake8-annotations] |
| 182 | +allow-star-arg-any = false |
| 183 | +ignore-fully-untyped = false |
| 184 | +[tool.ruff.format] |
| 185 | +quote-style = "double" |
| 186 | +indent-style = "space" |
| 187 | +skip-magic-trailing-comma = false |
| 188 | +line-ending = "auto" |
| 189 | + |
| 190 | +[tool.mypy] |
| 191 | +# Platform configuration |
| 192 | +python_version = "3.10" |
| 193 | +# imports related |
| 194 | +ignore_missing_imports = true |
| 195 | +follow_imports = "silent" |
| 196 | +# None and Optional handling |
| 197 | +no_implicit_optional = true |
| 198 | +strict_optional = true |
| 199 | +# Configuring warnings |
| 200 | +warn_unused_configs = true |
| 201 | +warn_redundant_casts = true |
| 202 | +warn_unused_ignores = true |
| 203 | +warn_no_return = true |
| 204 | +warn_unreachable = true |
| 205 | +warn_return_any = false |
| 206 | +# Untyped definitions and calls |
| 207 | +check_untyped_defs = true |
| 208 | +disallow_untyped_calls = false |
| 209 | +disallow_untyped_defs = false |
| 210 | +disallow_incomplete_defs = true |
| 211 | +disallow_untyped_decorators = false |
| 212 | +# Disallow dynamic typing |
| 213 | +disallow_subclassing_any = true |
| 214 | +disallow_any_unimported = false |
| 215 | +disallow_any_expr = false |
| 216 | +disallow_any_decorated = false |
| 217 | +disallow_any_explicit = false |
| 218 | +disallow_any_generics = false |
| 219 | +# Miscellaneous strictness flags |
| 220 | +allow_untyped_globals = false |
| 221 | +allow_redefinition = false |
| 222 | +local_partial_types = false |
| 223 | +implicit_reexport = true |
| 224 | +strict_equality = true |
| 225 | +# Configuring error messages |
| 226 | +show_error_context = false |
| 227 | +show_column_numbers = false |
| 228 | +show_error_codes = true |
| 229 | +exclude = ["docs"] |
| 230 | + |
| 231 | +[tool.pyright] |
| 232 | +pythonVersion = "3.10" |
| 233 | +typeCheckingMode = "basic" |
| 234 | +# enable subset of "strict" |
| 235 | +reportDuplicateImport = true |
| 236 | +reportInvalidStubStatement = true |
| 237 | +reportOverlappingOverload = true |
| 238 | +reportPropertyTypeMismatch = true |
| 239 | +reportUntypedClassDecorator = true |
| 240 | +reportUntypedFunctionDecorator = true |
| 241 | +reportUntypedNamedTuple = true |
| 242 | +reportUnusedImport = true |
| 243 | +# disable subset of "basic" |
| 244 | +reportGeneralTypeIssues = true |
| 245 | +reportMissingModuleSource = false |
| 246 | +reportOptionalCall = true |
| 247 | +reportOptionalIterable = true |
| 248 | +reportOptionalMemberAccess = true |
| 249 | +reportOptionalOperand = true |
| 250 | +reportOptionalSubscript = true |
| 251 | +reportPrivateImportUsage = true |
| 252 | +reportUnboundVariable = true |
0 commit comments