Skip to content

Commit

Permalink
style: added toml-sort
Browse files Browse the repository at this point in the history
  • Loading branch information
martibosch committed Dec 5, 2024
1 parent d862b27 commit 4cb68c0
Show file tree
Hide file tree
Showing 2 changed files with 112 additions and 107 deletions.
6 changes: 6 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ repos:
- mdformat-gfm
- mdformat-black

- repo: https://github.com/pappasam/toml-sort
rev: v0.24.2
hooks:
- id: toml-sort-fix
args: ["--in-place"]

- repo: https://github.com/adrienverge/yamllint.git
rev: v1.35.1
hooks:
Expand Down
213 changes: 106 additions & 107 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,61 +8,81 @@ version = "0.5.1"
description = "Tree detection from aerial imagery in Python."
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.8"
dependencies = [
"dask[delayed,distributed]",
"joblib",
"laspy[lazrs] >= 2.0.0",
"lightgbm",
"numpy >= 1.15",
"opencv-python >= 4.0.0",
"pandas >= 0.23",
"pymaxflow >= 1.0.0",
"rasterio >= 1.0.0",
"scikit-image",
"scikit-learn",
"scipy >= 1.0.0",
"skops",
"shapely",
"tqdm",
"dask[delayed,distributed]",
"joblib",
"laspy[lazrs] >= 2.0.0",
"lightgbm",
"numpy >= 1.15",
"opencv-python >= 4.0.0",
"pandas >= 0.23",
"pymaxflow >= 1.0.0",
"rasterio >= 1.0.0",
"scikit-image",
"scikit-learn",
"scipy >= 1.0.0",
"skops",
"shapely",
"tqdm"
]

[project.urls]
Repository = "https://github.com/martibosch/detectree"

[project.scripts]
detectree = "detectree.cli.main:cli"

[project.optional-dependencies]
test = ["coverage[toml]", "pytest", "pytest-cov", "ruff"]
dev = ["build", "commitizen", "pre-commit", "pip", "toml", "tox", "twine"]
doc = ["m2r2", "pydata-sphinx-theme", "sphinx"]

[tool.setuptools.packages.find]
include = ["detectree", "detectree.*"]
[project.scripts]
detectree = "detectree.cli.main:cli"

[project.urls]
Repository = "https://github.com/martibosch/detectree"

[tool.codespell]
skip = "CHANGELOG.md,paper/paper.bib"

[tool.commitizen]
name = "cz_conventional_commits"
tag_format = "v$version"
version_provider = "pep621"
version_files = [
"detectree/__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 = ["detectree"]

[tool.ruff]
line-length = 88

[tool.ruff.lint]
select = ["D", "E", "F", "I", "ARG"]

[tool.ruff.lint.pydocstyle]
convention = "numpy"

[tool.ruff.lint.isort]
known-first-party = ["detectree"]

Expand All @@ -71,111 +91,90 @@ known-first-party = ["detectree"]
"tests/test_detectree.py" = ["D"]
"docs/src/conf.py" = ["D"]

[tool.coverage.run]
source = ["detectree"]

[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 = [
"detectree/__init__.py",
"pyproject.toml:version"
]
[tool.ruff.lint.pydocstyle]
convention = "numpy"

[tool.codespell]
skip = "CHANGELOG.md,paper/paper.bib"
[tool.setuptools.packages.find]
include = ["detectree", "detectree.*"]

[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.env.lint]
commands = [
[
[
"python",
"-m",
"build"
],
[
[
"python",
"-m",
"build",
],
[
"sphinx-build",
"docs",
"docs/_build",
],
[
"twine",
"check",
"dist/*",
],
"sphinx-build",
"docs",
"docs/_build"
],
[
"twine",
"check",
"dist/*"
]
]
]
extras = [
"dev",
"doc",
"test",
"dev",
"doc",
"test"
]
whitelist_externals = [
"build",
"sphinx-build",
"twine",
"build",
"sphinx-build",
"twine"
]

[tool.tox.env_run_base]
commands = [
[
"pytest",
"-s",
"--cov=detectree",
"--cov-append",
"--cov-report=xml",
"--cov-report",
"term-missing",
"tests",
],
[
"pytest",
"-s",
"--cov=detectree",
"--cov-append",
"--cov-report=xml",
"--cov-report",
"term-missing",
"tests"
]
]
extras = [
"test",
"test"
]
whitelist_externals = [
"pytest",
"pytest"
]

[tool.tox.gh.python]
"3.9" = [
"3.9",
"3.9"
]
"3.10" = [
"3.10",
"3.10"
]
"3.11" = [
"3.11",
"3.11"
]
"3.12" = [
"3.12",
"3.12"
]
"3.13" = [
"3.13",
"lint",
"3.13",
"lint"
]

0 comments on commit 4cb68c0

Please sign in to comment.