Skip to content
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

Project updates #126

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
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
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
13 changes: 7 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,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 All @@ -44,7 +44,8 @@ jobs:
cache-dependency-path: .github/workflows/release.yml
- name: Version
id: version
run: echo "::set-output name=version::$(python setup.py --version 2>/dev/null)"
run: |
echo version=$(python -c "from trove_classifiers import version; print(version.__version__)" 2>/dev/null) >> $GITHUB_OUTPUT
- name: Tag
uses: actions/create-release@v1
env:
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.

40 changes: 39 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,45 @@
[build-system]
requires = ["setuptools", "calver"]
requires = ["setuptools >= 61.0"]
build-backend = "setuptools.build_meta"

[project]
name = "trove-classifiers"
readme = "README.md"
description = "Canonical source for classifiers on PyPI (pypi.org)."
authors = [{name = "The PyPI Admins", email = "[email protected]"}]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python :: 3",
"Typing :: Typed",
]
keywords = ["classifiers"]
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

[tool.setuptools.packages.find]
where = ["src"]
namespaces = false

[tool.setuptools.package-data]
"*" = ["py.typed"]

[tool.setuptools.dynamic.version]
attr = "trove_classifiers.version.__version__"


[tool.mypy]
strict = true
warn_unreachable = true
5 changes: 0 additions & 5 deletions requirements/dev.txt

This file was deleted.

33 changes: 0 additions & 33 deletions setup.py

This file was deleted.

1 change: 1 addition & 0 deletions src/trove_classifiers/version.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__version__ = "2022.12.22"
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