Skip to content

Commit

Permalink
Migrated setuptools metadata to pyproject.toml
Browse files Browse the repository at this point in the history
  • Loading branch information
coordt committed Apr 17, 2023
1 parent 6c3b4fe commit 0bd54dc
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 22 deletions.
51 changes: 45 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,50 @@
[build-system]

requires = [
"setuptools >= 40.9.0",
"wheel",
"setuptools >= 40.9.0",
"wheel",
]
build-backend = "setuptools.build_meta"

[project]
name = "bump-my-version"
description = "Version bump your Python project"
authors = [
{ name = "Corey Oordt", email = "coreyoordt@gmail.com" }
]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Environment :: Console",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3 :: Only",
"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 :: 3.12",
"Programming Language :: Python :: Implementation :: PyPy",
"Topic :: Software Development :: Build Tools",
"Topic :: Software Development :: Version Control",
"Topic :: System :: Software Distribution",
]
readme = "README.md"
requires-python = ">=3.7"
license = { file = "LICENSE" }
keywords = ["bumpversion", "version", "release"]
dynamic = ["version"]

[project.urls]
homepage = "https://github.com/callowayproject/bump-my-version"
repository = "https://github.com/callowayproject/bump-my-version.git"
documentation = "https://callowayproject.github.io/bump-my-version/"

[tool.setuptools.dynamic]
version = {attr = "bumpversion.__version__"}

[tool.coverage.run]
branch = true
omit = ["**/test_*.py", "**/__main__.py", "**/aliases.py"]
Expand Down Expand Up @@ -73,7 +112,7 @@ line-length = 119
[tool.ruff]
# Enable pycodestyle (`E`) and Pyflakes (`F`) codes by default.
# "UP" "TRY" "PLR"
select = ["E", "W", "F", "I", "N", "B", "BLE", "C", "D", "E", "F", "I", "N", "S", "T", "W", "RUF", "NPY", "PD", "PGH", "ANN", "C90", "PLC", "PLE", "PLW", "TCH"]
select = ["E", "W", "F", "I", "N", "B", "BLE", "C", "D", "E", "F", "I", "N", "S", "T", "W", "RUF", "NPY", "PD", "PGH", "ANN", "C90", "PLC", "PLE", "PLW", "TCH"]
ignore = [
"ANN002", "ANN003", "ANN101", "ANN102", "ANN204", "ANN401",
"S101", "S104",
Expand All @@ -82,7 +121,7 @@ ignore = [
]

# Allow autofix for all enabled rules (when `--fix`) is provided.
fixable = ["E", "W", "F", "I", "N", "B", "BLE", "C", "D", "E", "F", "I", "N", "S", "T", "W", "RUF", "NPY", "PD", "PGH", "ANN", "C90", "PL", "PLC", "PLE", "PLW", "TCH"]
fixable = ["E", "W", "F", "I", "N", "B", "BLE", "C", "D", "E", "F", "I", "N", "S", "T", "W", "RUF", "NPY", "PD", "PGH", "ANN", "C90", "PL", "PLC", "PLE", "PLW", "TCH"]
unfixable = []

# Exclude a variety of commonly ignored directories.
Expand Down Expand Up @@ -118,7 +157,7 @@ dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
typing-modules = ["typing", "types", "typing_extensions", "mypy", "mypy_extensions"]

[tool.ruff.per-file-ignores]
"tests/*"=["S101", "PLR0913", "PLR0915", "PGH003", "ANN001", "ANN202", "ANN201", "PLR0912", "TRY301", "PLW0603", "PLR2004", "ANN101", "S106", "TRY201", "ANN003", "ANN002", "S105", "TRY003"]
"tests/*" = ["S101", "PLR0913", "PLR0915", "PGH003", "ANN001", "ANN202", "ANN201", "PLR0912", "TRY301", "PLW0603", "PLR2004", "ANN101", "S106", "TRY201", "ANN003", "ANN002", "S105", "TRY003"]

[tool.ruff.mccabe]
# Unlike Flake8, default to a complexity level of 10.
Expand All @@ -138,7 +177,7 @@ tag = true
tag_name = "{new_version}"
allow_dirty = true
parse = "(?P<major>\\d+)\\.(?P<minor>\\d+)\\.(?P<patch>\\d+)(\\.dev(?P<dev>\\d+))?"
serialize =[
serialize = [
"{major}.{minor}.{patch}.dev{dev}",
"{major}.{minor}.{patch}"
]
Expand Down
16 changes: 0 additions & 16 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,19 +1,3 @@
[metadata]
name = bump-my-version
version = attr:bumpversion.__version__
description = Version bump your Python project
url = https://github.com/callowayproject/bump-my-version
author = Corey Oordt
author_email = coreyoordt@gmail.com
classifiers =
Development Status :: 3 - Alpha
Intended Audience :: Developers
Natural Language :: English
Programming Language :: Python :: 3.9
long_description = file:README.md
long_description_content_type = text/markdown
keywords = bumpversion

[options]
zip_safe = False
include_package_data = True
Expand Down

0 comments on commit 0bd54dc

Please sign in to comment.