Skip to content

Commit

Permalink
update gitignore; add tox and pre-commit config
Browse files Browse the repository at this point in the history
  • Loading branch information
yagebu committed Jan 9, 2022
1 parent b80858b commit a3e0366
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 5 deletions.
12 changes: 7 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
dist
build
.cache
.coverage
htmlcov
*.egg-info
*.pyc
*.pyo
.DS_Store
.cache
.coverage
.eggs
.tox
build
dist
9 changes: 9 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
repos:
- repo: https://github.com/ambv/black
rev: 21.12b0
hooks:
- id: black
- repo: https://github.com/asottile/reorder_python_imports
rev: v2.6.0
hooks:
- id: reorder-python-imports
5 changes: 5 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[build-system]
requires = ["setuptools>=45", "wheel", "setuptools_scm[toml]>=6"]
build-backend = "setuptools.build_meta"

[tool.setuptools_scm]
21 changes: 21 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
[tox]
minversion = 3
envlist = py,build-dist
isolated_build = True

[testenv]
commands = pytest {posargs:tests}
deps =
lektor
pytest
pytest-cov
pytest-mock

[testenv:build-dist]
skip_install = True
deps =
build
twine
commands =
python -m build .
twine check dist/*

0 comments on commit a3e0366

Please sign in to comment.