Skip to content

Commit 21db18b

Browse files
committed
fix: refine package config
1 parent b4128ac commit 21db18b

4 files changed

Lines changed: 56 additions & 49 deletions

File tree

.github/workflows/python-dlt-ci.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
with:
2525
image: python-dlt/python-dlt-unittest:${{ matrix.LIBDLT_VERSION }}
2626
options: -v ${{ github.workspace }}:/pydlt -w /pydlt
27-
run: tox -e lint
27+
run: tox -e black,ruff
2828
- name: Run unit test
2929
uses: addnab/docker-run-action@v3
3030
with:

pyproject.toml

Lines changed: 44 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,13 @@ include = ["dlt*"]
3838
exclude = ["playbook*", "zuul.d*", "extracted_files*", "tests"]
3939

4040
[build-system]
41-
requires = ["setuptools>=45", "setuptools_scm[toml]>=6.2"]
41+
requires = ["setuptools>=45", "setuptools-git-versioning"]
4242
build-backend = "setuptools.build_meta"
4343

44+
[tool.setuptools-git-versioning]
45+
enabled = true
46+
dev_template = "{tag}.dev{ccount}+{sha}"
47+
4448
[tool.black]
4549
line-length = 119
4650
target_version = ['py37']
@@ -64,3 +68,42 @@ exclude = '''
6468
| _version.py
6569
)
6670
'''
71+
72+
[tool.ruff]
73+
line-length = 119
74+
select = ["E", "F", "Q", "D"]
75+
# the following is equivalent to --docstring-convention=pep8
76+
extend-ignore = [
77+
"D100",
78+
"D107",
79+
"D105",
80+
"D401",
81+
"D101",
82+
"D102",
83+
"D103",
84+
"D104",
85+
"D200",
86+
"D400",
87+
"D203",
88+
"D205",
89+
"D212",
90+
"D213",
91+
"D214",
92+
"D215",
93+
"D404",
94+
"D405",
95+
"D406",
96+
"D407",
97+
"D408",
98+
"D409",
99+
"D410",
100+
"D411",
101+
"D413",
102+
"D415",
103+
"D416",
104+
"D417",
105+
]
106+
107+
# D104: Missing docstring in public package
108+
# This D104 error will be ignored only in __init__ files
109+
per-file-ignores = {"__init__.py" = ["D104"]}

setup.cfg

Lines changed: 0 additions & 43 deletions
This file was deleted.

tox.ini

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[tox]
2-
envlist = py3,lint
2+
envlist = py3,black,ruff
33
output_dir={env:SPHINX_OUTPUT_DIR:{toxworkdir}/_build}
44
isolated_build = True
55

@@ -19,14 +19,21 @@ commands =
1919
filterwarnings =
2020
error
2121

22-
[testenv:lint]
22+
[testenv:ruff]
23+
basepython = python3
24+
skip_install = true
25+
deps =
26+
ruff
27+
mypy
28+
commands =
29+
ruff .
30+
31+
[testenv:black]
2332
skip_install = True
2433
skipsdist = True
2534
deps =
26-
flake8
2735
black
2836
commands =
29-
flake8
3037
black -l 119 --check .
3138

3239
[testenv:docs]

0 commit comments

Comments
 (0)