-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
162 lines (135 loc) · 5.16 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
################################################################################
# Project Configuration
################################################################################
[project]
name = "snakemake-orcestrator"
version = "0.1.0"
description = "Add a short description here"
authors = [
{ name = "Jermiah Joseph", email = "jermiah.joseph@uhn.ca" },
{ name = "Matthew Boccolon", email = "matthew.boccolon@uhn.ca" },
{ name = "Shahbano" },
]
requires-python = ">= 3.10"
################################################################################
# PIXI Configuration
################################################################################
[tool.pixi.project]
name = "snakemake-orcestrator"
version = "0.1.0"
channels = ["conda-forge", "bioconda"]
platforms = ["osx-arm64", "linux-aarch64"]
[tool.pixi.dependencies]
snakemake = "==7.32.4"
gitpython = ">=3.1.43,<3.2"
aiohttp = ">=3.9.5,<3.10"
git = ">=2.45.1,<2.46"
python-json-logger = ">=2.0.7,<2.1"
pydantic = ">=2.7.4,<2.8"
fastapi = ">=0.111.0,<0.112"
motor = ">=3.4.0,<3.5"
uvicorn = ">=0.30.1,<0.31"
google-cloud-logging = ">=3.10.0,<3.11"
conda = ">=24.5.0,<24.6"
mamba = ">=1.5.8,<1.6"
[tool.pixi.pypi-dependencies]
snakemake-orcestrator = { path = ".", editable = true }
fastapi-cache2 = { extras = ["redis"], version = "*" }
[tool.pixi.environments]
dev = { features = ["test", "style", "docs"], solve-group = "default" }
prod = { features = ["prod"], solve-group = "default" }
release = { features = ["build", "release"], solve-group = "default" }
[tool.pixi.tasks.serve-api]
cmd = "docker compose up"
description = "Serve the API using docker compose. Use '-d' to run in background"
############################################## TEST ################################################
[tool.pixi.feature.test.dependencies]
pytest = "*"
pytest-cov = "*"
pytest-xdist = "*"
pytest-asyncio = ">=0.23.7,<0.24"
jq = ">=1.7.1,<1.8"
python = "==3.11.0"
httpx = ">=0.27.0,<0.28"
mongomock = ">=4.0.0,<4.1"
pytest-dependency = ">=0.5.1,<0.6"
[tool.pixi.feature.test.tasks.test]
cmd = [
"pytest",
"-s",
"--verbose",
"--cov=src/orcestrator",
"--cov-report=xml:coverage-report/coverage.xml",
"--cov-config=config/coverage.toml",
]
inputs = ["src", "tests", "config/coverage.toml"]
outputs = ["coverage-report/coverage.xml"]
description = "Run the test suite"
[tool.pixi.feature.test.tasks.coverage]
cmd = "coverage report --rcfile=config/coverage.toml --show-missing"
inputs = ["coverage-report/coverage.xml", "config/coverage.toml"]
depends-on = ["test"]
description = "Generate a coverage report after running the test suite"
############################################## 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", "config/mkdocs.yaml"]
outputs = ["site"]
description = "Build the documentation"
[tool.pixi.feature.docs.tasks.doc-serve]
cmd = "mkdocs serve -f config/mkdocs.yaml"
inputs = ["docs", "config/mkdocs.yaml"]
description = "Serve the documentation locally"
[tool.pixi.feature.docs.tasks.doc-deploy]
cmd = "mkdocs gh-deploy -f config/mkdocs.yaml --force"
inputs = ["docs", "config/mkdocs.yaml"]
depends-on = ["doc-build"]
description = "Deploy the documentation to GitHub Pages"
#################################### RELEASE & BUILD ###############################################
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.build.targets.wheel]
packages = ["src/orcestrator"]
[tool.pixi.feature.build.dependencies]
build = "*"
hatchling = "*"
hatch = "*"
[tool.pixi.feature.build.tasks.build]
cmd = "hatch build --clean"
inputs = ["src", "config/hatch.toml", "pyproject.toml"]
outputs = ["dist"]
env = { HATCH_CONFIG = "config/hatch.toml" }
description = "Build the package"
[tool.pixi.feature.release.dependencies]
python-semantic-release = ">=8.5.1"
[tool.pixi.feature.release.tasks.nextversion]
cmd = 'echo "Next Version is: $(semantic-release -c config/releaserc.toml version --print)"'
inputs = ["src", "config/releaserc.toml"]
description = "Print the next version"
[tool.pixi.feature.release.tasks.release]
cmd = "semantic-release -c config/releaserc.toml"
################################### PROD ###########################################################7
[tool.pixi.feature.prod.host-dependencies]
pip = "*"
[tool.pixi.feature.prod.dependencies]
python = ">=3.10"
[tool.pixi.feature.prod.tasks.install-dist]
cmd = "pip install --no-deps --disable-pip-version-check dist/*.whl"
depends-on = ["build"]
description = "Install the package in production mode"