-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
170 lines (151 loc) · 3.36 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
165
166
167
168
169
170
[project]
name = "nbis_project_admin"
authors = [
]
description = "NBIS project admin"
readme = "README.md"
keywords = ["bioinformatics"]
license = {text = "MIT"}
classifiers = [
"Development Status :: 4 - Beta",
"Environment :: Console",
"Intended Audience :: Science/Research",
"Natural Language :: English",
"Programming Language :: Python :: 3",
"Topic :: Scientific/Engineering :: Bio-Informatics"
]
dependencies = [
'click>=8.0',
"pypandoc>=1.15",
"jinja2>=3.1.6",
"toml>=0.10.2",
"ruamel-yaml>=0.18.10",
"jsonschema>=4.23.0",
]
dynamic = ["version"]
[build-system]
requires = ["hatchling", "hatch-vcs"]
build-backend = "hatchling.build"
[tool.hatch.version]
source = "vcs"
[tool.hatch.metadata]
allow-direct-references = true
[tool.hatch.build.hooks.vcs]
version-file = "src/nbis/_version.py"
[tool.hatch.build.targets.wheel]
packages = ["src/nbis"]
[project.scripts]
nbis-admin = "nbis.cli:cli"
[tool.pytest.ini_options]
minversion = "7.0"
addopts = "-ra -q --doctest-modules"
pythonpath = [
"src"
]
testpaths = [
"tests",
]
filterwarnings = [
"ignore::DeprecationWarning",
]
[tool.pyright]
venvPath = "." # uv installs the venv in the current dir
venv = ".venv" # in a folder called `.venv`
include = ["src"]
pythonVersion = "3.11" # if library, specify the _lowest_ you support
reportMissingTypeStubs = false
reportAttributeAccessIssue = false
reportCallIssue = false
reportOptionalMemberAccess = false
reportAssignmentType = false
[tool.tox]
legacy_tox_ini = """
[tox]
envlist = py311,py312,py313
isolated_build = true
[gh-actions]
python =
3.11: py311
3.12: py312
3.13: py313
[testenv:test]
changedir = tests
deps =
pytest
pytest-coverage
pytest-shutil
pytest-git
pytest-runner
pip>=22.1.0
wheel
commands =
pytest --basetemp="{envtmpdir}" {posargs}
[testenv:project]
allowlist_externals =
git
touch
uv
changedir = {envtmpdir}/project_foo
setenv =
SKIP = lint
deps =
build
pre-commit
pyright
pytest
pytest-coverage
pytest-shutil
pytest-git
pytest-runner
pip>=22.1.0
wheel
commands:
nbis-admin init .
git init -b main .
git add -f .
uv pip install -e . --no-deps
uv pip install snakemake pandas
project_foo
nbis-admin config init
nbis-admin add template -t quarto
nbis-admin add tool my_tool
touch src/project_foo/tools/__init__.py
nbis-admin smk init
nbis-admin smk add
git add . _quarto.yml src/project_foo/tools/my_tool.py
project_foo
project_foo smk
project_foo smk run --no-profile --cores 1
nbis-admin --version
nbis-admin add diary
pre-commit
"""
[tool.ruff]
target-version = "py312"
line-length = 88
[tool.ruff.format]
docstring-code-format=true
[tool.ruff.lint]
select = [
"A", # warn about shadowing built-ins
"E", # style stuff, whitespaces
"F", # important pyflakes lints
"I", # import sorting
"N", # naming
"T100", # breakpoints
]
ignore = ["N806"]
[tool.ruff.lint.isort]
# so it knows to group first-party stuff last
known-first-party = ["nbis"]
[dependency-groups]
dev = [
"jupyter>=1.1.1",
"jupyter-book>=1.0.4.post1",
"pylint>=3.3.6",
"pyright>=1.1.398",
"pytest>=8.3.5",
"snakemake>=9.1.9",
"tox>=4.25.0",
]