[build-system] requires = [ "setuptools>=64", "setuptools_scm>=8", ] build-backend = "setuptools.build_meta" [project] name = "matfree" authors = [ {name="Nicholas Krämer", email="pekra@dtu.dk"} ] description = "Matrix-free numerical linear algebra." readme = "README.md" requires-python=">=3.9" classifiers = [ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", ] dynamic = ["version"] [project.optional-dependencies] cpu = [ "jax[cpu]", ] test =[ "pytest", "pytest-cases", ] format-and-lint =[ "matfree[test]", "pre-commit", "blackdoc", ] doc = [ "mkdocs", "mkdocs-material", "mkdocstrings", "mkdocstrings-python", "mkdocs-jupyter", "mkdocs-awesome-pages-plugin", "matplotlib", "tqdm", ] full = [ "matfree[cpu]", "matfree[test]", "matfree[format-and-lint]", "matfree[doc]", ] [tool.setuptools.packages.find] where = ["."] # list of folders that contain the packages (["."] by default) include = ["matfree*"] # package names should match these glob patterns (["*"] by default) [tool.setuptools_scm] version_file = "matfree/_version.py" [project.urls] "Documentation" = "https://pnkraemer.github.io/matfree/" "Issue tracker" = "https://github.com/pnkraemer/matfree/issues" [tool.ruff] include = ["**.py", "**/pyproject.toml", "**.ipynb"] [tool.ruff.lint] # See: https://beta.ruff.rs/docs/rules/ select = [ # pycodestyle (warning, error) "W", "E", # Pyflakes: "F", # pyupgrade: "UP", # flake8-bugbear: "B", # flake8-builtins: "A", # flake8-import-conventions: "ICN", # flake8-pytest-style: "PT", # flake8-quotes: "Q", # flake8-return: "RET", # flake8-simplify: "SIM", # flake8-unused-arguments: "ARG", # Ruff-specific rules: "RUF", # isort: "I", # flake8-errormsg: "EM", # tryceratops: "TRY", # Docstrings: "D", ] ignore = [ # warning: `one-blank-line-before-class` (D203) and `no-blank-line-before-class` (D211) are incompatible. "D203", # warning: `multi-line-summary-first-line` (D212) and `multi-line-summary-second-line` (D213) are incompatible. "D213", # zip(..., strict=True/False) is not supported on Python < 3.10 "B905", ] [tool.ruff.format] # Use `\n` line endings for all files line-ending = "lf" # Prefer single quotes over double quotes. quote-style = "double" skip-magic-trailing-comma = true docstring-code-format = true docstring-code-line-length = "dynamic" [tool.ruff.lint.per-file-ignores] # Ignore all directories named `tests`. "tests/**" = ["D"] "matfree/backend/**" = ["D"] [tool.ruff.lint.isort] split-on-trailing-comma = false [tool.ruff.lint.pydocstyle] convention = "numpy" [tool.pytest.ini_options] addopts = "-v" testpaths = [ "tests" ]