-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathpyproject.toml
More file actions
273 lines (243 loc) · 8.25 KB
/
pyproject.toml
File metadata and controls
273 lines (243 loc) · 8.25 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
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
# Build system requirements.
[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"
# Project metadata.
[project]
name = "gfw-api-python-client"
version = "1.4.0"
description = "Python package for accessing data from Global Fishing Watch APIs."
readme = "README.md"
requires-python = ">=3.11"
license = { text = "Apache License 2.0" }
authors = [
{ name = "Global Fishing Watch", email = "apis@globalfishingwatch.org" },
]
maintainers = [
{ name = "Global Fishing Watch", email = "apis@globalfishingwatch.org" },
]
keywords = [
"global fishing watch",
"gfw",
"apis",
"api client",
"fishing data",
"satellite data",
"vessel data",
"marine data",
"geospatial data",
"ocean monitoring",
"marine research",
"marine conservation",
"environmental research",
"ocean sustainability",
"ais",
"vms",
]
classifiers = [
"Development Status :: 4 - Beta",
"Environment :: Console",
"Framework :: Pydantic",
"Framework :: Pydantic :: 2",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: Apache Software License",
"Natural Language :: English",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Topic :: Software Development",
"Topic :: Software Development :: Libraries",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Utilities",
"Topic :: Scientific/Engineering",
"Typing :: Typed",
]
dependencies = [
"httpx~=0.28", # Making HTTP requests
"typing-extensions~=4.15", # Backported Type Hints for Python 3.8+
"pydantic~=2.12", # Data validation and serialization
"pydantic-settings~=2.11", # Type-hinted configurations or settings
"geojson-pydantic~=2.1", # Data models for the GeoJSON specification
"mapbox-vector-tile~=2.2", # Encoding and decoding Mapbox Vector Tiles (MVT)
"mercantile~=1.2", # Web mercator XYZ tile utilities
"pandas~=2.3", # Data analysis and manipulation
"geopandas~=1.1", # Geospatial data analysis and manipulation
]
[project.optional-dependencies]
# Linting and code quality tools
lint = [
"black[jupyter]>=25.9.0", # Code formatting tool
"isort>=7.0.0", # Python imports sorting tool
"mypy>=1.18.2", # Static type checker
"pydocstyle>=6.3.0", # Python docstring style checker
"ruff>=0.14.2", # Linter and code analysis tool
"codespell[toml]>=2.4.1", # Spell checker for code
]
# Testing tools
test = [
"pytest>=8.4.2", # Core testing framework
"pytest-asyncio>=1.2.0", # Asyncio plugin for pytest
"pytest-cov>=7.0.0", # Coverage plugin for pytest
"pytest-mock>=3.15.1", # Mocking plugin for pytest
"pytest-xdist>=3.8.0", # Parallel test execution for pytest
"pytest-timeout>=2.4.0", # Timeout support for pytest
"coverage[toml]>=7.11.0", # Code coverage reporting
"respx>=0.22.0", # Utility for mocking httpx
]
# Development workflow and tools
dev = [
"commitizen>=4.9.1", # Standardized commit messages and versioning
"pre-commit>=4.3.0", # Framework for managing pre-commit hooks
"pip-audit>=2.9.0", # Audit for finding vulnerabilities in dependencies
]
# Build tools
build = [
"build>=1.2.2", # Python PEP 517 compliant build system
"check-wheel-contents>=0.6.3", # Check wheels have the right contents
"pydistcheck>=0.10.0", # Inspect Python package distributions for common problems
"pyroma>=5.0", # Test project's packaging friendliness
"setuptools>=80.9.0", # Python packaging library
"twine>=6.2.0", # For uploading Python packages to PyPI
]
# Documentation tools
docs = [
"sphinx>=8.2.3", # Tool for generating documentation
"furo>=2025.9.25", # Sphinx theme for beautiful documentation
"myst-parser>=4.0.1", # Writing documentation with Markdown in Sphinx
"myst-nb>=1.3.0", # Writing documentation with Jupyter Notebook in Sphinx
"sphinx-copybutton>=0.5.2", # Add a "copy" button to code blocks in Sphinx
"sphinx-autobuild>=2025.8.25", # Build, watch and serve documentation with live reload in the browser
"sphinx-inline-tabs>=2023.4.21", # Add inline tabbed content to documentation
"sphinx-autodoc2>=0.5.0", # Generates API documentation for Python packages
]
# Jupyter notebook and interactive tools
notebooks = [
"ipykernel>=7.1.0", # Jupyter kernel for Python
"ipython>=9.6.0", # Enhanced interactive Python shell
"jupyterlab>=4.4.10", # Jupyter's next-generation web-based interface
"watermark>=2.5.0", # Add timestamps and version info to Jupyter notebook
]
[project.urls]
Homepage = "https://github.com/GlobalFishingWatch/gfw-api-python-client"
Documentation = "https://globalfishingwatch.github.io/gfw-api-python-client/"
Changelog = "https://github.com/GlobalFishingWatch/gfw-api-python-client/blob/main/CHANGELOG.md"
Repository = "https://github.com/GlobalFishingWatch/gfw-api-python-client"
Issues = "https://github.com/GlobalFishingWatch/gfw-api-python-client/issues"
[tool.ruff]
fix = true
line-length = 88
src = ["src", "tests"]
target-version = "py311"
[tool.ruff.format]
docstring-code-format = true
[tool.ruff.lint]
unfixable = []
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"RUF", # Ruff-specific rules
"ANN", # flake8-annotations
"C", # flake8-comprehensions
"B", # flake8-bugbear
"I", # isort
"D", # pydocstyle
]
ignore = [
"E501", # line too long, handled by black
"C901", # too complex
"ANN401", # Dynamically typed expressions (typing.Any) are disallowed in `**kwargs`
]
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["F401"]
[tool.ruff.lint.isort]
lines-after-imports = 2
lines-between-types = 1
known-first-party = ["gfwapiclient", "tests"]
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.black]
target-version = ["py311"]
line-length = 88
[tool.isort]
profile = "black"
line_length = 88
known_first_party = ["gfwapiclient"]
lines_after_imports = 2
lines_between_sections = 1
lines_between_types = 1
ensure_newline_before_comments = true
force_sort_within_sections = true
src_paths = ["src", "tests"]
[tool.pydocstyle]
convention = "google"
[tool.mypy]
strict = true
ignore_missing_imports = true
files = "src,tests"
[tool.pytest.ini_options]
minversion = "6.0"
testpaths = ["tests"]
asyncio_default_fixture_loop_scope = "function"
asyncio_mode = "auto"
[tool.coverage.run]
source = ["src", "tests"]
branch = true
parallel = true
context = "${CONTEXT}"
[tool.coverage.report]
precision = 2
skip_empty = true
ignore_errors = false
show_missing = true
exclude_lines = [
# Have to re-enable the standard pragma
"pragma: no cover",
# Don't complain about missing debug-only code:s
"def __repr__",
"if self.debug",
# Don't complain if tests don't hit defensive assertion code:
"raise AssertionError",
"raise NotImplementedError",
"AbstractMethodError",
# Don't complain if non-runnable code isn't run:
"if 0:",
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
]
[tool.commitizen]
name = "cz_conventional_commits"
version = "1.4.0"
version_files = [
"pyproject.toml:version",
"src/gfwapiclient/__version__.py:__version__",
"docs/source/conf.py:release",
"CITATION.cff:version",
]
version_provider = "commitizen"
version_scheme = "semver"
major_version_zero = false
tag_format = "v$version"
update_changelog_on_bump = true
changelog_file = "CHANGELOG.md"
bump_message = "chore(release): bump to v$new_version"
[tool.codespell]
skip = ".git,env*,venv*,build*,tmp*"
[tool.pydistcheck]
inspect = false
# Build system metadata.
[tool.setuptools]
include-package-data = true
[tool.setuptools.packages.find]
where = ["src"]
include = ["gfwapiclient", "gfwapiclient.*"]
exclude = ["tests*"]
namespaces = false
[tool.setuptools.package-data]
gfwapiclient = ["py.typed"]