delaunay 0.6.0

A d-dimensional Delaunay triangulation library with float coordinate support
Documentation
[build-system]
requires = ["setuptools>=65.0.0", "wheel"]
build-backend = "setuptools.build_meta"

[project]
name = "delaunay-scripts"
version = "0.4.1"
description = "Python utility scripts for the delaunay Rust library"
readme = "README.md"
requires-python = ">=3.11"
license = {text = "BSD-3-Clause"}
authors = [
    {name = "Adam Getchell", email = "adam@adamgetchell.org"},
]
keywords = ["delaunay", "triangulation", "benchmarking", "utilities"]
classifiers = [
    "Development Status :: 4 - Beta",
    "Intended Audience :: Developers",
    "Intended Audience :: Science/Research", 
    "License :: OSI Approved :: BSD License",
    "Operating System :: OS Independent",
    "Programming Language :: Python :: 3",
    "Programming Language :: Python :: 3.11",
    "Programming Language :: Python :: 3.12",
    "Programming Language :: Python :: 3.13",
    "Topic :: Scientific/Engineering :: Mathematics",
    "Topic :: Software Development :: Libraries :: Python Modules",
    "Topic :: System :: Benchmarking",
]

# Project dependencies
dependencies = [
    "packaging",
]

[project.urls]
"Homepage" = "https://github.com/acgetchell/delaunay"
"Documentation" = "https://docs.rs/delaunay"
"Repository" = "https://github.com/acgetchell/delaunay"
"Bug Tracker" = "https://github.com/acgetchell/delaunay/issues"

# Configure scripts as entry points for command-line usage
[project.scripts]
benchmark-utils = "benchmark_utils:main"
changelog-utils = "changelog_utils:main"
compare-storage-backends = "compare_storage_backends:main"
enhance-commits = "enhance_commits:main"
hardware-utils = "hardware_utils:main"

# Configure setuptools to find packages in scripts/ directory
[tool.setuptools]
package-dir = {"" = "scripts"}
py-modules = ["benchmark_utils", "changelog_utils", "compare_storage_backends", "enhance_commits", "hardware_utils"]

[tool.ruff]
line-length = 150
target-version = "py311"
src = ["scripts"]

[tool.ruff.lint]
select = ["E", "F", "W", "I", "N", "UP", "YTT", "S", "BLE", "FBT", "B", "A", "COM", "C4", "DTZ", "T10", "EM", "EXE", "ISC", "ICN", "G", "INP", "PIE", "T20", "PYI", "PT", "Q", "RSE", "RET", "SLF", "SIM", "TID", "TCH", "ARG", "PTH", "ERA", "PD", "PGH", "PL", "TRY", "NPY", "RUF"]
fixable = ["ALL"]
unfixable = []
ignore = [
    # Formatter conflicts
    "COM812",  # Trailing comma missing (conflicts with formatter)
    "ISC001",  # Implicitly concatenated string literals (conflicts with formatter)
    
    # CLI script patterns - these are appropriate design choices for command-line tools
    # "PLR0912" - Re-enabled: Too many branches - now enforced to maintain code quality
    # "PLR0913" - Re-enabled: Too many arguments - catch constructor complexity issues
    # "PLR0915" - Re-enabled: Too many statements - now enforced after refactoring complex methods
    "PLR2004", # Magic value used in comparison - acceptable for CLI constants and thresholds
    "FBT001",  # Boolean-typed positional argument - appropriate for CLI flag arguments
    "FBT002",  # Boolean default positional argument - standard CLI pattern
    "BLE001",  # Do not catch blind exception - intentional defensive programming for CLI robustness
    # "S603" - Re-enabled: subprocess call: check for execution of untrusted input - now using secure subprocess wrappers
    # "S607" - Re-enabled: Starting a process with a partial executable path - now using full paths
    "T201",    # print found - appropriate for CLI output and user feedback
    "TRY300",  # Consider moving statement to else block - acceptable control flow for CLI scripts
    "TRY301",  # Abstract raise to inner function - acceptable for straightforward CLI error handling
    "ARG001",  # Unused function argument - common in signal handlers and callback functions
    "ERA001",  # Found commented-out code - acceptable for explanatory comments in CLI tools
    "EXE001",  # Shebang is present but file is not executable - handled by packaging/deployment
    # "S110" - Re-enabled: try-except-pass detected - now enforced to improve error handling
    "PTH123",  # open() should be replaced by Path.open() - acceptable for system file access
    "N806",    # Variable in function should be lowercase - acceptable for constants and ANSI color codes
    "F841",    # Local variable assigned but never used - acceptable for color constants in CLI scripts
    "EM102",   # Exception must not use f-string - acceptable for dynamic error messages in CLI tools
    "TRY003",  # Avoid specifying long messages outside exception class - acceptable for CLI error reporting
    "PLW2901", # for loop variable overwritten - acceptable for line processing in CLI scripts
]

[tool.ruff.lint.per-file-ignores]
"**/tests/test_*.py" = ["S101"]  # Allow assert statements in test files

# Import sorting and organization configuration
[tool.ruff.lint.isort]
known-first-party = ["benchmark_utils", "changelog_utils", "compare_storage_backends", "enhance_commits", "hardware_utils", "subprocess_utils"]
force-single-line = false
split-on-trailing-comma = true
combine-as-imports = true
order-by-type = true
section-order = ["future", "standard-library", "third-party", "first-party", "local-folder"]
# Organize imports: standard library, third-party, first-party, local

[tool.ruff.format]
quote-style = "double"
indent-style = "space"
skip-magic-trailing-comma = false
line-ending = "auto"

# Pylint configuration removed - now using ruff exclusively for Python linting
# Ruff provides faster, more comprehensive linting with better maintenance

[tool.pytest.ini_options]
minversion = "8.0"
addopts = [
    "-ra",
    "--strict-markers",
    "--strict-config",
    "--color=yes",
]
testpaths = ["scripts/tests"]
python_files = ["test_*.py", "*_test.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]

[tool.mypy]
python_version = "3.11"
# Search paths - treat scripts/ as source directory to avoid duplicate module issues
mypy_path = "scripts"
# Core strictness settings - gradually adopt stricter checks
warn_return_any = false  # Too noisy for gradual adoption
warn_unused_configs = true
disallow_untyped_defs = false  # Allow untyped defs for now (implies allow_untyped_defs = true)
check_untyped_defs = false  # Don't check bodies of untyped functions
no_implicit_optional = true
strict_equality = true
warn_redundant_casts = true
warn_unused_ignores = false  # Allow unused ignores during migration
warn_no_return = true
show_error_codes = true
show_column_numbers = true
pretty = true
# Allow untyped calls and incomplete definitions during gradual adoption
allow_untyped_calls = true
allow_incomplete_defs = true
# Focus on catching real bugs, not style issues
disallow_any_explicit = false
disallow_any_generics = false

# Ignore missing imports from third-party libraries without stubs
[[tool.mypy.overrides]]
module = [
    "packaging.*",
]
ignore_missing_imports = true

# Allow tests to be less strict
[[tool.mypy.overrides]]
module = "scripts.tests.*"
ignore_errors = true

[dependency-groups]
dev = [
    "mypy>=1.19.0",
    "pytest>=8.0.0",
    "ruff>=0.12.11",
]