This repository has been archived by the owner on Jan 20, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathpyproject.toml
139 lines (121 loc) · 4.09 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
[tool.poetry]
name = "exe-kg-lib"
version = "1.0.0" # not used when bumping version via poe bump-version-tag or cd.yaml
description = "Library for executable ML pipelines represented by KGs."
license = "AGPL-3.0"
authors = ["Antonis Klironomos <antonis.klironomos@de.bosch.com>", "Mohamed Gad-Elrab <mohamed.gad-elrab@de.bosch.com>"]
classifiers = [
"Development Status :: 1 - Planning",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"Natural Language :: English",
"Programming Language :: Python :: 3",
"Topic :: Scientific/Engineering",
"Topic :: Software Development",
]
homepage = "https://boschresearch.github.io/ExeKGLib"
include = ["README.md", "pyproject.toml"]
maintainers = ["Antonis Klironomos <antonis.klironomos@de.bosch.com>", "Mohamed Gad-Elrab <mohamed.gad-elrab@de.bosch.com>"]
readme = "README.md"
repository = "https://github.com/boschresearch/ExeKGLib"
[build-system]
requires = ["poetry-core>=1.3.2"]
build-backend = "poetry.core.masonry.api"
[tool.poetry.dependencies]
python = "^3.8"
typer = "^0.7.0"
pandas = "^1.5.2"
scikit-learn = "^1.1.3"
black = {extras = ["d"], version = ">=22.10,<24.0"}
matplotlib = "^3.6.2"
rdflib = "^6.2.0"
mkdocs = "^1.4.2"
typer-cli = "^0.0.13"
pyshacl = "^0.21.0"
[tool.poetry.group.dev.dependencies]
black = ">=22.10,<24.0"
genbadge = {extras = ["coverage", "tests"], version = "^1.1.0"}
isort = {extras = ["colors"], version = "^5.10.1"}
mkdocs-gen-files = "^0.4.0"
mkdocs-git-revision-date-localized-plugin = "^1.1.0"
mkdocs-literate-nav = ">=0.5,<0.7"
mkdocs-material = ">=8.5.10,<10.0.0"
mkdocs-minify-plugin = "^0.6.2"
mkdocstrings-python = "^0.8.2"
poethepoet = ">=0.16.5,<0.19.0"
pre-commit = ">=2.20,<4.0"
pytest = ">=7.2.0"
pytest-cov = "^4.0.0"
pytest-html = "^3.2.0"
pytest-xdist = "^3.0.2"
pyupgrade = "^3.2.3"
shexer = "^2.1.1"
# Tools config
[tool.black]
line-length = 120
[tool.coverage.report]
fail_under = 60
show_missing = true
skip_empty = true
[tool.coverage.run]
branch = true
source = ["exe_kg_lib"]
[tool.pytest.ini_options]
addopts = [
"--cov",
"--cov-config=pyproject.toml",
"--full-trace",
"--html=docs/exported/tests/report.html",
"--junit-xml=pytest.xml",
"--numprocesses=auto",
"--self-contained-html",
"--showlocals",
"-ra",
]
# Task runner config
[tool.poe]
shell_interpreter = "bash"
verbosity = 1
[tool.poe.tasks.format]
sequence = [
{ shell = "shopt -s globstar; black ${check:+ --check --diff} ${files}" },
{ shell = "shopt -s globstar; isort --color ${check:+ --check --diff} ${files}" },
{ shell = "shopt -s globstar; pyupgrade --py38-plus ${files}" },
]
help = "Format Python files with black & isort."
args = [
{ name = "check", type = "boolean", help = "Only check" },
{ name = "files", positional = true, multiple = true, default = "**/*.py", help = "List of files (optional)" },
]
[tool.poe.tasks.bump-version-tag]
shell = """
GIT_LATEST_TAG=$(git describe --tags --abbrev=0)
poetry version $GIT_LATEST_TAG
poetry version ${rule}
VERSION=$(poetry version | cut -d' ' -f2 | tr -d '\n')
git tag -a "${VERSION}" -m "Version ${VERSION}"
git push --follow-tags
"""
help = "Bump Poetry version and create Git tag."
args = [
{ name = "rule", positional = true, help = "Version bump rule." },
]
[tool.poe.tasks.bump-version-tag-with-semantic-rule]
shell = """
HEAD_COMMIT_CONTENT=$(git log -1)
MAJOR_BUMP_KEYWORD="MAJOR_CHANGE"
MINOR_BUMP_KEYWORD="MINOR_CHANGE"
MAJOR_CHANGE_PREFIX=${HEAD_COMMIT_CONTENT%%$MAJOR_BUMP_KEYWORD*}
MAJOR_CHANGE_INDEX=${#MAJOR_CHANGE_PREFIX}
MINOR_CHANGE_PREFIX=${HEAD_COMMIT_CONTENT%%$MINOR_BUMP_KEYWORD*}
MINOR_CHANGE_INDEX=${#MINOR_CHANGE_PREFIX}
RULE="patch"
if [[ ($MAJOR_CHANGE_INDEX -gt $MINOR_CHANGE_INDEX || $MINOR_CHANGE_INDEX -eq ${#HEAD_COMMIT_CONTENT}) && $MAJOR_CHANGE_INDEX -ne ${#HEAD_COMMIT_CONTENT} ]]; then
RULE="major"
elif [[ ($MINOR_CHANGE_INDEX -gt $MAJOR_CHANGE_INDEX || $MAJOR_CHANGE_INDEX -eq ${#HEAD_COMMIT_CONTENT}) && $MINOR_CHANGE_INDEX -ne ${#HEAD_COMMIT_CONTENT} ]]; then
RULE="minor"
fi
poetry run poe bump-version-tag ${RULE}
"""
help = "Bump Poetry version after semantically checking HEAD commit message and create Git tag."
args = []