Skip to content

Commit 770a1bf

Browse files
authored
Merge pull request #370 from compas-dev/black-line-len
Moving most config to pyproject.toml
2 parents d3c3258 + 11da3d7 commit 770a1bf

File tree

4 files changed

+36
-43
lines changed

4 files changed

+36
-43
lines changed

pyproject.toml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
[tool.black]
2+
line-length = 180
3+
4+
[tool.pytest.ini_options]
5+
minversion = "6.0"
6+
testpaths = ["src", "tests"]
7+
python_files = [
8+
"test_*.py",
9+
"*_test.py",
10+
"tests.py"
11+
]
12+
addopts = "-ra --strict --doctest-glob=*.rst --tb=short"
13+
doctest_optionflags= "NORMALIZE_WHITESPACE IGNORE_EXCEPTION_DETAIL ALLOW_UNICODE ALLOW_BYTES"
14+
filterwarnings = "ignore::DeprecationWarning"
15+
16+
[tool.pydocstyle]
17+
convention = "numpy"
18+
add-ignore = ["D100"]
19+
20+
[tool.isort]
21+
force_single_line = true
22+
line_length = 180
23+
known_first_party = "compas_fab"
24+
default_section = "THIRDPARTY"
25+
forced_separate = "test_compas_fab"
26+
skip = ["__init__.py"]

requirements-dev.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
attrs>=19.3.0
2-
sphinx_compas_theme>=0.9
3-
sphinx>=1.6
4-
invoke>=0.14
2+
black
53
bump2version>=1.0
64
check-manifest>=0.36
75
flake8
8-
autopep8
6+
invoke>=0.14
7+
isort
98
pylint
10-
pytest>=4.6
119
pytest_mock
1210
pytest-cov
11+
pytest>=6.0
12+
sphinx_compas_theme>=0.9
13+
sphinx>=1.6
1314
sybil
14-
isort
1515
twine
1616
-e .

setup.cfg

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -12,36 +12,3 @@ exclude =
1212
dist,
1313
src/compas_fab/backends/vrep/remote_api/*,
1414
src/compas_fab/ghpython/path_planning.py
15-
16-
[pydocstyle]
17-
convention = numpy
18-
add-ignore = D100
19-
20-
[tool:pytest]
21-
testpaths = src tests
22-
norecursedirs =
23-
migrations
24-
25-
python_files =
26-
test_*.py
27-
*_test.py
28-
tests.py
29-
addopts =
30-
-ra
31-
--strict
32-
--doctest-glob=\*.rst
33-
--tb=short
34-
doctest_optionflags= NORMALIZE_WHITESPACE IGNORE_EXCEPTION_DETAIL ALLOW_UNICODE ALLOW_BYTES
35-
filterwarnings =
36-
ignore::DeprecationWarning
37-
38-
[isort]
39-
force_single_line = True
40-
line_length = 180
41-
known_first_party = compas_fab
42-
default_section = THIRDPARTY
43-
forced_separate = test_compas_fab
44-
skip = migrations, __init__.py
45-
46-
[coverage:run]
47-
branch = True

tasks.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -178,17 +178,17 @@ def test(ctx, checks=False, doctest=False, codeblock=False, coverage=False):
178178
check(ctx)
179179

180180
with chdir(BASE_FOLDER):
181-
pytest_args = ['pytest']
181+
pytest_args = ["pytest"]
182182
if doctest:
183-
pytest_args.append('--doctest-modules')
183+
pytest_args.append("--doctest-modules")
184184
if coverage:
185-
pytest_args.append('--cov=compas_fab')
185+
pytest_args.append("--cov-branch --cov=compas_fab")
186186

187187
ctx.run(" ".join(pytest_args))
188188

189189
# Using --doctest-modules together with docs as the testpaths goes bananas
190190
if codeblock:
191-
ctx.run('pytest docs')
191+
ctx.run("pytest docs")
192192

193193

194194
@task

0 commit comments

Comments
 (0)