-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathpyproject.toml
142 lines (126 loc) · 3.57 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
[build-system]
build-backend = "poetry_dynamic_versioning.backend"
requires = [ "poetry-core>=1", "poetry-dynamic-versioning>=1,<2" ]
[tool.poetry]
name = "almanack"
version = "0.0.0"
description = "An open-source handbook of applied guidance and tools for sustainable software development and maintenance."
authors = [ "Software Gardening Community" ]
license = "BSD-3-Clause"
readme = "README.md"
packages = [ { include = "almanack", from = "src" } ]
include = [
"src/book/*.yml",
"src/book/**/*.md",
"src/book/references.bib",
]
exclude = [ "src/book/_build" ]
[tool.poetry.dependencies]
python = ">=3.9,<=3.12"
pyyaml = "^6.0.1"
pygit2 = "^1.15.1"
fire = ">=0.6,<0.8"
tabulate = "^0.9.0"
charset-normalizer = "^3.4.0"
requests = "^2.32.3"
defusedxml = "^0.7.1"
[tool.poetry.group.book.dependencies]
jupyter-book = "^1.0.0"
docutils = "0.20.1"
sphinxcontrib-bibtex = "^2.6.2"
pandas = "^2.2.2"
pyarrow = ">=16,<19"
jupyterlab = "^4.2.3"
plotly = "^5.22.0"
[tool.poetry.group.dev.dependencies]
poethepoet = ">=0.25,<0.32"
pytest = "^8.1.1"
linkchecker = "^10.4.0"
vale = "^3.3.1.0"
pyppeteer = "^2.0.0"
coverage = "^7.5.3"
biopython = "^1.84"
black = "^24.4.2"
isort = "^5.13.2"
jupyterlab-code-formatter = ">=2.2.1,<4.0.0"
requests = "^2.32.3"
kaleido = "0.2.1"
pygithub = "^2.3.0"
jupyterlab-spellchecker = "^0.8.4"
jsonschema = "^4.23.0"
dunamai = "^1.23.0"
[tool.poetry.scripts]
almanack = "almanack.cli:cli_get_table"
[tool.poetry-dynamic-versioning]
enable = true
style = "pep440"
vcs = "git"
# specify where version replacement is performed
[tool.poetry-dynamic-versioning.substitution]
files = [ "src/almanack/__init__.py" ]
# set persistent versions within the __init__.py file in cases
# where we may not have or want access to full git history
[tool.poetry-dynamic-versioning.files."src/almanack/__init__.py"]
persistent-substitution = false
[tool.setuptools_scm]
root = "."
[tool.ruff]
target-version = "py311"
fix = true
lint.select = [
# mccabe
"C90",
# pyflakes
"F",
# pylint
"PL",
# ruff
"RUF",
]
# defines poe the poet tasks
# Ignore `E402` and `F401` (unused imports) in all `__init__.py` files
lint.per-file-ignores."__init__.py" = [ "F401" ]
[tool.isort]
profile = "black"
[tool.codespell]
ignore-words = "styles/config/vocabularies/almanack/accept.txt"
# add capabilities for inline ignore for codespell linting
# referenced from: https://github.com/codespell-project/codespell/issues/1212
ignore-regex = ".{1024}|.*codespell-ignore.*"
[tool.vulture]
min_confidence = 90
paths = [ "src/almanack", "tests" ]
[tool.bandit]
exclude_dirs = [ "tests" ]
[tool.poe.tasks]
# builds the jupyter book related to this project
build-book.shell = """
jupyter-book build src/book --all
"""
# build a PDF from the HTML content
# note: depends on build-book content and creates copy to avoid
# single-page changes performed on the HTML build.
build-book-pdf.shell = """
cp -r src/book src/_pdfbuild &&
jupyter-book build src/_pdfbuild --builder pdfhtml
"""
# builds the jupyter book related to this project and opens a new browser window
build-book-dev.shell = """
jupyter-book build src/book && \
python -m webbrowser -t "file://$PWD/src/book/_build/html/index.html"
"""
# syncs and runs vale relative to this project
# through pre-commit to trigger warnings as
# non-zero return when there is more than one
# line of output from vale.
vale-checks.shell = """
vale sync || true;
output=$(vale ./src/book) ||
if [ $(echo "$output" | wc -l) -gt 1 ]; then
echo "$output"; exit 1;
fi
"""
# add a convenience task for package-focused testing
pkg-tests.shell = """
pytest --ignore tests/test_build.py
"""