-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpyproject.toml
More file actions
144 lines (125 loc) · 3.6 KB
/
Copy pathpyproject.toml
File metadata and controls
144 lines (125 loc) · 3.6 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
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "cwl2click"
dynamic = ["version"]
description = ''
readme = "README.md"
requires-python = ">=3.10"
license = "MIT"
keywords = []
authors = [
{ name = "Simone Tripodi", email = "simone.tripodi@terradue.com" },
{ name = "Fabrice Brito", email = "fabrice.brito@terradue.com" }
]
classifiers = [
"Development Status :: 4 - Beta",
"Programming Language :: Python",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
]
dependencies = [
"cwl-loader==0.24.0",
"cwl-utils==0.42",
"click==8.4.2",
"Jinja2==3.1.6",
"loguru==0.7.3"
]
[project.scripts]
cwl2click = "cwl2click.cli:main"
[project.urls]
Documentation = "https://terradue.github.io/cwl2click/"
Issues = "https://github.com/Terradue/cwl2click/issues"
Source = "https://github.com/Terradue/cwl2click"
[tool.hatch.version]
path = "src/cwl2click/__about__.py"
[tool.hatch.envs.default]
skip-install = false
[tool.hatch.envs.dev]
skip-install = false
dependencies = [
"mypy>=2.3.0",
"ruff>=0.16.0",
"bandit>=1.9.4",
]
[tool.ruff]
extend-exclude = ["**/templates/**"]
[tool.ruff.lint]
# Start with the essential rules
select = [
"F", # Pyflakes (Critical for bugs)
"E", # pycodestyle Errors
"W", # pycodestyle Warnings
"I", # isort (Import sorting)
"UP", # pyupgrade (Modern syntax)
"B", # flake8-bugbear (Common bugs)
"C4", # flake8-comprehensions
"SIM", # flake8-simplify
"FA", # flake8-future-annotations
"TC", # flake8-type-checking
"PTH", # flake8-use-pathlib
"RET", # flake8-return
"C90", # McCabe Complexity (Enables C901)
]
# Ignore rules that conflict with the formatter (Ruff Format/Black)
ignore = [
"E501", # Line too long (handled by formatter)
"W191", # Tab indentation (handled by formatter)
"E111", # Indentation issues (handled by formatter)
"E114", # Indentation issues (handled by formatter)
"E117", # Over-indented (handled by formatter)
]
[tool.ruff.lint.mccabe]
# Flag errors (C901) whenever complexity exceeds 10 (default is 10)
max-complexity = 10
[tool.mypy]
# Jinja templates only become valid Python after cwl2click renders them.
exclude = ["^src/cwl2click/templates/"]
[[tool.mypy.overrides]]
# cwl-loader does not currently publish a PEP 561 marker or stubs.
module = ["cwl_loader"]
ignore_missing_imports = true
[tool.hatch.envs.dev.scripts]
typecheck = "mypy --install-types --non-interactive {args:src tests}"
lint = "ruff format {args:src tests}"
check = "ruff check --fix {args:src tests}"
security = "bandit -r {args:src}"
[tool.hatch.envs.test]
skip-install = false
dependencies = [
"pytest>=8.4,<10",
"pytest-cov>=6.2,<8",
]
[tool.hatch.envs.test.scripts]
test = "pytest {args:tests}"
testv = "pytest --verbose {args:tests}"
test-cov = "pytest --cov=cwl2click --cov-report=term-missing {args:tests}"
test-show-setup = "pytest --setup-show"
[tool.pytest.ini_options]
testpaths = ["tests"]
addopts = [
"--strict-config",
"--strict-markers",
]
[tool.coverage.run]
source_pkgs = ["cwl2click", "tests"]
branch = true
parallel = true
omit = [
"src/cwl2click/__about__.py",
]
[tool.coverage.paths]
cwl2click = ["src/cwl2click", "*/cwl2click/src/cwl2click"]
tests = ["tests", "*/cwl2click/tests"]
[tool.coverage.report]
exclude_lines = [
"no cov",
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
]