-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
style: added toml-sort pre-commit hook
- Loading branch information
1 parent
75907a9
commit 8cddb40
Showing
2 changed files
with
102 additions
and
98 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,45 +8,71 @@ version = "3.0.1" | |
description = "Computing landscape metrics in the Python ecosystem." | ||
readme = "README.md" | ||
authors = [ | ||
{ name = "Martí Bosch", email = "[email protected]" }, | ||
{name = "Martí Bosch", email = "[email protected]"} | ||
] | ||
license = { text = "GPL-3.0" } | ||
license = {text = "GPL-3.0"} | ||
classifiers = [ | ||
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)", | ||
"Natural Language :: English", | ||
"Programming Language :: Python :: 3", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: 3.11", | ||
"Programming Language :: Python :: 3.12", | ||
"Programming Language :: Python :: 3.13", | ||
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)", | ||
"Natural Language :: English", | ||
"Programming Language :: Python :: 3", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: 3.11", | ||
"Programming Language :: Python :: 3.12", | ||
"Programming Language :: Python :: 3.13" | ||
] | ||
requires-python = ">=3.9" | ||
dependencies = [ | ||
"dask", | ||
"geopandas", | ||
"matplotlib >= 2.2", | ||
"numpy >= 1.15", | ||
"pandas >= 0.23", | ||
"rasterio >= 1.0.0", | ||
"scipy >= 1.0.0", | ||
"dask", | ||
"geopandas", | ||
"matplotlib >= 2.2", | ||
"numpy >= 1.15", | ||
"pandas >= 0.23", | ||
"rasterio >= 1.0.0", | ||
"scipy >= 1.0.0" | ||
] | ||
|
||
[project.urls] | ||
Repository = "https://github.com/martibosch/pylandstats" | ||
|
||
[project.optional-dependencies] | ||
test = ["coverage[toml]", "pytest", "pytest-cov", "ruff"] | ||
dev = ["build", "commitizen", "nox", "pre-commit", "pip", "toml", "twine"] | ||
doc = ["m2r2", "myst-nb", "pydata-sphinx-theme", "sphinx"] | ||
|
||
# [tool.setuptools] | ||
# ext-modules = [ | ||
# {name="adjacency", sources=["pylandstats/adjacency.pyx"]} | ||
# ] | ||
[project.urls] | ||
Repository = "https://github.com/martibosch/pylandstats" | ||
|
||
[tool.setuptools.packages.find] | ||
include = ["pylandstats", "pylandstats.*"] | ||
[tool.cibuildwheel] | ||
build = ["cp39-*", "cp310-*", "cp311-*", "cp312-*", "cp313-*"] | ||
skip = "*-musllinux_i686" | ||
|
||
[tool.codespell] | ||
ignore-words-list = "te" | ||
skip = "CHANGELOG.md" | ||
|
||
[tool.commitizen] | ||
name = "cz_conventional_commits" | ||
tag_format = "v$version" | ||
version_provider = "pep621" | ||
version_files = [ | ||
"pylandstats/__init__.py", | ||
"pyproject.toml:version" | ||
] | ||
|
||
[tool.coverage.report] | ||
exclude_lines = [ | ||
"if self.debug:", | ||
"pragma: no cover", | ||
"raise NotImplementedError", | ||
"except ModuleNotFoundError", | ||
"except ImportError" | ||
] | ||
ignore_errors = true | ||
omit = ["tests/*", "docs/conf.py"] | ||
|
||
[tool.coverage.run] | ||
source = ["pylandstats"] | ||
|
||
[tool.pytest.ini_options] | ||
addopts = ["--import-mode=importlib"] | ||
|
||
[tool.ruff] | ||
line-length = 88 | ||
|
@@ -57,106 +83,78 @@ docstring-code-format = true | |
[tool.ruff.lint] | ||
select = ["D", "E", "F", "I"] | ||
|
||
[tool.ruff.lint.pydocstyle] | ||
convention = "numpy" | ||
|
||
[tool.ruff.lint.isort] | ||
known-first-party = ["pylandstats"] | ||
|
||
[tool.ruff.lint.per-file-ignores] | ||
"**/__init__.py" = ["F403"] | ||
"pylandstats/landscape.py" = ["D401"] # for metric docstrings | ||
"pylandstats/landscape.py" = ["D401"] # for metric docstrings | ||
"tests/test_pylandstats.py" = ["D"] | ||
|
||
[tool.coverage.run] | ||
source = ["pylandstats"] | ||
|
||
[tool.coverage.report] | ||
exclude_lines = [ | ||
"if self.debug:", | ||
"pragma: no cover", | ||
"raise NotImplementedError", | ||
"except ModuleNotFoundError", | ||
"except ImportError", | ||
] | ||
ignore_errors = true | ||
omit = ["tests/*", "docs/conf.py"] | ||
|
||
[tool.commitizen] | ||
name = "cz_conventional_commits" | ||
tag_format = "v$version" | ||
version_provider = "pep621" | ||
version_files = [ | ||
"pylandstats/__init__.py", | ||
"pyproject.toml:version" | ||
] | ||
|
||
|
||
[tool.cibuildwheel] | ||
build = ["cp39-*", "cp310-*", "cp311-*", "cp312-*", "cp313-*"] | ||
skip = "*-musllinux_i686" | ||
|
||
[tool.codespell] | ||
ignore-words-list = "te" | ||
skip = "CHANGELOG.md" | ||
[tool.ruff.lint.pydocstyle] | ||
convention = "numpy" | ||
|
||
[tool.pytest.ini_options] | ||
addopts = ["--import-mode=importlib"] | ||
[tool.setuptools.packages.find] | ||
include = ["pylandstats", "pylandstats.*"] | ||
|
||
[tool.tox] | ||
env_list = [ | ||
"lint", | ||
"py39", | ||
"py310", | ||
"py311", | ||
"py312", | ||
"py313", | ||
"lint", | ||
"py39", | ||
"py310", | ||
"py311", | ||
"py312", | ||
"py313" | ||
] | ||
requires = [ | ||
"tox>=4.19", | ||
"tox>=4.19" | ||
] | ||
|
||
[tool.tox.gh.python] | ||
"3.13" = ["3.13", "lint"] | ||
"3.12" = ["3.12"] | ||
"3.11" = ["3.11"] | ||
"3.10" = ["3.10"] | ||
"3.9" = ["3.9"] | ||
[tool.tox.env.lint] | ||
commands = [ | ||
[ | ||
["python", "-m", "build"], | ||
["sphinx-build", "docs", "docs/_build"], | ||
["twine", "check", "dist/*"] | ||
] | ||
] | ||
extras = [ | ||
"dev", | ||
"doc", | ||
"test" | ||
] | ||
whitelist_externals = [ | ||
"build", | ||
"sphinx-build", | ||
"twine" | ||
] | ||
|
||
[tool.tox.env_run_base] | ||
commands = [[ | ||
commands = [ | ||
[ | ||
"pytest", | ||
"-s", | ||
"--cov=pylandstats", | ||
"--cov-append", | ||
"--cov-report=xml", | ||
"--cov-report", | ||
"term-missing", | ||
"tests", | ||
]] | ||
"tests" | ||
] | ||
] | ||
conda_deps = [ | ||
"gdal>=3.3", | ||
"gdal>=3.3" | ||
] | ||
extras = [ | ||
"test", | ||
"test" | ||
] | ||
whitelist_externals = [ | ||
"pytest", | ||
"pytest" | ||
] | ||
|
||
[tool.tox.env.lint] | ||
commands = [[ | ||
["python", "-m", "build"], | ||
["sphinx-build", "docs", "docs/_build"], | ||
["twine", "check", "dist/*"], | ||
]] | ||
extras = [ | ||
"dev", | ||
"doc", | ||
"test", | ||
] | ||
whitelist_externals = [ | ||
"build", | ||
"sphinx-build", | ||
"twine", | ||
] | ||
[tool.tox.gh.python] | ||
"3.13" = ["3.13", "lint"] | ||
"3.12" = ["3.12"] | ||
"3.11" = ["3.11"] | ||
"3.10" = ["3.10"] | ||
"3.9" = ["3.9"] |