Skip to content

Commit

Permalink
Convert to pyproject.toml instead of setup.py.
Browse files Browse the repository at this point in the history
  • Loading branch information
EmilStenstrom committed Jul 12, 2024
1 parent 4380479 commit 7f6d9c5
Show file tree
Hide file tree
Showing 6 changed files with 71 additions and 72 deletions.
63 changes: 63 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
[build-system]
requires = ["setuptools>=42", "wheel"]
build-backend = "setuptools.build_meta"

[project]
name = "conllu"
version = "4.5.3"
description = "CoNLL-U Parser parses a CoNLL-U formatted string into a nested python dictionary"
readme = "README.md"
requires-python = ">=3.6"
authors = [{name = "Emil Stenström", email = "emil@emilstenstrom.se"}]
license = {file = "LICENSE"}
keywords = ["conllu", "conll", "conll-u", "parser", "nlp"]
classifiers = [
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Operating System :: OS Independent",
]

[project.urls]
"Homepage" = "https://github.com/EmilStenstrom/conllu/"

[project.optional-dependencies]
test = ["tox"]

[tool.setuptools.packages.find]
where = ["conllu"]
include = ["conllu"]

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

[tool.flake8]
ignore = "E302, W503"
max-line-length = 119

[tool.coverage.report]
fail_under = 100
exclude_lines = [
"pragma: no cover",
"def __repr__",
'if T\.TYPE_CHECKING',
'TT\.Protocol',
]

[tool.coverage.run]
branch = true
source = ["conllu"]
omit = [
"conllu/__init__.py",
]

[tool.isort]
line_length = 119
multi_line_output = 5
include_trailing_comma = true
known_first_party = ["conllu", "tests"]
1 change: 1 addition & 0 deletions requirements-dev.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
coverage
flake8
flake8-pyproject
isort
mypy
pip-tools
Expand Down
4 changes: 4 additions & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ filelock==3.15.4
# tox
# virtualenv
flake8==7.1.0
# via
# -r requirements-dev.in
# flake8-pyproject
flake8-pyproject==1.2.3
# via -r requirements-dev.in
idna==3.7
# via requests
Expand Down
34 changes: 0 additions & 34 deletions setup.cfg

This file was deleted.

37 changes: 0 additions & 37 deletions setup.py

This file was deleted.

4 changes: 3 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ commands =
[testenv:flake8]
# Note: Settings for flake8 exists in the setup.cfg file
changedir = {toxinidir}
deps = flake8
deps =
flake8
flake8-pyproject
commands =
flake8 conllu tests
{[cleanup]commands}
Expand Down

0 comments on commit 7f6d9c5

Please sign in to comment.