GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — python-graphblas/pyproject.toml at main · python-graphblas/python-graphblas Expand file tree/ Copy pathpyproject.tomlMore file actions 513 lines (479 loc) · 20.7 KB / Copy pathpyproject.tomlFile metadata and controls513 lines (479 loc) · 20.7 KB 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 [build-system] build-backend = "setuptools.build_meta" requires = ["setuptools >=77", "setuptools-git-versioning"] [project] name = "python-graphblas" dynamic = ["version"] description = "Python library for GraphBLAS: high-performance sparse linear algebra for scalable graph analytics" readme = "README.md" requires-python = ">=3.11" license = "Apache-2.0" license-files = ["LICENSE"] authors = [ { name = "Jim Kitchen" }, { name = "Python-graphblas contributors" }, ] maintainers = [ ] keywords = [ "graphblas", "graph", "sparse", "matrix", "lagraph", "suitesparse", "Networks", "Graph Theory", "Mathematics", "network", "discrete mathematics", "math", ] classifiers = [ "Development Status :: 5 - Production/Stable", "Operating System :: MacOS :: MacOS X", "Operating System :: POSIX :: Linux", "Operating System :: Microsoft :: Windows", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", "Programming Language :: Python :: 3.14", "Programming Language :: Python :: 3.15", "Programming Language :: Python :: 3 :: Only", "Intended Audience :: Developers", "Intended Audience :: Other Audience", "Intended Audience :: Science/Research", "Topic :: Scientific/Engineering", "Topic :: Scientific/Engineering :: Information Analysis", "Topic :: Scientific/Engineering :: Mathematics", "Topic :: Software Development :: Libraries :: Python Modules", ] dependencies = [ "numpy >=1.24", "donfig >=0.6", "pyyaml >=5.4", # These should be optional once PEP 771 is accepted and supported: # https://peps.python.org/pep-0771/ (still draft as of 2026-03) # Use e.g. "python-graphblas[suitesparse]" or "python-graphblas[default]" instead "suitesparse-graphblas >=7.4.0.0", "numba >=0.57; python_version<'3.16'", # make optional where numba is not supported ] [project.urls] homepage = "https://github.com/python-graphblas/python-graphblas" documentation = "https://python-graphblas.readthedocs.io" repository = "https://github.com/python-graphblas/python-graphblas" changelog = "https://github.com/python-graphblas/python-graphblas/releases" [project.optional-dependencies] suitesparse = ["suitesparse-graphblas >=7.4.0.0"] networkx = ["networkx >=2.8"] numba = ["numba >=0.57"] pandas = ["pandas >=1.5"] scipy = ["scipy >=1.9"] suitesparse-udf = [ # udf requires numba "python-graphblas[suitesparse,numba]", ] repr = ["python-graphblas[pandas]"] io = [ "python-graphblas[networkx,scipy]", "python-graphblas[numba]; python_version<'3.16'", # make optional where numba is not supported "awkward >=2.0", # sparse needs numba, so it stays optional and takes numba's upper guard from above: # it has to drop out wherever numba does. "sparse >=0.14; python_version<'3.16'", # fast-matrix-market is no longer maintained; last supported Python is 3.12 ] viz = ["python-graphblas[networkx,scipy]", "matplotlib >=3.6"] datashade = [ # datashade requires numba "python-graphblas[numba,pandas,scipy]", "datashader >=0.14", "hvplot >=0.8", ] test = ["python-graphblas[suitesparse,pandas,scipy]", "packaging >=21", "pytest >=6.2", "tomli >=1"] default = [ "python-graphblas[suitesparse,pandas,scipy]", "python-graphblas[numba]; python_version<'3.16'", # make optional where numba is not supported ] all = [ "python-graphblas[default,io,viz,test]", "python-graphblas[datashade]; python_version<'3.16'", # make optional, b/c datashade needs numba ] [tool.setuptools] # Let's be explicit # $ python -c 'from setuptools import find_packages ; [print(x) for x in sorted(find_packages())]' # $ find graphblas/ -name __init__.py -print | sort | sed -e 's/\/__init__.py//g' -e 's/\//./g' # $ python -c 'import tomli ; [print(x) for x in sorted(tomli.load(open("pyproject.toml", "rb"))["tool"]["setuptools"]["packages"])]' packages = [ "graphblas", "graphblas.agg", "graphblas.binary", "graphblas.core", "graphblas.core.operator", "graphblas.core.ss", "graphblas.dtypes", "graphblas.indexbinary", "graphblas.indexunary", "graphblas.io", "graphblas.monoid", "graphblas.op", "graphblas.semiring", "graphblas.select", "graphblas.ss", "graphblas.tests", "graphblas.unary", ] [tool.setuptools-git-versioning] enabled = true dev_template = "{tag}+{ccount}.g{sha}" dirty_template = "{tag}+{ccount}.g{sha}.dirty" [tool.black] line-length = 100 # MAINT: add "py315" once a black that knows it (26.5 or later) installs on Python 3.15 # from conda-forge (2026-10-19: its pytokens >=0.4 has no 3.15 build, so 3.15 gets black # 26.1, which rejects "py315" and stops CI's auto-generated code check). Listing it also # makes any older black refuse to run on this repository. target-version = ["py311", "py312", "py313", "py314"] [tool.isort] sections = ["FUTURE", "STDLIB", "THIRDPARTY", "FIRSTPARTY", "LOCALFOLDER"] profile = "black" skip_gitignore = true float_to_top = true default_section = "THIRDPARTY" known_first_party = "graphblas" line_length = 100 [tool.pytest.ini_options] minversion = "6.0" testpaths = "graphblas/tests" xfail_strict = false addopts = [ "--strict-config", # Force error if config is mispelled "--strict-markers", # Force error if marker is mispelled (must be defined in config) "-ra", # Print summary of all fails/errors ] markers = [ "slow: Skipped unless --runslow passed", # Not applied by our tests. ``scipy.io.tests.test_mmio`` (which # ``test_mmread_mmwrite`` imports for its example matrices) sets it at module # scope for the pytest-run-parallel plugin. Importing the module evaluates the # marker, and with ``--strict-markers`` (always set below) an unregistered # marker fails collection outright, on pytest 8 and 9 alike. Without the # strict flag the same import would only warn (PytestUnknownMarkWarning), # which ``filterwarnings = error`` below would turn into a failure; with it, # the strict route is the only one this configuration ever takes. "thread_unsafe: Declared by scipy's test modules; unused here", "fail_slow: Declared by scipy's test modules; unused here", ] log_cli_level = "info" filterwarnings = [ # See: https://docs.python.org/3/library/warnings.html#describing-warning-filters # and: https://docs.pytest.org/en/7.2.x/how-to/capture-warnings.html#controlling-warnings "error", # sparse 0.14.0 began raising this warning; fixed in newer versions but CI tests with 0.14/0.15 "ignore:coords should be an ndarray. This will raise a ValueError:DeprecationWarning:sparse._coo.core", # pypy gives this warning "ignore:can't resolve package from __spec__ or __package__:ImportWarning:", # Python 3.12 introduced this deprecation, which is triggered by pandas 2.1.1 # MAINT: check if still needed once we drop pandas <2.2 support "ignore:datetime.datetime.utcfromtimestamp:DeprecationWarning:dateutil", # numpy 1.25+ deprecated np.find_common_type; triggered by older scipy/networkx/pandas # MAINT: remove once we drop numpy <2 support (numpy 2.0 removed it entirely) "ignore:np.find_common_type is deprecated:DeprecationWarning:", # UDT auto-lift emits a one-time ``gb.exceptions.NoJITWarning`` (subclass # of ``UserWarning``) when JIT setup can't be done: compiler missing, # control mode off, or UDT not C-expressible (C-reserved field name, # stdlib macro, unsupported field type, packed layout, etc.). The warning # uses ``stacklevel=3`` so its traceback points at the user's code rather # than ``jit_config``; that makes a ``module=`` qualifier here fragile # (Python attributes the warning to whatever module is 3 frames up at # issue time). Match on the unique message instead. Tests that exercise # this path wrap with ``pytest.warns(NoJITWarning, match="without JIT")`` # (or ``UserWarning``, which still matches via inheritance). "ignore:UDT operator running without JIT:UserWarning", # ``pytest -n`` (xdist) makes pytest-benchmark issue this warning during # ``pytest_configure`` to say it disabled itself. Our ``error`` filter # turns warnings into errors, which crashes config before tests run. # Match by message only: naming the category would make pytest import # pytest_benchmark to resolve it, which fails where it isn't installed. "ignore:Benchmarks are automatically disabled:", ] [tool.coverage.run] branch = true source = ["graphblas"] omit = [ "graphblas/viz.py", # TODO: test and get coverage for viz.py ] [tool.coverage.report] ignore_errors = false precision = 1 fail_under = 0 skip_covered = true skip_empty = true exclude_lines = ["pragma: no cover", "raise AssertionError", "raise NotImplementedError"] [tool.codespell] ignore-words-list = "coo,ba" [tool.ruff] # https://github.com/charliermarsh/ruff/ line-length = 100 target-version = "py311" [tool.ruff.format] exclude = ["*.ipynb"] # Consider enabling auto-formatting of notebooks [tool.ruff.lint] exclude = ["*.ipynb"] # Consider enabling auto-formatting of notebooks unfixable = [ "F841", # unused-variable (Note: can leave useless expression) "B905", # zip-without-explicit-strict (Note: prefer `zip(x, y, strict=True)`) ] select = [ # Have we enabled too many checks that they'll become a nuisance? We'll see... "F", # pyflakes "E", # pycodestyle Error "W", # pycodestyle Warning # "C90", # mccabe (Too strict, but maybe we should make things less complex) # "I", # isort (Should we replace `isort` with this?) "N", # pep8-naming "D", # pydocstyle "UP", # pyupgrade "YTT", # flake8-2020 # "ANN", # flake8-annotations (We don't use annotations yet) "S", # bandit # "BLE", # flake8-blind-except (Maybe consider) # "FBT", # flake8-boolean-trap (Why?) "B", # flake8-bugbear "A", # flake8-builtins "COM", # flake8-commas "C4", # flake8-comprehensions "DTZ", # flake8-datetimez "T10", # flake8-debugger # "DJ", # flake8-django (We don't use django) # "EM", # flake8-errmsg (Perhaps nicer, but too much work) "EXE", # flake8-executable "ISC", # flake8-implicit-str-concat # "ICN", # flake8-import-conventions (Doesn't allow "_" prefix such as `_np`) "G", # flake8-logging-format "INP", # flake8-no-pep420 "PIE", # flake8-pie "T20", # flake8-print # "PYI", # flake8-pyi (We don't have stub files yet) "PT", # flake8-pytest-style "Q", # flake8-quotes "RSE", # flake8-raise "RET", # flake8-return # "SLF", # flake8-self (we can use our own private variables, sheesh!) "SIM", # flake8-simplify # "TID", # flake8-tidy-imports (Rely on isort and our own judgement) # "TCH", # flake8-type-checking (Note: figure out type checking later) # "ARG", # flake8-unused-arguments (Sometimes helpful, but too strict) "PTH", # flake8-use-pathlib (Often better, but not always) # "ERA", # eradicate (We like code in comments!) # "PD", # pandas-vet (Intended for scripts that use pandas, not libraries) "PGH", # pygrep-hooks "PL", # pylint "PLC", # pylint Convention "PLE", # pylint Error "PLR", # pylint Refactor "PLW", # pylint Warning "TRY", # tryceratops "NPY", # NumPy-specific rules "RUF", # ruff-specific rules "ALL", # Try new categories by default (making the above list unnecessary) ] external = [ # noqa codes that ruff doesn't know about: https://github.com/charliermarsh/ruff#external "F811", ] ignore = [ # Would be nice to fix these "D100", # Missing docstring in public module "D101", # Missing docstring in public class "D102", # Missing docstring in public method "D103", # Missing docstring in public function "D104", # Missing docstring in public package "D105", # Missing docstring in magic method "D107", # Missing docstring in `__init__` "D205", # 1 blank line required between summary line and description "D401", # First line of docstring should be in imperative mood: "D417", # D417 Missing argument description in the docstring for ...: ... "PLE0605", # Invalid format for `__all__`, must be `tuple` or `list` (Note: broken in v0.0.237) # Maybe consider # "SIM300", # Yoda conditions are discouraged, use ... instead (Note: we're not this picky) # "SIM401", # Use dict.get ... instead of if-else-block (Note: if-else better for coverage and sometimes clearer) "B904", # Use `raise from` to specify exception cause (Note: sometimes okay to raise original exception) "TRY004", # Prefer `TypeError` exception for invalid type (Note: good advice, but not worth the nuisance) "RUF012", # Mutable class attributes should be annotated with `typing.ClassVar` (Note: no annotations yet) "RUF021", # parenthesize-chained-operators (Note: results don't look good yet) "RUF023", # unsorted-dunder-slots (Note: maybe fine, but noisy changes) "RUF043", # Unescaped metacharacters in a `match=` pattern (Note: tests pass plain strings) "PERF401", # Use a list comprehension to create a transformed list (Note: poorly implemented atm) # Intentionally ignored "COM812", # Trailing comma missing "D203", # 1 blank line required before class docstring (Note: conflicts with D211, which is preferred) "D213", # (Note: conflicts with D212, which is preferred) "D400", # First line should end with a period (Note: prefer D415, which also allows "?" and "!") "N801", # Class name ... should use CapWords convention (Note:we have a few exceptions to this) "N802", # Function name ... should be lowercase "N803", # Argument name ... should be lowercase (Maybe okay; except in tests) "N806", # Variable ... in function should be lowercase "N807", # Function name should not start and end with `__` "N818", # Exception name ... should be named with an Error suffix (Note: good advice) "PERF203", # `try`-`except` within a loop incurs performance overhead (Note: too strict) "PLC0205", # Class `__slots__` should be a non-string iterable (Note: string is fine) "PLC0415", # `import` should be at the top-level of a file (Note: we use deliberate local imports) "PLR0124", # Name compared with itself, consider replacing `x == x` (Note: too strict) "PLR0911", # Too many return statements "PLR0912", # Too many branches "PLR0913", # Too many arguments to function call "PLR0917", # Too many positional arguments (Stable since ruff 0.16; same call for PLR0913) "PLR0915", # Too many statements "PLR2004", # Magic number used in comparison, consider replacing magic with a constant variable "PLW0603", # Using the global statement to update ... is discouraged (Note: yeah, discouraged, but too strict) "PLW0642", # Reassigned `self` variable in instance method (Note: too strict for us) "PLW2901", # Outer for loop variable ... overwritten by inner assignment target (Note: good advice, but too strict) "RET502", # Do not implicitly `return None` in function able to return non-`None` value "RET503", # Missing explicit `return` at the end of function able to return non-`None` value "RET504", # Unnecessary variable assignment before `return` statement "RUF028", # Invalid formatter-suppression comment (Note: our `# fmt:` comments are for black, not ruff) "S110", # `try`-`except`-`pass` detected, consider logging the exception (Note: good advice, but we don't log) "S112", # `try`-`except`-`continue` detected, consider logging the exception (Note: good advice, but we don't log) "S603", # `subprocess` call: check for execution of untrusted input (Note: not important for us) "S607", # Starting a process with a partial executable path (Note: not important for us) "SIM102", # Use a single `if` statement instead of nested `if` statements (Note: often necessary) "SIM105", # Use contextlib.suppress(...) instead of try-except-pass (Note: try-except-pass is much faster) "SIM108", # Use ternary operator ... instead of if-else-block (Note: if-else better for coverage and sometimes clearer) "TRY003", # Avoid specifying long messages outside the exception class (Note: why?) # Ignored categories "C90", # mccabe (Too strict, but maybe we should make things less complex) "CPY", # flake8-copyright (Stable since ruff 0.16; we don't put a header in every file) "I", # isort (Should we replace `isort` with this?) "ANN", # flake8-annotations (We don't use annotations yet) "BLE", # flake8-blind-except (Maybe consider) "FBT", # flake8-boolean-trap (Why?) "DJ", # flake8-django (We don't use django) "EM", # flake8-errmsg (Perhaps nicer, but too much work) "ICN", # flake8-import-conventions (Doesn't allow "_" prefix such as `_np`) "PYI", # flake8-pyi (We don't have stub files yet) "SLF", # flake8-self (we can use our own private variables, sheesh!) "TID", # flake8-tidy-imports (Rely on isort and our own judgement) "TCH", # flake8-type-checking (Note: figure out type checking later) "ARG", # flake8-unused-arguments (Sometimes helpful, but too strict) "TD", # flake8-todos (Maybe okay to add some of these) "FIX", # flake8-fixme (like flake8-todos) "ERA", # eradicate (We like code in comments!) "PD", # pandas-vet (Intended for scripts that use pandas, not libraries) ] [tool.ruff.lint.per-file-ignores] "graphblas/core/operator/__init__.py" = ["A005"] "graphblas/io/__init__.py" = ["A005"] # shadows a standard-library module "graphblas/core/operator/base.py" = ["S102"] # exec is used for UDF "graphblas/core/operator/udt_codegen.py" = ["S102"] # exec is used for UDT op codegen "graphblas/monoid/numpy.py" = ["PLW0108"] # lambda is needed for numba.njit "graphblas/core/ss/matrix.py" = [ "NPY002", # numba doesn't support rng generator yet "PLR1730", ] "graphblas/core/ss/vector.py" = [ "NPY002", # numba doesn't support rng generator yet ] "graphblas/core/utils.py" = ["PLE0302"] # `__set__` is used as a property "graphblas/core/formatting.py" = ["ISC004"] # Adjacent literals form one HTML fragment "scripts/ci_pick_versions.py" = ["S311"] # random.choice is intentional for CI version selection "graphblas/ss/_core.py" = ["N999"] # We want _core.py to be underscopre # Allow useless expressions, assert, pickle, RNG, print, no docstring, and yoda in tests "graphblas/tests/*py" = ["B018", "S101", "S301", "S311", "T201", "D103", "D100", "SIM300"] "graphblas/tests/test_formatting.py" = ["E501"] # Allow long lines "graphblas/**/__init__.py" = [ "F401", # Allow unused imports (w/o defining `__all__`) ] "scripts/*.py" = ["INP001", "T201"] # Not a package; allow print "scripts/create_pickle.py" = ["F403", "F405"] # Allow `from foo import *` "docs/*.py" = ["INP001"] # Not a package [tool.ruff.lint.flake8-builtins] builtins-ignorelist = ["copyright", "format", "min", "max"] builtins-allowed-modules = ["select"] [tool.ruff.lint.flake8-pytest-style] fixture-parentheses = false mark-parentheses = false [tool.ruff.lint.pydocstyle] convention = "numpy" [tool.bandit] exclude_dirs = ["graphblas/tests", "scripts"] skips = [ "B110", # Try, Except, Pass detected. (Note: it would be nice to not have this pattern) ] [tool.pylint.messages_control] # To run a single check, do: pylint graphblas --disable E,W,R,C,I --enable assignment-from-no-return max-line-length = 100 py-version = "3.11" enable = ["I"] disable = [ # Error "assignment-from-no-return", # Warning "arguments-differ", "arguments-out-of-order", "expression-not-assigned", "fixme", "global-statement", "non-parent-init-called", "redefined-builtin", "redefined-outer-name", "super-init-not-called", "unbalanced-tuple-unpacking", "unnecessary-lambda", "unspecified-encoding", "unused-argument", "unused-variable", # Refactor "cyclic-import", "duplicate-code", "inconsistent-return-statements", "too-few-public-methods", # Convention "missing-class-docstring", "missing-function-docstring", "missing-module-docstring", "too-many-lines", # Intentionally turned off # error "class-variable-slots-conflict", "invalid-unary-operand-type", "no-member", "no-name-in-module", "not-an-iterable", "too-many-function-args", "unexpected-keyword-arg", # warning "broad-except", "pointless-statement", "protected-access", "undefined-loop-variable", "unused-import", # refactor "comparison-with-itself", "too-many-arguments", "too-many-boolean-expressions", "too-many-branches", "too-many-instance-attributes", "too-many-locals", "too-many-nested-blocks", "too-many-public-methods", "too-many-return-statements", "too-many-statements", # convention "import-outside-toplevel", "invalid-name", "line-too-long", "singleton-comparison", "single-string-used-for-slots", "unidiomatic-typecheck", "unnecessary-dunder-call", "wrong-import-order", "wrong-import-position", # informative "locally-disabled", "suppressed-message", ] |
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |