Skip to content

Project updates #126

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Introduce tox instead of Makefile
  • Loading branch information
Secrus committed Jan 7, 2023
commit 86d6fa64704e06ca17b761b395c341781a113188
8 changes: 4 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ jobs:
uses: actions/setup-python@v3
with:
python-version: '3.x'
cache: pip
cache-dependency-path: requirements/dev.txt
- name: Install tox
run: pip install tox
- name: Lint
run: make lint
run: tox -e lint
- name: Test
run: make test
run: tox
10 changes: 5 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ jobs:
uses: actions/setup-python@v3
with:
python-version: '3.x'
cache: pip
cache-dependency-path: .github/workflows/release.yml
- name: Install project
run: pip install .[dev]
- name: Lint
run: make lint
run: tox -e lint
- name: Test
run: make test
run: tox
- name: Install build dependencies
run: pip install -U setuptools wheel build calver
run: pip install -U setuptools wheel build
- name: Build
run: python -m build .
- name: Publish
Expand Down
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,10 @@
build/
dist/
*.egg-info/
.tox/
.venv/
.env/
env/
venv/
.idea/
.vscode/
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Contributing
How to contributing to this package.
How to contribute to this package.

## Running tests
Run `make test`. This checks whether the auto-generated list of classifiers
Expand Down
26 changes: 0 additions & 26 deletions Makefile

This file was deleted.

5 changes: 5 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ dynamic = ["version"]
[project.urls]
Homepage = "https://github.com/pypa/trove-classifiers"

[project.optional-dependencies]
dev = [
"tox >= 4.0"
]

[tool.setuptools]
package-dir = {"" = "src"}
include-package-data = false
Expand Down
5 changes: 0 additions & 5 deletions requirements/dev.txt

This file was deleted.

43 changes: 43 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
[tox]
envlist =
py311
py310
py39
py38
py37
lint
reformat

isolated_build = true
skip_missing_interpreters = true
minversion = 4.0

[testenv]
description = run the tests with pytest under {envname}
passenv =
PYTEST_*
deps =
pytest >= 7.1
commands =
pytest {posargs}
python -m tests.lib

[testenv:lint]
description = lint the code base
skip_install = true
deps =
black >= 22.12.0
mypy >= 0.991
natsort >= 8.2
commands =
black --check bin src tests
python bin/sort.py src/trove_classifiers/__init__.py
mypy src

[testenv:reformat]
description = format the code base
skip_install = true
deps =
black >= 22.12.0
commands =
black tests src