-
Notifications
You must be signed in to change notification settings - Fork 25
Expand file tree
/
Copy pathpyproject.toml
More file actions
147 lines (122 loc) · 3.9 KB
/
pyproject.toml
File metadata and controls
147 lines (122 loc) · 3.9 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
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "pynescript"
dynamic = ["version"]
description = "Handle Pinescript using Python"
readme = "README.md"
requires-python = ">=3.10"
license = "LGPL-3.0-or-later"
keywords = ["python", "tradingview", "pinescript"]
authors = [{ name = "Yunseong Hwang", email = "kika1492@gmail.com" }]
maintainers = [{ name = "Yunseong Hwang", email = "kika1492@gmail.com" }]
classifiers = [
"Development Status :: 2 - Pre-Alpha",
"License :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+)",
"Programming Language :: Python",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
]
dependencies = ["antlr4-python3-runtime>=4.13.2", "click>=8.3.1"]
[project.urls]
Documentation = "https://github.com/elbakramer/pynescript#readme"
Issues = "https://github.com/elbakramer/pynescript/issues"
Source = "https://github.com/elbakramer/pynescript"
[project.scripts]
pynescript = "pynescript.__main__:cli"
[project.entry-points."pygments.lexers"]
pinescript = "pynescript.ext.pygments.lexers:PinescriptLexer"
[tool.hatch.version]
path = "src/pynescript/__about__.py"
[tool.hatch.envs.dev]
dependencies = ["antlr4-tools>=0.2.2", "pyasdl>=22.1.23"]
[tool.hatch.envs.dev.scripts]
gen-antlr4 = ["python src/pynescript/ast/grammar/antlr4/tool/generate.py"]
gen-pyasdl = ["python src/pynescript/ast/grammar/asdl/tool/generate.py"]
[tool.hatch.envs.test]
dependencies = [
"pytest>=8.4.1",
"pytest-cov>=6.2.1",
"pytest-asyncio>=1.1.0",
"coverage[toml]>=7.10.1",
]
[tool.hatch.envs.test.scripts]
test = "pytest {args:tests}"
test-cov = "coverage run -m pytest {args:tests}"
cov-report = ["coverage combine", "coverage xml", "coverage report"]
cov = ["test-cov", "cov-report"]
[[tool.hatch.envs.test.matrix]]
python = ["3.10", "3.11", "3.12"]
[tool.hatch.envs.default]
dependencies = ["reuse>=6.2.0", "bump-my-version>=1.2.4"]
[tool.hatch.envs.default.scripts]
bump-version = "bump-my-version bump {args:patch}"
add-license = 'reuse annotate --template copyright --copyright "Yunseong Hwang" --license LGPL-3.0-or-later --year 2025 --recursive --skip-unrecognised {args:src}'
[tool.hatch.envs.lint]
dependencies = ["ruff>=0.14.8", "mypy>=1.19.0", "reuse>=6.2.0"]
detached = true
[tool.hatch.envs.lint.scripts]
check = "ruff check {args:.}"
check-fix = "ruff check --fix {args:.}"
format = "ruff format {args:.}"
typing = "mypy --install-types --non-interactive {args:src/python/axserve tests}"
license = "reuse lint"
all = ["check-fix", "format", "typing", "license"]
[tool.hatch.envs.docs]
dependencies = [
"furo>=2025.9.25",
"myst-parser>=4.0.1",
"pygments>=2.19.2",
"sphinx>=8.2.3",
"sphinx-click>=6.2.0",
"sphinx-autobuild>=2025.8.25",
]
[tool.hatch.envs.docs.scripts]
build = ["sphinx-build docs docs/_build"]
[tool.ruff]
target-version = "py310"
line-length = 120
extend-exclude = ["generated"]
[tool.ruff.lint]
select = ["ALL"]
ignore = [
"D1",
"PTH123",
"ANN",
"C90",
"PLR09",
"F403",
"TID252",
"COM",
"SLF001",
"TRY201",
"RET504",
"PGH003",
"TC006",
]
[tool.ruff.lint.isort]
known-first-party = ["pynescript"]
force-single-line = true
lines-between-types = 1
lines-after-imports = 2
required-imports = ["from __future__ import annotations"]
[tool.ruff.lint.pep8-naming]
extend-ignore-names = ["id"]
[tool.ruff.lint.per-file-ignores]
"tests/**/*" = ["PLR2004", "S101", "TID252"]
[tool.coverage.run]
source_pkgs = ["pynescript", "tests"]
branch = true
parallel = true
omit = ["src/pynescript/__about__.py"]
[tool.coverage.paths]
pynescript = ["src/pynescript", "*/pynescript/src/pynescript"]
tests = ["tests", "*/pynescript/tests"]
[tool.coverage.report]
exclude_lines = ["no cov", "if __name__ == .__main__.:", "if TYPE_CHECKING:"]
[tool.pytest.ini_options]
testpaths = ["tests"]
asyncio_mode = "auto"
asyncio_default_fixture_loop_scope = "function"