-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
164 lines (135 loc) · 5.45 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
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
#--------------------------------------------------------------------------------------------------#
######################################### Package Config ###########################################
#__________________________________________________________________________________________________#
[project]
name = "pydicomsorter"
version = "0.15.0"
description = "A Quick Tool For Sorting Dicom Files"
license = "MIT"
readme = "README.md"
keywords = ["pydicomsorter", "pixi", "python", "package"]
authors = [{ name = "Jermiah Joseph", email = "jermiahjoseph98@gmail.com" }]
maintainers = [{ name = "Jermiah Joseph", email = "jermiahjoseph98@gmail.com" }]
requires-python = ">= 3.10"
dependencies = ["rich", "rich-click", "pydicom", "pydantic"]
classifiers = [
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
]
[project.urls]
homepage = "https://github.com/jjjermiah/pydicomsorter"
repository = "https://github.com/jjjermiah/pydicomsorter"
documentation = "https://jjjermiah.github.io/pydicomsorter/"
changelog = "https://github.com/jjjermiah/pydicomsorter/blob/main/docs/CHANGELOG.md"
issues = "https://github.com/jjjermiah/pydicomsorter/issues"
[project.scripts]
dicomsort = "pydicomsorter.cli:cli"
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
#--------------------------------------------------------------------------------------------------#
############################################## PIXI ################################################
#__________________________________________________________________________________________________#
[tool.pixi.project]
channels = ["conda-forge"]
platforms = ["osx-arm64", "linux-64", "win-64", "osx-64"]
[tool.pixi.dependencies]
[tool.pixi.pypi-dependencies]
pydicomsorter = { path = ".", editable = true }
[tool.pixi.environments]
dev = { features = ["test", "style", "docs"], solve-group = "default" }
publish = { features = ["build", "release"], solve-group = "default" }
py310 = ["py310", "test"]
py311 = ["py311", "test"]
py312 = ["py312", "test"]
############################################## python ###############################################
[tool.pixi.feature.py310.dependencies]
python = "3.10.*"
[tool.pixi.feature.py311.dependencies]
python = "3.11.*"
[tool.pixi.feature.py312.dependencies]
python = "3.12.*"
############################################## TEST ################################################
[tool.pixi.feature.test.dependencies]
pytest = "*"
pytest-cov = "*"
pytest-xdist = "*"
ipykernel = ">=6.29.3,<6.30"
[tool.pixi.feature.test.tasks.test]
cmd = [
"pytest",
"--numprocesses=auto",
"-s",
"--verbose",
"--cov=pydicomsorter",
"--cov-report=xml:coverage-report/coverage.xml",
"--cov-config=config/coverage.toml",
]
inputs = ["src", "tests", "config/coverage.toml"]
outputs = ["coverage-report/coverage.xml"]
[tool.pixi.feature.test.tasks.coverage]
cmd = "coverage report --rcfile=config/coverage.toml"
inputs = ["coverage-report/coverage.xml", "config/coverage.toml"]
depends-on = ["test"]
[tool.pixi.feature.test.tasks.validate]
cmd = "pre-commit run --all-files"
inputs = ["src/*", "tests/*", "config/*"]
############################################## STYLE ###############################################
# See config/ruff.toml for the configuration
[tool.pixi.feature.style.dependencies]
ruff = ">=0.4.4"
pre-commit = ">=3.7.1,<3.8"
[tool.pixi.feature.style.tasks.lint]
cmd = "ruff check --config=config/ruff.toml src"
inputs = ["src", "config/ruff.toml"]
[tool.pixi.feature.style.tasks.format]
cmd = "ruff format --config=config/ruff.toml src"
inputs = ["src", "config/ruff.toml"]
############################################## DOCS ################################################
# Available tasks: doc-build, doc-serve, doc-deploy
# See config/mkdocs.yaml for the configuration
[tool.pixi.feature.docs.dependencies]
mkdocs = "*"
[tool.pixi.feature.docs.tasks.doc-build]
cmd = "mkdocs build -f config/mkdocs.yaml"
inputs = ["docs"]
outputs = ["site"]
[tool.pixi.feature.docs.tasks.doc-serve]
cmd = "mkdocs serve -f config/mkdocs.yaml"
inputs = ["docs"]
[tool.pixi.feature.docs.tasks.doc-deploy]
cmd = "mkdocs gh-deploy -f config/mkdocs.yaml --force"
inputs = ["docs"]
#################################### RELEASE & BUILD ###############################################
[tool.pixi.feature.release.dependencies]
python-semantic-release = ">=8.5.1"
[tool.pixi.feature.release.tasks]
# Semver task will only work on the main or dev/develop branch (see releaserc.toml:branches)
semver = 'echo "Next Version is: $(semantic-release -c config/releaserc.toml version --print)"'
release = "semantic-release -c config/releaserc.toml version"
[tool.pixi.feature.build.dependencies]
hatch = "*"
[tool.pixi.feature.build.tasks]
# Builds the package and publishes it to the test.pypi.org repository
build = { cmd = "hatch build --clean", inputs = [
"src",
"config/hatch.toml",
], outputs = [
"dist/*",
], env = { HATCH_CONFIG = "config/hatch.toml" } }
publish-pypi = { cmd = "hatch publish --yes --repo main", inputs = [
"dist/*",
"config/hatch.toml",
], depends-on = [
"build",
], env = { HATCH_CONFIG = "config/hatch.toml" } }
publish-test = { cmd = "hatch publish --yes --repo test", inputs = [
"dist/*",
"config/hatch.toml",
], depends-on = [
"build",
], env = { HATCH_CONFIG = "config/hatch.toml" } }