-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
120 lines (102 loc) · 3.5 KB
/
pyproject.toml
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
[project]
name = "template_rocker"
version = "0.0.1"
authors = [{ name = "Austin Gregg-Smith", email = "blooop@gmail.com" }]
description = "A rocker extension for installing pixi in a container"
readme = "README.md"
license = "MIT"
dependencies = ["rocker>=0.2.17"]
[project.urls]
Source = "https://github.com/blooop/template_rocker"
Home = "https://github.com/blooop/template_rocker"
[tool.pixi.project]
channels = ["conda-forge"]
platforms = ["linux-64"]
[tool.pixi.dependencies]
python = ">=3.9"
[tool.pixi.feature.py309.dependencies]
python = "3.9.*"
[tool.pixi.feature.py310.dependencies]
python = "3.10.*"
[tool.pixi.feature.py311.dependencies]
python = "3.11.*"
[tool.pixi.feature.py312.dependencies]
python = "3.12.*"
[tool.pixi.feature.py313.dependencies]
python = "3.13.*"
[tool.pixi.pypi-dependencies]
template_rocker = { path = ".", editable = true }
[project.optional-dependencies]
test = [
"pylint>=3.2.5,<=3.3.3",
"pytest-cov>=4.1,<=6.0.0",
"pytest>=7.4,<=8.3.4",
"hypothesis>=6.104.2,<=6.123.2",
"ruff>=0.5.0,<=0.8.6",
"coverage>=7.5.4,<=7.6.10",
"pre-commit<=4.0.1",
]
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.build]
include = ["template_rocker"]
[project.entry-points."rocker.extensions"]
rocker_extension = "template_rocker.rocker_extension:TemplateRocker"
# Environments
[tool.pixi.environments]
default = { features = ["test"], solve-group = "default" }
py309 = ["py309", "test"]
py310 = ["py310", "test"]
py311 = ["py311", "test"]
py312 = ["py312", "test"]
py313 = ["py313", "test"]
[tool.pixi.tasks]
pre-commit = "pre-commit run -a"
pre-commit-update = "pre-commit autoupdate"
format = "ruff format ."
check-clean-workspace = "git diff --exit-code"
ruff-lint = "ruff check . --fix"
pylint = "pylint --version && echo 'running pylint...' && pylint $(git ls-files '*.py')"
lint = { depends-on = ["ruff-lint", "pylint"] }
style = { depends-on = ["format", "lint"] }
commit-format = "git commit -a -m'autoformat code' || true"
test = "pytest"
coverage = "coverage run -m pytest && coverage xml -o coverage.xml"
coverage-report = "coverage report -m"
update-lock = "pixi update && git commit -a -m'update pixi.lock' || true"
push = "git push"
update-lock-push = { depends-on = ["update-lock", "push"] }
fix = { depends-on = ["update-lock", "format", "ruff-lint"] }
fix-commit-push = { depends-on = ["fix", "commit-format", "update-lock-push"] }
ci-no-cover = { depends-on = ["style", "test"] }
ci = { depends-on = [
"format",
"ruff-lint",
"pylint",
"coverage",
"coverage-report",
] }
ci-push = { depends-on = ["format", "ruff-lint", "update-lock", "ci", "push"] }
clear-pixi = "rm -rf .pixi pixi.lock"
setup-git-merge-driver = "git config merge.ourslock.driver true"
update-from-template-repo = "./scripts/update_from_template.sh"
[tool.pylint]
extension-pkg-whitelist = ["numpy"]
jobs = 16 #detect number of cores
[tool.pylint.'MESSAGES CONTROL']
disable = "C,logging-fstring-interpolation,line-too-long,fixme,broad-exception-caught,missing-module-docstring,too-many-instance-attributes,too-few-public-methods,too-many-arguments,too-many-locals,too-many-branches,too-many-statements,use-dict-literal,cyclic-import,duplicate-code,too-many-public-methods"
enable = "no-else-return,consider-using-in"
[tool.coverage.run]
omit = ["*/test/*", "__init__.py"]
[tool.coverage.report]
exclude_also = [
"def __repr__",
"if False:",
"if 0:",
"raise AssertionError",
"raise NotImplementedError",
"if __name__ == .__main__.:",
"pass",
"(_):",
]