-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
142 lines (122 loc) · 3.17 KB
/
pyproject.toml
File metadata and controls
142 lines (122 loc) · 3.17 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
[build-system]
requires = [
"hatchling",
"rich",
"httpx",
"klepto",
]
build-backend = "hatchling.build"
[project]
name = "pyflared"
dynamic = ["version"]
description = "A Python CLI tool for effortless Cloudflare Tunnel management"
readme = "README.md"
requires-python = ">=3.12"
license = "MPL-2.0"
keywords = []
authors = [
{ name = "Azmain", email = "azmainmahatab012@gmail.com" },
]
classifiers = [
"Development Status :: 4 - Beta",
"Programming Language :: Python",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
]
dependencies = [
"cloudflare", # official sdk
"platformdirs", #find conventional folders
"typer", #cli
"loguru", #log
"rich",
"beartype",
"pydantic",
"pydantic_settings",
"validators",
"sqlmodel", #DB
"aiosqlite",
"tldextract", #Zone/domain
]
[project.urls]
Documentation = "https://github.com/AzmainMahatab/pyflared#readme"
Issues = "https://github.com/AzmainMahatab/pyflared/issues"
Source = "https://github.com/AzmainMahatab/pyflared"
[tool.hatch.version]
path = "src/pyflared/__about__.py"
#[tool.hatch.envs.default.env-vars]
#PKG_NAME = "pyflared"
[project.scripts]
pyflared = "pyflared.cli:app"
[tool.hatch.build.hooks.custom]
[tool.hatch.build.targets.sdist]
only-include = [
"/src",
"/hatch_build.py",
"/pyproject.toml",
"/README.md",
"/LICENSE.txt",
]
[tool.hatch.envs.default]
scripts = { build-script = "python scripts/build.py" }
[tool.hatch.envs.types]
extra-dependencies = [
"pyright",
]
[tool.hatch.envs.types.scripts]
check = "pyright {args:src/pyflared tests}"
[tool.hatch.envs.hatch-test]
extra-dependencies = [
"pytest",
"pytest-asyncio",
]
extra-args = ["--ignore=tests/binary"]
[tool.hatch.envs.prod]
template = "hatch-test"
python = "3.12"
dev-mode = false
scripts.test = [
"uv pip install .",
"pytest{env:HATCH_TEST_ARGS:} {args}"
]
[tool.pytest.ini_options]
addopts = "-vv"
asyncio_mode = "auto"
asyncio_default_fixture_loop_scope = "function"
# --- Added Logging Configuration ---
log_cli = true
log_cli_level = "DEBUG"
log_cli_format = "%(asctime)s [%(levelname)8s] %(message)s (%(filename)s:%(lineno)s)"
log_cli_date_format = "%Y-%m-%d %H:%M:%S"
[tool.coverage.run]
source_pkgs = ["pyflared", "tests"]
branch = true
parallel = true
omit = [
"src/pyflared/__about__.py",
]
[tool.coverage.paths]
pyflared = ["src/pyflared", "*/pyflared/src/pyflared"]
tests = ["tests", "*/pyflared/tests"]
[tool.coverage.report]
exclude_lines = [
"no cov",
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
]
[tool.ruff.lint]
ignore = [
"SIM108",
"TRY003", # Long msg in Error
"ARG002", # Function can have arg even if needed to match signature
"EM101", # Ignore "String literal in exception"
"EM102", # Ignore "f-string in exception",
]
[tool.ruff.lint.per-file-ignores]
# Ignore "Boolean Trap" errors just for the CLI file
"src/pyflared/cli/**" = ["FBT001"]
# Ignore the "Use of assert" rule in all test files
"tests/**/*.py" = ["S101"]
[tool.pyright]
enableExperimentalFeatures = true
#reportUnusedCallResult = false