-
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathpyproject.toml
More file actions
151 lines (136 loc) · 4.67 KB
/
Copy pathpyproject.toml
File metadata and controls
151 lines (136 loc) · 4.67 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
143
144
145
146
147
148
149
150
151
[build-system]
requires = ["setuptools>=64", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "python-lightweight-charts"
version = "1.3.0"
description = "A maintained Python wrapper for TradingView's Lightweight Charts v5.x — featuring StreamChart, plugins, multi-pane layouts, and full IChartApi coverage."
authors = [
{ name = "Gopal Parashar", email = "gopal.parashar421@gmail.com" }
]
license = "MIT"
license-files = ["LICENSE"]
readme = "README.md"
requires-python = ">=3.10"
keywords = [
"lightweight-charts", "tradingview", "charts", "finance", "trading",
"candlestick", "ohlc", "stock", "crypto", "visualization"
]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Intended Audience :: Financial and Insurance Industry",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Operating System :: OS Independent",
"Topic :: Scientific/Engineering :: Visualization",
"Topic :: Office/Business :: Financial :: Investment",
]
dependencies = [
"pandas",
"pywebview>=5.0.5",
"fastapi>=0.100,<1.0",
"uvicorn[standard]>=0.23",
]
[project.urls]
Homepage = "https://github.com/gopalparashar421/lightweight-charts-python"
Source = "https://github.com/gopalparashar421/lightweight-charts-python"
Documentation = "https://python-lightweight-charts.readthedocs.io/en/latest/"
Changelog = "https://github.com/gopalparashar421/lightweight-charts-python/blob/main/CHANGELOG.md"
"Bug Tracker" = "https://github.com/gopalparashar421/lightweight-charts-python/issues"
[dependency-groups]
dev = [
"pytest>=7.0",
"ruff",
]
docs = [
"sphinx>=8.1.3",
"myst-parser>=4.0",
"furo>=2024.8.6",
"sphinx-copybutton>=0.5",
"sphinx-tippy>=0.4",
]
[tool.setuptools.packages.find]
include = ["lightweight_charts*"]
[tool.setuptools.package-data]
"lightweight_charts" = ["js/*"]
[tool.ruff]
# Target Python version your project runs on
target-version = "py311"
# Max line length (FastAPI & pandas code reads better a bit wider)
line-length = 100
# Exclude common non-source directories
exclude = [
".git",
".venv",
"venv",
"__pycache__",
"migrations",
"node_modules",
"build",
"dist",
]
# Allow autofix for safe rules
fix = true
# Show what Ruff fixes
show-fixes = true
# Enable rule groups
# You can comment/uncomment these selectively
[tool.ruff.lint]
select = [
# FAST API Rules
"FAST001",
"FAST003",
"E", # pycodestyle errors (syntax, indentation)
"F", # pyflakes (unused imports, undefined names)
"W", # pycodestyle warnings
"I", # isort (import sorting)
"B", # flake8-bugbear (likely bugs & footguns)
"C4", # flake8-comprehensions (cleaner comprehensions)
"UP", # pyupgrade (modern Python syntax)
"ASYNC", # async-specific issues (important for asyncio / websockets)
"SIM", # code simplifications
"RUF", # Ruff-specific improvements
]
# Ignore rules that are noisy or annoying in real-world FastAPI projects
ignore = [
"RUF001",
"RUF002", # Docstring contains ambiguous
"RUF003", # Comment contains ambiguous
"UP017", # Checks for uses of datetime.timezone.utc
"E501", # Line length (handled by formatter, not lint)
"B008", # Do not perform function calls in argument defaults
# FastAPI Depends(...) triggers this falsely
"B006", # Mutable default arguments (FastAPI models often do this safely)
"RUF012", # Mutable class attributes without typing.ClassVar
"W191", # Indentation contains tabs
"SIM108", # Use ternary operator
"F541", # f-string without any placeholders
"I001", # Import block is un-sorted or un-formatted
"E401", # Multiple imports in one line
"SIM114", # Combine 'if' branches using logical 'or' operator
"SIM105", # use contextlib.suppress instead of try - except - pass
"RUF010",
"W293",
"W291",
"W292",
"UP042",
"E741", # Ambiguous variable name
"RUF006", # asyncio.create_task fire-and-forget is intentional throughout
"ASYNC110", # polling loop with sleep is intentional in chart.py
"ASYNC230", # blocking file read in startup path is intentional
"B904", # raise-without-from-clause: error rewrapping is intentional
]
# Allow unused variables starting with _
dummy-variable-rgx = "^_.*"
# Per-file ignores for special cases
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["F401"] # Allow unused imports in __init__.py
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
[tool.pytest.ini_options]
testpaths = ["test"]
pythonpath = ["test"]