Skip to content

Commit 86d6fa6

Browse files
committed
Introduce tox instead of Makefile
1 parent 809156b commit 86d6fa6

File tree

8 files changed

+65
-41
lines changed

8 files changed

+65
-41
lines changed

.github/workflows/main.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ jobs:
1414
uses: actions/setup-python@v3
1515
with:
1616
python-version: '3.x'
17-
cache: pip
18-
cache-dependency-path: requirements/dev.txt
17+
- name: Install tox
18+
run: pip install tox
1919
- name: Lint
20-
run: make lint
20+
run: tox -e lint
2121
- name: Test
22-
run: make test
22+
run: tox

.github/workflows/release.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@ jobs:
1616
uses: actions/setup-python@v3
1717
with:
1818
python-version: '3.x'
19-
cache: pip
20-
cache-dependency-path: .github/workflows/release.yml
19+
- name: Install project
20+
run: pip install .[dev]
2121
- name: Lint
22-
run: make lint
22+
run: tox -e lint
2323
- name: Test
24-
run: make test
24+
run: tox
2525
- name: Install build dependencies
26-
run: pip install -U setuptools wheel build calver
26+
run: pip install -U setuptools wheel build
2727
- name: Build
2828
run: python -m build .
2929
- name: Publish

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,10 @@
22
build/
33
dist/
44
*.egg-info/
5+
.tox/
6+
.venv/
7+
.env/
8+
env/
9+
venv/
10+
.idea/
11+
.vscode/

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Contributing
2-
How to contributing to this package.
2+
How to contribute to this package.
33

44
## Running tests
55
Run `make test`. This checks whether the auto-generated list of classifiers

Makefile

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

pyproject.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@ dynamic = ["version"]
2020
[project.urls]
2121
Homepage = "https://github.com/pypa/trove-classifiers"
2222

23+
[project.optional-dependencies]
24+
dev = [
25+
"tox >= 4.0"
26+
]
27+
2328
[tool.setuptools]
2429
package-dir = {"" = "src"}
2530
include-package-data = false

requirements/dev.txt

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

tox.ini

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
[tox]
2+
envlist =
3+
py311
4+
py310
5+
py39
6+
py38
7+
py37
8+
lint
9+
reformat
10+
11+
isolated_build = true
12+
skip_missing_interpreters = true
13+
minversion = 4.0
14+
15+
[testenv]
16+
description = run the tests with pytest under {envname}
17+
passenv =
18+
PYTEST_*
19+
deps =
20+
pytest >= 7.1
21+
commands =
22+
pytest {posargs}
23+
python -m tests.lib
24+
25+
[testenv:lint]
26+
description = lint the code base
27+
skip_install = true
28+
deps =
29+
black >= 22.12.0
30+
mypy >= 0.991
31+
natsort >= 8.2
32+
commands =
33+
black --check bin src tests
34+
python bin/sort.py src/trove_classifiers/__init__.py
35+
mypy src
36+
37+
[testenv:reformat]
38+
description = format the code base
39+
skip_install = true
40+
deps =
41+
black >= 22.12.0
42+
commands =
43+
black tests src

0 commit comments

Comments
 (0)