Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
102 lines (94 loc) · 4 KB
/
Copy pathpyproject.toml
File metadata and controls
102 lines (94 loc) · 4 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
[project]
name = "central"
authors = [
{ name = "frappe", email = "developers@frappe.io"}
]
description = "The one stop console for Frappe Cloud"
requires-python = ">=3.14"
readme = "README.md"
dynamic = ["version"]
dependencies = [
# "frappe~=16.0.0" # Installed and managed by bench.
# Gateway SDKs for the vendored `billing` module (issue #41). Pinned to
# versions that import on Python 3.14 (old stripe 2.56 vendored `six` and
# breaks); the adapters use Stripe's global API.
"stripe>=15,<16",
"razorpay>=1.4",
"dnspython>=2.7",
# Reads team bucket objects over S3 (central.integrations.object_storage).
"boto3>=1.43,<2",
# Same pin as Cargo, so a bench with both apps installs one copy.
"atlas-client @ git+https://github.com/frappe/atlas.git@90893a126b09311cc495a23125652e11ebeb8fe6#subdirectory=clients/atlas-client",
"atlas-proxy-client @ git+https://github.com/frappe/atlas.git@abdde5b62bc8ebecbf38c9aa96a72a848c832fc4#subdirectory=clients/atlas-proxy-client",
"atlas-wg-gateway-client @ git+https://github.com/frappe/atlas.git@74a8796c4cd71ba89aa350d7acbdda190e038bb3#subdirectory=clients/atlas-wg-gateway-client",
]
[build-system]
requires = ["flit_core >=3.4,<4"]
build-backend = "flit_core.buildapi"
# These dependencies are only installed when developer mode is enabled
[tool.bench.dev-dependencies]
# Keep in step with the ruff-pre-commit rev in .pre-commit-config.yaml.
ruff = "==0.16.10"
[tool.bench.frappe-dependencies]
frappe = ">=16.0.0,<=17.0.0-dev"
# https://github.com/frappe/cloudtoolkit, also listed in `required_apps`.
cloudtoolkit = ">=0.0.1"
# The dashboard SPA that Pilot pre-builds and Frappe Cloud builds.
[tool.bench.assets]
build_dir = "./dashboard"
out_dir = "../central/public/dashboard"
index_html_path = "../central/www/dashboard.html"
# These apt dependencies will be installed from Ubuntu repositories when you host your app on Frappe Cloud
[deploy.dependencies.apt]
packages = []
[tool.ruff]
line-length = 110
# The app runs on 3.14 (requires-python). A py313 target keeps `except (A, B):`
# parenthesized, because ruff drops those parentheses for a py314 target (PEP 758).
target-version = "py313"
[tool.ruff.lint]
select = [
"F",
"E",
"W",
"I",
"UP",
"B",
"RUF",
]
ignore = [
"B017", # assertRaises(Exception) - should be more specific
"B018", # useless expression, not assigned to anything
"B023", # function doesn't bind loop variable - will have last iteration's value
"B904", # raise inside except without from
"E101", # indentation contains mixed spaces and tabs
"E402", # module level import not at top of file
"E501", # line too long
"E741", # ambiguous variable name
# F401 (unused imports) is intentionally NOT ignored — enforcing it keeps dead
# imports out and backs the dead-code sweep (PRs 2/3).
"F403", # can't detect undefined names from * import
"F405", # can't detect undefined names from * import
"F722", # syntax error in forward type annotation
"RUF001", # allow Unicode punctuation in user-facing strings
"RUF002", # allow Unicode punctuation in docstrings
"RUF003", # allow Unicode punctuation in comments
"W191", # indentation contains tabs
"UP030", # Use implicit references for positional format fields (translations)
"UP031", # Use format specifiers instead of percent format
"UP032", # Use f-string instead of `format` call (translations)
"UP037", # quoted annotations
"UP040", # Use type aliases instead of type annotations
]
typing-modules = ["frappe.types.DF"]
[tool.ruff.lint.per-file-ignores]
# central/billing/** is out of scope for this refactor and re-exports several
# symbols (e.g. subscriptions.InvalidTransition) that F401 would otherwise strip.
# Keep F401 enforced everywhere else, but not here.
"central/billing/**" = ["F401"]
[tool.ruff.format]
# Ruff formats Python blocks inside Markdown with the code's tab indent. Keep docs as written.
exclude = ["*.md"]
quote-style = "double"
indent-style = "tab"
docstring-code-format = true