Switch to pyproject.toml, and to ruff from flake8

This commit is contained in:
Darren Eberly
2023-02-19 17:36:07 -05:00
parent 5a9d215ec3
commit 117ef785ec
5 changed files with 96 additions and 109 deletions

View File

@@ -32,9 +32,9 @@ jobs:
- name: wheel
run: |
python -m pip install -e .[tests]
- name: flake8
- name: ruff
run: |
flake8 pytiled_parser
ruff check pytiled_parser
- name: mypy
if: success() || failure()
run: |

View File

@@ -1,3 +1,94 @@
[build-system]
requires = ["setuptools", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "pytiled_parser"
version = "2.2.1"
description = "A library for parsing Tiled Map Editor maps and tilesets"
readme = "README.md"
authors = [
{name="Benjamin Kirkbride", email="BenjaminKirkbride@gmail.com"},
{name="Darren Eberly", email="Darren.Eberly@gmail.com"},
]
maintainers = [
{name="Darren Eberly", email="Darren.Eberly@gmail.com"}
]
license = {file = "LICENSE"}
requires-python = ">=3.6"
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: Implementation :: CPython",
"Topic :: Software Development :: Libraries :: Python Modules"
]
dependencies = [
"attrs >= 18.2.0",
"typing-extensions"
]
[project.urls]
homepage = "https://github.com/pythonarcade/pytile_parser"
[project.optional-dependencies]
zstd = [
"zstd"
]
dev = [
"pytest",
"pytest-cov",
"black",
"ruff",
"mypy",
"sphinx",
"sphinx-sitemap",
"myst-parser",
"furo"
]
tests = [
"pytest",
"pytest-cov",
"black",
"ruff",
"mypy"
]
build = [
"build"
]
[tool.setuptools.packages.find]
include = ["pytiled-parser", "pytiled-parser.*"]
[build-system]
requires = ["setuptools", "wheel"]
build-backend = "setuptools.build_meta"
[tool.distutils.bdist_wheel]
universal = true
[tool.coverage.run]
branch = true
[tool.coverage.report]
show_missing = true
[tool.mypy]
python_version = 3.11
warn_unused_configs = true
warn_redundant_casts = true
ignore_missing_imports = true
[[tool.mypy.overrides]]
module = "tests.*"
ignore_errors = true
[tool.ruff]
exclude = ["__init__.py"]
ignore = ["E501"]

View File

@@ -1,3 +0,0 @@
"""pytiled_parser version"""
__version__ = "2.2.1"

View File

@@ -1,95 +0,0 @@
[metadata]
name = pytiled_parser
description = A library for parsing Tiled Map Editor maps and tilesets.
long_description = file: README.md
long_description_content_type = text/markdown
author = Benjamin Kirkbride
author-email = BenjaminKirkbride@gmail.com
maintainer = Darren Eberly
maintainer-email = darren.eberly@gmail.com
license = MIT
license-file = LICENSE
url = https://github.com/pythonarcade/pytiled_parser
classifiers =
Development Status :: 5 - Production/Stable
Intended Audience :: Developers
License :: OSI Approved :: MIT License
Operating System :: OS Independent
Programming Language :: Python
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Programming Language :: Python :: 3.11
Programming Language :: Python :: Implementation :: CPython
Topic :: Software Development :: Libraries :: Python Modules
[options]
packages = find:
include_package_data = True
python_requires = >=3.6
setup_requires =
setuptools >= 40.6
pip >= 10
install_requires =
attrs >= 18.2.0
typing-extensions
[options.packages.find]
include =
pytiled_parser
pytiled_parser.*
[options.extras_require]
zstd =
zstd == 1.4.8.1
tests =
pytest
pytest-cov
black
flake8
mypy
isort<5,>=4.2.5
build =
build
docs =
sphinx
sphinx-sitemap
myst-parser
furo
[bdist_wheel]
universal=0
[coverage:run]
branch = True
[coverage:report]
show_missing = True
[isort]
multi_line_output=3
include_trailing_comma=True
force_grid_wrap=0
use_parentheses=True
line_length=88
# Global options:
[mypy]
python_version = 3.10
warn_unused_configs = True
warn_redundant_casts = True
ignore_missing_imports = True
[mypy-tests.*]
ignore_errors = True
[flake8]
max-line-length = 88
ignore = E501
exclude = .git,__pycache__,__init__.py,.mypy_cache,.pytest_cache

View File

@@ -1,6 +0,0 @@
# pylint: disable-all
# type: ignore
from setuptools import setup
exec(open("pytiled_parser/version.py").read())
setup(version=__version__)