forked from GenericMappingTools/pygmt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
168 lines (150 loc) · 4.9 KB
/
pyproject.toml
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
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
[build-system]
requires = ["setuptools>=64", "setuptools_scm[toml]>=6.2"]
build-backend = "setuptools.build_meta"
[project]
name = "pygmt"
description = "A Python interface for the Generic Mapping Tools"
readme = "README.rst"
requires-python = ">=3.9"
authors = [{name = "The PyGMT Developers", email = "[email protected]"}]
keywords = [
"cartography",
"geodesy",
"geology",
"geophysics",
"geospatial",
"oceanography",
"seismology",
]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Science/Research",
"Intended Audience :: Developers",
"Intended Audience :: Education",
"Topic :: Scientific/Engineering",
"Topic :: Software Development :: Libraries",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"License :: OSI Approved :: BSD License",
]
dependencies = [
"numpy>=1.23",
"pandas",
"xarray",
"netCDF4",
"packaging",
]
dynamic = ["version"]
[project.optional-dependencies]
all = [
"contextily",
"geopandas",
"ipython",
"rioxarray",
]
[project.urls]
homepage = "https://www.pygmt.org"
documentation = "https://www.pygmt.org"
repository = "https://github.com/GenericMappingTools/pygmt"
changelog = "https://www.pygmt.org/latest/changes.html"
[tool.setuptools]
platforms = ["Any"]
license-files = ["LICENSE.txt"]
[tool.setuptools.packages.find]
include = ["pygmt*"]
exclude = ["doc"]
[tool.setuptools_scm]
local_scheme = "node-and-date"
fallback_version = "999.999.999+unknown"
[tool.codespell]
ignore-words-list = "astroid,oints,reenable,tripel,trough"
[tool.coverage.run]
omit = ["*/tests/*", "*pygmt/__init__.py"]
[tool.mypy]
exclude = ["pygmt/tests/"]
ignore_missing_imports = true
[tool.ruff]
line-length = 88 # E501 (line-too-long)
show-source = true
[tool.ruff.format]
line-ending = "lf" # Use UNIX `\n` line endings for all files
docstring-code-format = true
docstring-code-line-length = "dynamic"
[tool.ruff.lint]
select = [
"A", # flake8-builtins
"ARG", # flake8-unused-arguments
"B", # flake8-bugbear
"BLE", # flake8-blind-except
"C4", # flake8-comprehensions
"D", # pydocstyle
"E", # pycodestyle
"EXE", # flake8-executable
"F", # pyflakes
"FA", # flake8-future-annotations
"FLY", # flynt
"I", # isort
"ICN", # flake8-import-conventions
"ISC", # flake8-implicit-str-concat
"N", # pep8-naming
"NPY", # numpy
"PD", # pandas-vet
"PERF", # perflint
"PGH", # pygrep-hooks
"PIE", # flake8-pie
"PL", # pylint
"PT", # flake8-pytest-style
"RET", # flake8-return
"RSE", # flake8-raise
"RUF", # ruff-specific
"S", # flake8-bandit
"SIM", # flake8-simplify
"T20", # flake8-print
"TCH", # flake8-type-checking
"TID", # flake8-tidy-imports
"UP", # pyupgrade
"W", # pycodestyle warnings
"YTT", # flake8-2020
]
extend-select = [
"D213", # Summary lines should be positioned on the second physical line of the docstring.
"D410", # A blank line after section headings.
]
ignore = [
"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
"D400", # First line should end with a period
"D401", # First line of docstring should be in imperative mood
"D412", # No blank lines allowed between a section header and its content
"E501", # Avoid enforcing line-length violations
"ISC001", # Single-line-implicit-string-concatenation, conflict with formatter
"PD901", # Allow using the generic variable name `df` for DataFrames
"PT023", # Allow using pytest marker without parentheses
"PLR2004", # Allow any magic values
"RET504", # Allow variable assignment and return immediately for readability
"S603", # Allow method calls that initiate a subprocess without a shell
"SIM117", # Allow nested `with` statements
]
[tool.ruff.lint.isort]
known-third-party = ["pygmt"]
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["F401"] # Ignore `F401` (unused-import) in all `__init__.py` files
"*/tests/test_*.py" = ["S101"] # Ignore `S101` (use of assert) in all tests files
"examples/**/*.py" = ["T201"] # Allow `print` in examples
[tool.ruff.lint.pycodestyle]
max-doc-length = 88
[tool.ruff.lint.pydocstyle]
# See https://docs.astral.sh/ruff/faq/#does-ruff-support-numpy-or-google-style-docstrings
# for the enabled/disabled rules for the "numpy" convention.
convention = "numpy"
[tool.ruff.lint.pylint]
max-args=10
[tool.pytest.ini_options]
minversion = "6.0"
addopts = "--verbose --durations=0 --durations-min=0.2 --doctest-modules --mpl --mpl-results-path=results"
markers = [
"benchmark: mark a test with custom benchmark settings.",
]