-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
166 lines (143 loc) · 4.54 KB
/
Copy pathpyproject.toml
File metadata and controls
166 lines (143 loc) · 4.54 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
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
[build-system]
requires = ["hatchling>=1.27"]
build-backend = "hatchling.build"
[project]
name = "transpiler-mate-runtime"
dynamic = ["version"]
description = "Runtime discovery, execution, and CLI adapter for transpiler-mate plugins"
requires-python = ">=3.10"
license = "Apache-2.0"
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 = [
"click>=8.4.2,<9",
"cwl-loader>=0.24.0",
"cwl-utils>=0.42",
"loguru==0.7.3",
"pydantic>=2.13.4,<3",
"PyLD>=3.1.0",
"session-adapters>=0.5.0",
"transpiler-mate-api @ git+https://github.com/sim13pods/transpiler-mate-api.git@main",
]
# TODO remove me as soon as transpiler-mate-api is on PyPI
[tool.hatch.metadata]
allow-direct-references = true
[project.urls]
Documentation = "https://terradue.github.io/transpiler-mate-runtime/"
Issues = "https://github.com/Terradue/transpiler-mate-runtime/issues"
Source = "https://github.com/Terradue/transpiler-mate-runtime"
[project.scripts]
transpiler-mate = "transpiler_mate.runtime.cli:main"
[project.entry-points."transpiler_mate.plugins"]
bundle = "transpiler_mate.plugins.bundle:bundle"
[tool.hatch.build.targets.wheel]
packages = ["src/transpiler_mate"]
[tool.hatch.version]
path = "src/transpiler_mate/__about__.py"
[tool.hatch.build.targets.sdist]
include = ["src/transpiler_mate", "tests", "examples", "docs", "README.md", "mkdocs.yaml", "pyproject.toml"]
[tool.mypy]
strict = true
namespace_packages = true
explicit_package_bases = true
mypy_path = "$MYPY_CONFIG_FILE_DIR/src"
[[tool.mypy.overrides]]
module = [
"cwl_loader",
"cwl_loader.*",
"session_adapters",
"session_adapters.*",
"pyld",
"pyld.*",
"transpiler_mate",
"transpiler_mate.api"
]
ignore_missing_imports = true
[tool.coverage.paths]
transpiler_mate = ["src/transpiler_mate", "*/transpiler-mate-runtime/src/transpiler_mate"]
tests = ["tests", "*/transpiler-mate-runtime/tests"]
[tool.coverage.report]
exclude_lines = [
"no cov",
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
]
[tool.hatch.envs.test]
skip-install = false
dev-mode = true
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=transpiler_mate --cov-report=term-missing {args:tests}"
test-show-setup = "pytest --setup-show"
[tool.pytest.ini_options]
testpaths = ["tests"]
addopts = [
"--strict-config",
"--strict-markers",
]
[[tool.hatch.envs.test.matrix]]
python = ["3.11", "3.12", "3.13", "3.14"]
[tool.hatch.envs.dev]
skip-install = false
dependencies = [
"pytest>=8.4,<10",
"mypy>=2.3.0",
"ruff>=0.16.0",
"bandit>=1.9.4",
]
[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.per-file-ignores]
# Tests need not hide annotation-only imports behind TYPE_CHECKING.
"tests/**.py" = ["TC001", "TC002", "TC003"]
[tool.ruff.lint.flake8-type-checking]
runtime-evaluated-base-classes = ["pydantic.BaseModel"]
[tool.ruff.lint.mccabe]
# Flag errors (C901) whenever complexity exceeds 10 (default is 10)
max-complexity = 10
[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}"