Skip to content

Commit cd9abd5

Browse files
committed
update tooling
Signed-off-by: maximsmol <[email protected]>
1 parent ea0deb3 commit cd9abd5

File tree

10 files changed

+588
-867
lines changed

10 files changed

+588
-867
lines changed

.envrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/usr/bin/env bash
2+
3+
source .venv/bin/activate

.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
dist/
2-
/**/__pycache__/
1+
__pycache__
2+
/credentials

Justfile

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,7 @@
11
@default:
22
just --list --unsorted
33

4-
local_install:
5-
python -m pip install -e .
6-
7-
build:
8-
poetry build
9-
104
publish:
11-
poetry publish --build
12-
13-
5+
#!/usr/bin/env bash
6+
uv publish \
7+
--token "$(cat credentials/pypi.txt)"

poetry.lock

Lines changed: 0 additions & 826 deletions
This file was deleted.

pyproject.toml

Lines changed: 164 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,172 @@
1-
[tool.poetry]
1+
[project]
22
name = "latch-postgres"
3-
version = "0.1.19"
3+
version = "0.1.20"
44
description = "Postges wrapper for latch python backend services"
5-
authors = ["Max Smolin <[email protected]>"]
6-
license = "CC0 1.0"
5+
authors = [{ name = "maximsmol", email = "[email protected]" }]
6+
license = { text = "CC0-1.0" }
77
readme = "README.md"
8-
packages = [{include = "latch_postgres"}]
9-
10-
[tool.poetry.dependencies]
11-
python = "^3.11"
12-
typing-extensions = "^4.4.0"
13-
psycopg = { extras = ["pool", "binary"], version = "^3.1.8" }
14-
latch-config = "^0.1.6"
15-
latch-data-validation = "^0.1.10"
16-
latch-o11y = "^0.1.4"
17-
opentelemetry-api = "^1.15.0"
18-
opentelemetry-sdk = "^1.15.0"
19-
20-
[tool.poetry.dev-dependencies]
21-
black = "^22.12.0"
22-
isort = "^5.11.4"
23-
rich = "^13.2.0"
24-
ruff = "^0.0.227"
25-
26-
[tool.black]
8+
requires-python = ">=3.11"
9+
dependencies = [
10+
"typing-extensions<5.0.0,>=4.4.0",
11+
"psycopg[binary,pool]<4.0.0,>=3.1.8",
12+
"latch-config<1.0.0,>=0.1.6",
13+
"latch-data-validation<1.0.0,>=0.1.10",
14+
"latch-o11y<2.0.0,>=1.0.0",
15+
"opentelemetry-api<2.0.0,>=1.15.0",
16+
"opentelemetry-sdk<2.0.0,>=1.15.0",
17+
]
18+
19+
[build-system]
20+
requires = ["hatchling"]
21+
build-backend = "hatchling.build"
22+
23+
[tool.uv]
24+
dev-dependencies = ["ruff>=0.9.5"]
25+
26+
[tool.ruff]
27+
target-version = "py311"
28+
29+
[tool.ruff.lint]
2730
preview = true
28-
target-version = ["py311"]
2931

30-
[tool.isort]
31-
profile = "black"
32+
pydocstyle = { convention = "google" }
33+
extend-select = [
34+
"F",
35+
"E",
36+
"W",
37+
# "C90",
38+
"I",
39+
"N",
40+
"D",
41+
"UP",
42+
"YTT",
43+
"ANN",
44+
"ASYNC",
45+
"ASYNC1",
46+
"S",
47+
# "BLE", # `raise x from y` does not work
48+
"FBT",
49+
"B",
50+
"A",
51+
# "COM",
52+
# "CPY",
53+
"C4",
54+
"DTZ",
55+
"T10",
56+
"DJ",
57+
# "EM",
58+
"EXE",
59+
"FA",
60+
"ISC",
61+
"ICN",
62+
"G",
63+
"INP",
64+
"PIE",
65+
"T20",
66+
"PYI",
67+
"PT",
68+
"Q",
69+
"RSE",
70+
"RET",
71+
"SLF",
72+
"SLOT",
73+
"SIM",
74+
"TID",
75+
"TCH",
76+
"INT",
77+
"ARG",
78+
"PTH",
79+
"TD",
80+
# "FIX",
81+
# "ERA",
82+
"PD",
83+
"PGH",
84+
"PL",
85+
"TRY",
86+
"FLY",
87+
"NPY",
88+
"AIR",
89+
"PERF",
90+
"FURB",
91+
"LOG",
92+
"RUF",
93+
]
94+
ignore = [
95+
"A002",
96+
"A003",
97+
98+
"ANN101",
99+
"ANN102",
100+
101+
"E402",
102+
"E501",
103+
"E741",
104+
105+
"C408",
106+
"C901",
107+
108+
"T201",
109+
"T203",
110+
111+
"D415",
112+
113+
"SIM108",
114+
115+
"S101",
116+
"S603",
117+
118+
"N807",
119+
120+
"D100",
121+
"D101",
122+
"D102",
123+
"D103",
124+
"D104",
125+
"D105",
126+
"D106",
127+
"D107",
128+
129+
"TRY003",
130+
"TRY300",
131+
"TRY301",
132+
133+
"FLY002",
134+
135+
"PLW2901",
136+
"PLW0603",
137+
138+
"PLR0904",
139+
"PLR0911",
140+
"PLR0912",
141+
"PLR0913",
142+
"PLR0914",
143+
"PLR0915",
144+
"PLR0916",
145+
"PLR0917",
146+
"PLR1702",
147+
"PLR2004",
148+
149+
"TD001",
150+
"TD003",
151+
"TD006",
152+
153+
"TID252",
154+
155+
"PD901",
156+
157+
# todo(maximsmol): reenable as soon as data-validation can support the `type` syntax
158+
"UP040",
159+
160+
"SIM112",
161+
162+
"PLC1901",
163+
164+
"TCH002",
165+
]
166+
167+
[tool.ruff.format]
168+
preview = true
169+
skip-magic-trailing-comma = true
32170

33171
[tool.pyright]
34172
reportUnknownArgumentType = "none"
@@ -38,7 +176,3 @@ reportUnknownParameterType = "none"
38176
reportUnknownVariableType = "none"
39177

40178
reportUnusedImport = "warning"
41-
42-
[build-system]
43-
requires = ["poetry-core"]
44-
build-backend = "poetry.core.masonry.api"
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)