-
Notifications
You must be signed in to change notification settings - Fork 22
Expand file tree
/
Copy pathpyproject.toml
More file actions
259 lines (246 loc) · 8.03 KB
/
Copy pathpyproject.toml
File metadata and controls
259 lines (246 loc) · 8.03 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
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "noaadata"
version = "0.46"
description = "Encode/decode NOAA co-ops marine data and marine AIS"
readme = "README.md"
requires-python = ">=3.14"
license = { text = "Apache-2.0" }
authors = [
{ name = "Kurt Schwehr", email = "schwehr@gmail.com" }
]
keywords = ["AIS", "binary messages", "NMEA"]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Environment :: Console",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python :: 3.14",
"Topic :: Communications",
"Topic :: Database",
"Topic :: Scientific/Engineering :: Information Analysis",
"Topic :: System :: Networking",
]
dependencies = [
"bitvector-modern>=0.0.7",
"ntplib>=0.4.0",
"numpy>=1.26.0",
"psycopg2-binary>=2.9",
]
[project.optional-dependencies]
db = [
"psycopg2-binary>=2.9",
"sqlalchemy>=2.0",
]
gis = [
"lxml>=5.0",
]
[dependency-groups]
dev = [
"pre-commit",
"pytest",
"pytest-cov",
"pytest-benchmark",
"hypothesis",
"hypofuzz",
"ruff",
"mdformat",
"codespell",
"ty",
"mypy",
"pyright",
"pyrefly",
"semgrep",
"bandit",
"zizmor",
"mkdocs-material",
"mkdocstrings[python]",
]
[tool.hatch.build.targets.wheel]
packages = [
"src/noaadata",
"src/ais",
"src/aisutils",
"src/nmea",
]
[project.scripts]
ais-5report = "noaadata.cli.ais_5report:main"
ais-bin-msgs = "noaadata.cli.ais_bin_msgs:main"
ais-build-postgis = "noaadata.cli.ais_build_postgis:main"
ais-build-sqlite = "noaadata.cli.ais_build_sqlite:main"
ais-build-sqlite3 = "noaadata.cli.ais_build_sqlite3:main"
ais-db = "noaadata.cli.ais_db:main"
ais-db-rebuild-cache-tables = "noaadata.cli.ais_db_rebuild_cache_tables:main"
ais-decimate-traffic = "noaadata.cli.ais_decimate_traffic:main"
ais-distance = "noaadata.cli.ais_distance:main"
ais-dump-mmsi = "noaadata.cli.ais_dump_mmsi:main"
ais-dumpnames = "noaadata.cli.ais_dumpnames:main"
ais-filter = "noaadata.cli.ais_filter:main"
ais-info = "noaadata.cli.ais_info:main"
ais-liststations = "noaadata.cli.ais_liststations:main"
ais-names = "noaadata.cli.ais_names:main"
ais-net-to-postgis = "noaadata.cli.ais_net_to_postgis:main"
ais-nmea-find-matches = "noaadata.cli.ais_nmea_find_matches:main"
ais-nmea-info = "noaadata.cli.ais_nmea_info:main"
ais-nmea-remove-dups = "noaadata.cli.ais_nmea_remove_dups:main"
ais-nmea-uptime = "noaadata.cli.ais_nmea_uptime:main"
ais-nmea-uptime2 = "noaadata.cli.ais_nmea_uptime2:main"
ais-nmea-uscg-timeshift = "noaadata.cli.ais_nmea_uscg_timeshift:main"
ais-normalize = "noaadata.cli.ais_normalize:main"
ais-oldlog2newlog = "noaadata.cli.ais_oldlog2newlog:main"
ais-pg-create-transit-table = "noaadata.cli.ais_pg_create_transit_table:main"
ais-pg-grid = "noaadata.cli.ais_pg_grid:main"
ais-pg-grid-transits = "noaadata.cli.ais_pg_grid_transits:main"
ais-pg-transitlines = "noaadata.cli.ais_pg_transitlines:main"
ais-pg-transitlines-noMakeLine = "noaadata.cli.ais_pg_transitlines_noMakeLine:main"
ais-port-forward = "noaadata.cli.ais_port_forward:main"
ais-position-in-polygon = "noaadata.cli.ais_position_in_polygon:main"
ais-positions = "noaadata.cli.ais_positions:main"
ais-receive-bbox = "noaadata.cli.ais_receive_bbox:main"
ais-sqlite-bsreport-analysis = "noaadata.cli.ais_sqlite_bsreport_analysis:main"
ais-towersplit = "noaadata.cli.ais_towersplit:main"
ais-traffic-analysis = "noaadata.cli.ais_traffic_analysis:main"
ais-transits = "noaadata.cli.ais_transits:main"
ais-uniq = "noaadata.cli.ais_uniq:main"
ais-uscg-splitstations = "noaadata.cli.ais_uscg_splitstations:main"
aisuser-monitor = "noaadata.cli.aisuser_monitor:main"
aisxml2wxpy = "noaadata.cli.aisxml2wxpy:main"
aisxmlbinmsg2py = "noaadata.cli.aisxmlbinmsg2py:main"
bbox-to-kml = "noaadata.cli.bbox_to_kml:main"
decimate = "noaadata.cli.decimate:main"
dump-wl = "noaadata.cli.dump_wl:main"
find-missing-logs = "noaadata.cli.find_missing_logs:main"
jpegexif2kml = "noaadata.cli.jpegexif2kml:main"
log-udp = "noaadata.cli.log_udp:main"
logger-handlers = "noaadata.cli.logger_handlers:main"
nais-pg-realtime-reaper = "noaadata.cli.nais_pg_realtime_reaper:main"
nais2postgis = "noaadata.cli.nais2postgis:main"
port-server = "noaadata.cli.port_server:main"
serial-logger = "noaadata.cli.serial_logger:main"
serial-logger2 = "noaadata.cli.serial_logger2:main"
serial-send = "noaadata.cli.serial_send:main"
serial-send2 = "noaadata.cli.serial_send2:main"
socket-logger = "noaadata.cli.socket_logger:main"
socket-send = "noaadata.cli.socket_send:main"
test-ais-server = "noaadata.cli.test_ais_server:main"
tide4-process-logs = "noaadata.cli.tide4_process_logs:main"
xy-pos-filter = "noaadata.cli.xy_pos_filter:main"
xy2kml = "noaadata.cli.xy2kml:main"
xy2kmlline = "noaadata.cli.xy2kmlline:main"
xymt2kml = "noaadata.cli.xymt2kml:main"
[tool.pytest.ini_options]
addopts = "--cov=noaadata --cov=ais --cov=aisutils --cov=nmea --cov-report=term-missing --import-mode=importlib"
testpaths = ["test", "tests", "src"]
python_files = ["test*.py", "*_test.py", "*_tests.py"]
[tool.hypofuzz]
tasks_directory = "tests/test_properties"
[tool.ruff]
target-version = "py313"
line-length = 88
src = ["src", "tests", "scripts", "scraps", "contrib"]
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"F", # Pyflakes
"W", # pycodestyle warnings
"I", # isort
"UP", # pyupgrade
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"SIM", # flake8-simplify
"RUF", # Ruff-specific rules
"PT", # flake8-pytest-style
"PL", # Pylint
]
ignore = [
"PLR0911", # Too many return statements
"PLR0912", # Too many branches
"PLR0913", # Too many arguments in function definition
"PLR0915", # Too many statements
"PLR0917", # Too many positional arguments
"PLR2004", # Magic value used in comparison
"PLR0124", # Name compared with itself (used in test_uscg.py __eq__ test)
"PLW2901", # `for` loop variable overwritten by assignment
"PLW0129", # Asserting on string literal
"PLW0602", # Global variable not assigned
"PLW1641", # Object does not implement __hash__
"E501", # Line too long (handled by ruff format)
"E741", # Ambiguous variable name
"F821", # Undefined name (legacy generator/compiler files)
"F401", # Unused import (legacy compiler files)
"F405", # Undefined local with import star
"F403", # Import star used
"F601", # Multi-value repeated key
"F811", # Redefined while unused
"E701", # Multiple statements on one line
"E702", # Multiple statements on one line semicolon
"E703", # Useless semicolon
"E721", # Type comparison
"E722", # Bare except
"E402", # Module import not at top
"UP031", # Printf string formatting
"PLC0415", # Import outside top level
"PLC0206", # Extracting value from dict without items()
"PT009", # Pytest unittest assertion
"SIM102", # Collapsible if
"SIM103", # Return negated condition directly
"SIM105", # Suppressible exception
"SIM108", # Use ternary operator
]
[tool.ruff.lint.per-file-ignores]
"tests/*" = ["PLR2004", "S101", "PT011"]
"test/*" = ["PLR2004", "S101", "PT011"]
[tool.codespell]
skip = [
"*.ais",
"*.bib",
"*.html",
"*.lock",
".git",
".uv",
".venv",
"build",
"contrib/*",
"dist",
"doc/*",
"scraps/*",
"site",
"test/*",
]
ignore-words-list = [
"mmsi",
"sog",
"cog",
"nmea",
"co-ops",
"rtcm",
"ser",
"inport",
"inPort",
"startd",
"startD",
"unparseable",
"unparse",
"teather",
"thos",
"pring",
"preceeding",
"happenin",
"wieghted",
"builting",
"hight",
"keyworks",
"toke",
]
[tool.mypy]
python_version = "3.14"
ignore_missing_imports = true
warn_redundant_casts = true
warn_unused_ignores = true
disable_error_code = ["var-annotated", "name-defined", "assignment", "operator", "return-value", "no-redef", "arg-type"]
[[tool.uv.index]]
name = "pypi"
url = "https://pypi.org/simple"
default = true