generated from blooop/python_template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
132 lines (108 loc) · 3.91 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
121
122
123
124
125
126
127
128
129
130
131
132
[project]
name = "rockervsc"
version = "0.3.2"
authors = [{ name = "Austin Gregg-Smith", email = "[email protected]" }]
description = "A rocker wrapper for launching and attaching vscode to a rocker container"
readme = "README.md"
license = "MIT"
dependencies = ["rockerc[extensions]>=0.4.2"]
[project.urls]
Source = "https://github.com/blooop/rockervsc"
Home = "https://github.com/blooop/rockervsc"
[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]
rockervsc = { path = ".", editable = true }
[project.optional-dependencies]
test = [
"black>=23,<=24.10.0",
"pylint>=3.2.5,<=3.3.1",
"pytest-cov>=4.1,<=6.0.0",
"pytest>=7.4,<=8.3.3",
"hypothesis>=6.104.2,<=6.118.8",
"ruff>=0.5.0,<=0.7.3",
"coverage>=7.5.4,<=7.6.4",
]
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.build]
include= ["rockervsc"]
[project.scripts]
rockervsc = "rockervsc.rockervsc:run_rockervsc"
# 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]
format = "black ."
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.black]
line-length = 100
[tool.ruff]
line-length = 100 # Same as Black.
target-version = "py310"
[tool.ruff.lint]
# Never enforce `E501` (line length violations).
#"F841" will auto remove unused variables which is annoying during development, pylint catches this anyway
ignore = ["E501", "E902", "F841"]
# Allow unused variables when underscore-prefixed.
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
# Ignore `E402` (import violations) in all `__init__.py` files, and in `path/to/file.py`.
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["E402", "F401"]
[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",
"(_):",
]