blext/pyproject.toml

220 lines
5.9 KiB
TOML
Raw Permalink Normal View History

2025-01-13 18:30:57 +01:00
[project]
name = "blext"
2025-01-15 09:34:25 +01:00
version = "0.3.0"
2025-01-13 18:52:49 +01:00
description = "A fast, convenient project manager for Blender extensions."
2025-01-13 18:30:57 +01:00
authors = [
{ name = "Sofus Albert Høgsbro Rose", email = "blext@sofusrose.com" },
]
maintainers = [
{ name = "Sofus Albert Høgsbro Rose", email = "blext@sofusrose.com" },
]
readme = "README.md"
requires-python = ">=3.11"
license = { text = "AGPL-3.0-or-later" }
dependencies = [
2025-01-13 18:52:49 +01:00
"cyclopts>=3.1.5",
"pydantic>=2.10.5",
"pypdl>=1.5.1",
"rich>=13.9.4",
"tomli-w>=1.1.0",
2025-01-13 18:30:57 +01:00
]
2025-01-13 18:52:49 +01:00
classifiers = [
"Development Status :: 3 - Alpha",
"Programming Language :: Python :: 3",
"Environment :: Console",
"Natural Language :: English",
"Intended Audience :: Developers",
"Operating System :: OS Independent",
"License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)",
"Topic :: Artistic Software",
"Topic :: Software Development :: Build Tools",
]
[project.urls]
Homepage = "https://git.sofus.io/so-rose/blext"
2025-01-13 18:30:57 +01:00
[dependency-groups]
dev = [
"commitizen>=4.1.0",
2025-01-13 18:30:57 +01:00
"mypy>=1.14.1",
"pytest>=8.3.4",
"ruff>=0.9.1",
]
[project.scripts]
blext = "blext.cli:app"
[tool.setuptools]
packages = ["blext"]
2025-01-14 09:20:36 +01:00
[tool.hatch.build.targets.wheel]
packages = ["blext"]
2025-01-13 18:30:57 +01:00
[tool.uv]
package = true
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
####################
# - Tooling: Ruff
####################
[tool.ruff]
target-version = "py311"
line-length = 88
[tool.ruff.lint]
task-tags = ["TODO"]
select = [
"E", # pycodestyle ## General Purpose
"F", # pyflakes ## General Purpose
"PL", # Pylint ## General Purpose
## Code Quality
"TCH", # flake8-type-checking ## Type Checking Block Validator
"C90", # mccabe ## Avoid Too-Complex Functions
"ERA", # eradicate ## Ban Commented Code
"TRY", # tryceratops ## Exception Handling Style
"B", # flake8-bugbear ## Opinionated, Probable-Bug Patterns
"N", # pep8-naming
"D", # pydocstyle
"SIM", # flake8-simplify ## Sanity-Check for Code Simplification
"SLF", # flake8-self ## Ban Private Member Access
"RUF", # Ruff-specific rules ## Extra Good-To-Have Rules
## Style
"I", # isort ## Force import Sorting
"UP", # pyupgrade ## Enforce Upgrade to Newer Python Syntaxes
"COM", # flake8-commas ## Enforce Trailing Commas
"Q", # flake8-quotes ## Finally - Quoting Style!
"PTH", # flake8-use-pathlib ## Enforce pathlib usage
"A", # flake8-builtins ## Prevent Builtin Shadowing
"C4", # flake9-comprehensions ## Check Compehension Appropriateness
"DTZ", # flake8-datetimez ## Ban naive Datetime Creation
"EM", # flake8-errmsg ## Check Exception String Formatting
"ISC", # flake8-implicit-str-concat ## Enforce Good String Literal Concat
"G", # flake8-logging-format ## Enforce Good Logging Practices
"INP", # flake8-no-pep420 ## Ban PEP420; Enforce __init__.py.
"PIE", # flake8-pie ## Misc Opinionated Checks
"T20", # flake8-print ## Ban print()
"RSE", # flake8-raise ## Check Niche Exception Raising Pattern
"RET", # flake8-return ## Enforce Good Returning
"ARG", # flake8-unused-arguments ## Ban Unused Arguments
# Specific
"PT", # flake8-pytest-style ## pytest-Specific Checks
]
ignore = [
"COM812", # Conflicts w/Formatter
"ISC001", # Conflicts w/Formatter
"Q000", # Conflicts w/Formatter
"Q001", # Conflicts w/Formatter
"Q002", # Conflicts w/Formatter
"Q003", # Conflicts w/Formatter
"D206", # Conflicts w/Formatter
"E701", # class foo(Parent): pass or if simple: return are perfectly elegant
"ERA001", # 'Commented-out code' seems to be just about anything to ruff
"F722", # jaxtyping uses type annotations that ruff sees as "syntax error"
"N806", # Sometimes we like using types w/uppercase in functions, sue me
"RUF001", # We use a lot of unicode, yes, on purpose!
# Line Length - Controversy Incoming
## Hot Take: Let the Formatter Worry about Line Length
## - Yes dear reader, I'm with you. Soft wrap can go too far.
## - ...but also, sometimes there are real good reasons not to split.
## - Ex. I think 'one sentence per line' docstrings are a valid thing.
## - Overlong lines tend to be be a code smell anyway
## - We'll see if my hot takes survive the week :)
"E501", # Let Formatter Worry about Line Length
]
[tool.ruff.lint.per-file-ignores]
"tests/*" = [
"SLF001", # It's okay to not have module-level docstrings in test modules.
"D100", # It's okay to not have module-level docstrings in test modules.
"D104", # Same for packages.
]
####################
# - Tooling: Ruff Sublinters
####################
[tool.ruff.lint.flake8-bugbear]
extend-immutable-calls = []
[tool.ruff.lint.pycodestyle]
max-doc-length = 120
ignore-overlong-task-comments = true
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.ruff.lint.pylint]
max-args = 6
####################
# - Tooling: Ruff Formatter
####################
[tool.ruff.format]
quote-style = "single"
indent-style = "tab"
docstring-code-format = false
####################
# - Tooling: MyPy
####################
[tool.mypy]
2025-01-13 18:52:49 +01:00
python_version = '3.11'
2025-01-13 18:30:57 +01:00
python_executable="./.venv/bin/python"
warn_redundant_casts = true
warn_unused_ignores = true
warn_return_any = true
strict_optional = true
no_implicit_optional = true
disallow_subclassing_any = false
disallow_any_generics = true
disallow_untyped_calls = true
disallow_incomplete_defs = true
check_untyped_defs = true
disallow_untyped_decorators = true
ignore_missing_imports = true
plugins = [
# 'pydantic.mypy',
# 'typing_protocol_intersection.mypy_plugin',
]
####################
# - Tooling: Commits
####################
[tool.commitizen]
# Specification
name = "cz_conventional_commits"
version_scheme = "semver2"
version_provider = "pep621"
tag_format = "v$version"
# Version Bumping
retry_after_failure = true
major_version_zero = true
update_changelog_on_bump = true
# Annotations / Signature
gpg_sign = true
annotated_tag = true
####################
# - Tooling: Pytest
####################
[tool.pytest.ini_options]
testpaths = ["tests"]