-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bundled all meta-information in pyproject.toml (#154)
* Bundled all meta-information in pyproject.toml * Removed python 3.11 claim
- Loading branch information
Showing
5 changed files
with
122 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,123 @@ | ||
[build-system] | ||
requires = [ | ||
"setuptools>=42", | ||
"wheel", | ||
"setuptools_scm[toml]>=6.0", | ||
"setuptools>=64", | ||
"setuptools_scm>=8", | ||
] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[project] | ||
name = "matfree" | ||
authors = [ | ||
{name="Nicholas Krämer", email="[email protected]"} | ||
] | ||
description = "Matrix-free numerical linear algebra." | ||
readme = "README.md" | ||
requires-python=">=3.8" | ||
classifiers = [ | ||
"License :: OSI Approved :: MIT License", | ||
"Operating System :: OS Independent", | ||
"Programming Language :: Python", | ||
"Programming Language :: Python :: 3.8", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.10", | ||
] | ||
dynamic = ["version"] | ||
|
||
|
||
[project.optional-dependencies] | ||
cpu = [ | ||
"jax[cpu]", | ||
] | ||
test =[ | ||
"pytest", | ||
"pytest-cases", | ||
] | ||
lint =[ | ||
"matfree[test]", | ||
"pre-commit", | ||
] | ||
format =[ | ||
"isort", | ||
"black", | ||
] | ||
doc = [ | ||
"mkdocs", | ||
"mkdocs-material", | ||
"mkdocstrings", | ||
"mkdocstrings-python", | ||
"matplotlib", | ||
"tqdm", | ||
] | ||
full = [ | ||
"matfree[cpu]", | ||
"matfree[test]", | ||
"matfree[lint]", | ||
"matfree[format]", | ||
"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] | ||
local_scheme = "dirty-tag" | ||
write_to = "matfree/_version.py" | ||
write_to_template = """ | ||
# pylint: skip-file | ||
# coding: utf-8 | ||
# file generated by setuptools_scm | ||
# don't change, don't track in version control | ||
version = \"{version}\" | ||
""" | ||
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"] | ||
# See: https://beta.ruff.rs/docs/rules/ | ||
select = ["E", "F", "D", "UP", "B", "A", "ICN", "PT", "Q", "RET", "SIM", "ARG", "RUF"] | ||
select = [ | ||
# pycodestyle (warning, error) | ||
"W", | ||
"E", | ||
# Pyflakes: | ||
"F", | ||
# pydocstyle: | ||
"D", | ||
# 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", | ||
] | ||
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", | ||
# Magic methods don't need a docstring: | ||
"D105", | ||
] | ||
|
||
[tool.ruff.per-file-ignores] | ||
|
@@ -39,3 +131,17 @@ ignore = [ | |
"matfree/backend/progressbar.py" = ["D103"] | ||
"matfree/backend/testing.py" = ["D103"] | ||
"matfree/backend/time.py" = ["D103"] | ||
|
||
[tool.ruff.pydocstyle] | ||
convention = "numpy" | ||
|
||
|
||
[tool.isort] | ||
multi_line_output = "3" | ||
include_trailing_comma = "true" | ||
force_grid_wrap = "0" | ||
use_parentheses = "true" | ||
line_length = "88" | ||
|
||
[tool.black] | ||
line-length = "88" |