-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
106 lines (93 loc) · 3.33 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
[tool.poetry]
name = "ops-data-store"
version = "0.10.0"
description = "Data store for hosted and managed datasets for BAS Field Operations and Air Unit."
authors = ["Felix Fennell <[email protected]>"]
license = "MIT"
readme = "README.md"
packages = [{include = "ops_data_store", from = "src"}]
[tool.poetry.scripts]
ods-ctl = 'ops_data_store.cli:app'
[tool.poetry.dependencies]
environs = "^11.0.0"
python = "^3.9"
psycopg = {version = "^3.2.3", extras = ["binary"]}
typer = "^0.9.0"
msal = "^1.28.0"
requests = "^2.31.0"
python-ldap = "^3.4.4"
bas-air-unit-network-dataset = "^0.5.1"
gdal = "3.4.3"
[tool.poetry.group.lint.dependencies]
ruff = "^0.8.2"
safety = "^3.0.0"
[tool.poetry.group.test.dependencies]
pytest = "^7.4.2"
pytest-cov = "^4.1.0"
pytest-mock = "^3.11.1"
pytest-random-order = "^1.1.0"
requests-mock = "^1.11.0"
[tool.ruff]
src = ["src"]
line-length = 120
target-version = "py39"
[tool.ruff.lint]
select = ['A','ANN','B','B9','C90','C4','D','DTZ','E','EM','ERA','F','FA','I','N','PT','PTH','RET','RUF','S','SIM','TD','TRY','UP','W']
# A | builtins (variables named after builtin names)
# ANN | annotations (type hints)
# B | bug-bear (bad code)
# B9 | bug-bear opinionated (additional bad code)
# C90 | mccabe (code complexity)
# C4 | comprehensions (list/dict/set comprehensions)
# D | pydocstyle (docstring)
# DTZ | datetimez (date/time)
# E | pycodestyle errors (PEP8)
# EM | errmsg (exceptions)
# ERA | eraticate (comments)
# F | pyflakes (invalid/bad code)
# FA | uture-annotations (type hints)
# I | isort (import ordering)
# N | pep8-naming (PEP8)
# PT | pytest-style (tests)
# PTH | use-pathlib (old syntax)
# RET | return (return statements)
# RUF | ruff (other)
# S | bandit (static security)
# SIM | simplicity (code complexity)
# TD | todos (comments)
# TRY | tryceratops (exceptions)
# UP | pyupgrade (old syntax)
# W | pycodestyle warnings (PEP8)
ignore = ['D100', 'D104', 'D107', 'D203', 'D212', 'D402', 'E501', 'PT001', 'TD002', 'UP007']
# D100 | for avoding module level docstrings
# D104 | for avoding package level docstrings
# D203 | for requring blank line before classes (which looks silly)
# D212 | for docstring requring multi-line comments to start on first line (which looks silly)
# D402 | for docstring that can't resemble their signatures (despite them being completely different)
# E501 | for bug-bear compatibility (as B905 overrides line length checks)
# PT001 | for requring Pytest figures not to use brackets (as Ruff flip-flops on this is and is too unreliable)
# TD002 | for allowing TODOs without an author (as issue should assign ownership)
# UP007 | for requring `Optional[T]` to be written as `T | None` which isn't supported by Python 3.9
[tool.ruff.lint.extend-per-file-ignores]
"tests/*" = ["ANN201","ANN401","S101"]
"config.py" = ["N802"]
# tests/* | ANN201 | ignore public functions
# tests/* | ANN401 | ignore use of 'Any' type
# tests/* | S101 | ignore use of assert
# config.py | N802 | ignore use of upper case method names
[tool.pytest.ini_options]
markers = [
"cov: coverage checks (deselect with '-m \"not cov\"')",
]
[tool.coverage.report]
skip_empty = true
show_missing = false
fail_under = 100
[tool.coverage.html]
directory = "htmlcov"
[tool.coverage.run]
branch = true
source = ["src"]
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"