-
Notifications
You must be signed in to change notification settings - Fork 2
/
pyproject.toml
98 lines (88 loc) · 3.37 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
[project]
name = "fia-api"
readme = "README.md"
version = "0.0.1"
requires-python = ">= 3.11"
dependencies = [
"fastapi[all]==0.111.1",
"PyJWT==2.8.0",
"psycopg2==2.9.9",
"SQLAlchemy==2.0.30",
"pydantic==2.8.2",
"db@git+https://github.com/fiaisis/db",
"uvicorn==0.30.3",
"requests==2.32.3",
"pika==1.3.2",
]
[project.urls]
"Repository" = "https://github.com/fiaisis/fia-api"
[project.optional-dependencies]
formatting = [
"ruff==0.5.4",
"mypy==1.11.0",
"fia-api[test]",
"types-requests==2.32.0.20240712",
"types-urllib3==1.26.25.14",
]
test = [
"pytest==8.3.1",
"requests==2.32.3",
"httpx==0.27.0",
"pytest-cov==5.0.0",
"pytest-random-order==1.1.1",
"Faker==26.0.0",
"pytest-env==1.1.3"
]
[tool.setuptools]
packages = ["fia_api"]
[tool.ruff]
line-length = 120
[tool.ruff.lint]
select = [
"F", # flake8 - Basic initial rules
"E", # pycodestyle (Error) - pep8 compliance
"W", # pycodestyle (Warning) - pep8 compliance
"C90", # mccabe - flags extremely complex functions
"I", # isort - Sort imports and flag missing imports
"N", # pep8-naming - Ensures pep8 compliance for naming
"UP", # pyupgrade - Automatically upgrade syntax for newer versions
"S", # flake8-bandit - Flake8 security
"B", # flake8-bugbear - Finding likely bugs and design problems
"A", # flake8-builtins - Finds code shadowing builtins
"COM", # flake8-commas - Find and fixes issues with commas in lists/dicts
"C4", # flake8-comprehensions - Simplify list/dict comprehension
"DTZ", # flake8-datetimez - Ensure timezones are enforced for code
"EXE", # flake8-executable - Fix issues around shebangs and executable files
"ISC", # flake8-implicit-str-concat - Find implicitly concatenated strings
"LOG", # flake8-logging - Enforce basic rules with builtin logger
"T20", # flake8-print - Remove print statements
"PT", # flake8-pytest-style - Fix issues with pytest
"Q", # flake8-quotes - Bad quote handling
"RET", # flake8-return - Fix issues with return values
"SIM", # flake8-simplify - Simplify parts of the code
"TCH", # flake8-type-checking - Move imports only for typing behind TYPE_CHECKING
"PTH", # flake8-use-pathlib - Replace os with pathlib
"TD", # flake8-todos - Enforce basic TODOs
"FIX", # flake8-fix me - Resolve the issue instead of a fix me
"ERA", # eradicate - Remove commented out code.
"PL", "C", "E", "R", "W", # Pylint - does a lot
"FLY", # flynt - prefer f string over .format
"PERF", # Perflint - Flag performance antipatterns
"RUF", # Ruff specific rules
]
ignore = [
"S101", # flake8-bandit - Use of assert (all over pytest tests)
"ISC001", # Conflicts with the formatter
"COM812", # Conflicts with the formatter
"TCH003", # Conflicts with pydantic
"TCH002", # Conflicts with pydantic
"TCH001", # Conflicts with pydantic
]
[tool.ruff.lint.pylint]
max-args = 10
[tool.ruff.lint.per-file-ignores]
"test/scripts/transforms/test_mari_transforms.py" = ["E501"] # Long script lines in this file
"test/scripts/transforms/test_osiris_transform.py" = ["E501"] # Long script lines in this file
"test/scripts/transforms/test_tosca_transform.py" = ["E501"] # Long script lines in this file
[tool.pytest.ini_options]
required_plugins = "pytest-env"