-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathpyproject.toml
More file actions
148 lines (130 loc) · 4.04 KB
/
Copy pathpyproject.toml
File metadata and controls
148 lines (130 loc) · 4.04 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
[build-system]
requires = ["hatchling>=1.27.0"]
build-backend = "hatchling.build"
[project]
name = "numbacs"
dynamic = ["version"]
description = 'Numba-accelerated coherent structure package.'
readme = "README.md"
requires-python = ">=3.10, <3.12"
license = "MPL-2.0"
keywords = [
"applied-mathematics",
"dynamical-systems",
"numba",
"fluid-dynamics",
"lcs",
"ftle",
"lagrangian-coherent-structures"
]
authors = [
{ name = "alb3rtjarvis", email = "ajarvis@vt.edu" },
]
classifiers = [
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)",
"Operating System :: OS Independent",
]
dependencies = [
"interpolation >= 2.2.6",
"numbalsoda",
"numba",
"contourpy",
"numpy",
"scipy"
]
[project.optional-dependencies]
test = [
"pytest",
"pytest-cov",
]
lint = [
"ruff",
]
docs = [
"sphinx",
"sphinx-rtd-theme",
"myst-parser",
"sphinx-autoapi",
"sphinxcontrib-bibtex",
"sphinx-gallery"
]
dev = [
"numbacs[test,lint,docs]",
"pre-commit",
]
[project.urls]
Documentation = "https://numbacs.readthedocs.io/"
Issues = "https://github.com/alb3rtjarvis/numbacs/issues"
Source = "https://github.com/alb3rtjarvis/numbacs"
[tool.hatch.build.targets.sdist]
exclude = [
"docs",
"examples/data",
"img"
]
[tool.hatch.version]
path = "src/numbacs/__init__.py"
[tool.hatch.envs.default]
features = ["dev"]
# Hatch scripts
[tool.hatch.envs.default.scripts]
test = "pytest {args:tests}"
cov = "pytest --cov=src/numbacs --cov-report=xml --cov-report=term-missing {args:tests}"
lint = "ruff check src tests examples {args}"
format = "ruff format src tests examples && ruff check --fix src tests examples {args}"
# Ruff Configuration
[tool.ruff]
target-version = "py310"
line-length = 100
exclude = [
".bzr", ".direnv", ".eggs", ".git", ".hg", ".mypy_cache", ".nox",
".pants.d", ".ruff_cache", ".svn", ".tox", ".venv", "__pypackages__",
"_build", "buck-out", "build", "dist", "node_modules", "venv",
"docs/source/conf.py", "docs/source/auto_examples", "tests"
]
[tool.ruff.lint]
select = ["E", "W", "F", "D", "UP"]
# E: Pycodestyle Errors (e.g., syntax errors)
# W: Pycodestyle Warnings (e.g., whitespace issues)
# F: Pyflakes (e.g., undefined variables, unused imports)
# I: Isort (import sorting)
# N: PEP8 Naming conventions -- removed
# D: Pydocstyle (docstring style and correctness)
# C90: McCabe complexity (flags overly complex functions) -- removed
# TID: Flake8-tidy-imports (for cleaner import statements) -- removed
# UP: Pyupgrade (suggests modern Python syntax)
# S: Flake8-bandit (checks for common security vulnerabilities) -- removed
ignore = [
"D100", # Missing docstring in public module
"D104", # Missing docstring in public package
"D107", # Missing docstring in __init__ method
"D200", # One line docstring should fit on one line
"D202", # No blank lines allowed after function docstring
"D205", # 1 blank line required between summary line and description
"D203", # Conflicts with D211: "1 blank line required before class docstring"
"D401", # First line of docstring should be in impreative mood
"F401", # "Unused" import
"E741", # Ambiguous variable
"E501", # Line too long -- formatter will fix
]
[tool.ruff.lint.per-file-ignores]
"tests/**/*.py" = ["D100", "D101", "D102", "D103"] # Ignore various "missing docstring" errors for all test files
"conftest.py" = ["D100", "D101", "D102", "D103"] # Ignore missing docstrings for pytest's conftest.py
"examples/**/*.py" = ["D100", "D101", "D102", "D103", "D400", "E402", "T201"] # For examples: ignore missing docstrings, E402 (imports not at top), T201 (print statements)
[tool.ruff.lint.pydocstyle]
convention = "numpy"
[tool.ruff.format]
# Using default Ruff formatter settings (Black-compatible).
[tool.pytest.ini_options]
testpaths = ["tests"]
addopts = "-ra"
[tool.coverage.run]
source = ["src/numbacs"]
branch = true
omit = ["tests/*", "*/__init__.py"]
[tool.coverage.report]
show_missing = true
fail_under = 0
exclude_lines = []