Skip to content

Commit d232778

Browse files
committed
add project config
1 parent ee87636 commit d232778

File tree

1 file changed

+134
-0
lines changed

1 file changed

+134
-0
lines changed

pyproject.toml

Lines changed: 134 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,134 @@
1+
[build-system]
2+
requires = ["setuptools>=66.0"]
3+
build-backend = "setuptools.build_meta"
4+
5+
# ============================================================================
6+
# project info
7+
# ============================================================================
8+
9+
[project]
10+
name = "compas_skeleton"
11+
description = "Mesh modelling using skeleton graphs."
12+
keywords = []
13+
authors = [
14+
{ name = "Wenqian Yang", email = "[email protected]" },
15+
{ name = "tom van mele", email = "[email protected]" },
16+
]
17+
license = { file = "LICENSE" }
18+
readme = "README.md"
19+
requires-python = ">=3.9"
20+
dynamic = ['dependencies', 'optional-dependencies', 'version']
21+
classifiers = [
22+
"Development Status :: 4 - Beta",
23+
"Topic :: Scientific/Engineering",
24+
"Operating System :: Unix",
25+
"Operating System :: POSIX",
26+
"Operating System :: Microsoft :: Windows",
27+
"Programming Language :: Python",
28+
"Programming Language :: Python :: 3",
29+
"Programming Language :: Python :: 3.10",
30+
"Programming Language :: Python :: 3.11",
31+
"Programming Language :: Python :: 3.12",
32+
]
33+
34+
[project.urls]
35+
Homepage = "https://blockresearchgroup.github.io/compas_skeleton"
36+
Documentation = "https://blockresearchgroup.github.io/compas_skeleton"
37+
Repository = "https://github.com/blockresearchgroup/compas_skeleton"
38+
Changelog = "https://github.com/blockresearchgroup/compas_skeleton/blob/main/CHANGELOG.md"
39+
Issues = "https://github.com/blockresearchgroup/compas_skeleton/issues"
40+
Forum = "https://forum.compas-framework.org/"
41+
42+
# ============================================================================
43+
# setuptools config
44+
# ============================================================================
45+
46+
[tool.setuptools]
47+
package-dir = { "" = "src" }
48+
include-package-data = true
49+
zip-safe = false
50+
51+
[tool.setuptools.dynamic]
52+
version = { attr = "compas_skeleton.__version__" }
53+
dependencies = { file = "requirements.txt" }
54+
optional-dependencies = { dev = { file = "requirements-dev.txt" } }
55+
56+
[tool.setuptools.packages.find]
57+
where = ["src"]
58+
59+
# ============================================================================
60+
# replace pytest.ini
61+
# ============================================================================
62+
63+
[tool.pytest.ini_options]
64+
minversion = "6.0"
65+
testpaths = ["tests", "src/compas_skeleton"]
66+
python_files = ["test_*.py", "*_test.py", "test.py"]
67+
addopts = [
68+
"-ra",
69+
"--strict-markers",
70+
"--doctest-glob=*.rst",
71+
"--tb=short",
72+
"--import-mode=importlib",
73+
]
74+
doctest_optionflags = [
75+
"NORMALIZE_WHITESPACE",
76+
"IGNORE_EXCEPTION_DETAIL",
77+
"ALLOW_UNICODE",
78+
"ALLOW_BYTES",
79+
"NUMBER",
80+
]
81+
82+
# ============================================================================
83+
# replace bumpversion.cfg
84+
# ============================================================================
85+
86+
[tool.bumpversion]
87+
current_version = "1.1.4"
88+
message = "Bump version to {new_version}"
89+
commit = true
90+
tag = true
91+
92+
[[tool.bumpversion.files]]
93+
filename = "src/compas_skeleton/__init__.py"
94+
search = "{current_version}"
95+
replace = "{new_version}"
96+
97+
[[tool.bumpversion.files]]
98+
filename = "CHANGELOG.md"
99+
search = "Unreleased"
100+
replace = "[{new_version}] {now:%Y-%m-%d}"
101+
102+
# ============================================================================
103+
# replace setup.cfg
104+
# ============================================================================
105+
106+
[tool.black]
107+
line-length = 179
108+
109+
[tool.ruff]
110+
line-length = 179
111+
indent-width = 4
112+
target-version = "py39"
113+
114+
[tool.ruff.lint]
115+
select = ["E", "F", "I"]
116+
117+
[tool.ruff.lint.per-file-ignores]
118+
"__init__.py" = ["I001"]
119+
"tests/*" = ["I001"]
120+
"tasks.py" = ["I001"]
121+
122+
[tool.ruff.lint.isort]
123+
force-single-line = true
124+
known-first-party = ["compas_skeleton"]
125+
126+
[tool.ruff.lint.pydocstyle]
127+
convention = "numpy"
128+
129+
[tool.ruff.lint.pycodestyle]
130+
max-doc-length = 179
131+
132+
[tool.ruff.format]
133+
docstring-code-format = true
134+
docstring-code-line-length = "dynamic"

0 commit comments

Comments
 (0)