Research-Stack/5-Applications/nodupe/pyproject.toml
2026-05-05 21:15:26 -05:00

264 lines
6.3 KiB
TOML

[build-system]
requires = ["setuptools>=61.0.0", "wheel"]
build-backend = "setuptools.build_meta"
[tool.setuptools.packages.find]
where = ["."]
include = ["nodupe*"]
exclude = [
"logs*",
"output*",
"merge_backup*",
"node_modules*",
"Project_Plans*",
"docs*",
"tests*",
"benchmarks*",
"htmlcov*",
".github*",
".vscode*",
".idea*",
"*.egg-info*",
"*.pyc*",
"__pycache__*",
".git*",
".venv*",
"*.log*",
"*.png*",
"*.jpg*",
"*.zip*",
"*.tar.gz*",
"coverage.xml*",
"test_results.xml*",
"pylint_report.txt*"
]
[tool.setuptools.package-data]
# Include non-Python files that are part of the package
"nodupe" = ["py.typed", "*.json", "*.toml", "*.md"]
[tool.setuptools.exclude-package-data]
# Exclude directories that should not be treated as packages
"*" = []
[project]
name = "nodupe"
version = "1.0.0"
description = "Advanced duplicate file detection and management system"
authors = [{ name = "NoDupeLabs", email = "your.email@example.com" }]
readme = "README.md"
requires-python = ">=3.9"
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.1",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
]
[project.optional-dependencies]
dev = [
"pytest>=7.0.0",
"pytest-cov>=4.0.0",
"pytest-xdist>=3.0.0",
"hypothesis>=6.0.0",
"mutmut>=2.0.0",
]
[tool.nodupe]
# NoDupeLabs configuration
version = "1.0.0"
description = "Advanced duplicate file detection and management system"
[tool.nodupe.database]
# Database configuration
path = "nodupe.db"
timeout = 30.0
journal_mode = "WAL"
[tool.nodupe.scan]
# Scan configuration
min_file_size = "1KB"
max_file_size = "100MB"
default_extensions = ["jpg", "png", "pdf", "docx", "txt"]
exclude_dirs = [".git", ".venv", "node_modules"]
[tool.nodupe.similarity]
# Similarity configuration
default_backend = "brute_force"
vector_dimensions = 128
search_k = 10
similarity_threshold = 0.85
[tool.nodupe.performance]
# Performance configuration
max_workers = 8
batch_size = 1000
chunk_size = "4MB"
[tool.nodupe.logging]
# Logging configuration
level = "INFO"
file = "nodupe.log"
max_size = "10MB"
backup_count = 5
[tool.pytest.ini_options]
# Test configuration
testpaths = ["tests"]
python_files = "test_*.py"
python_functions = "test_*"
python_classes = "Test*"
addopts = """
--cov=nodupe
--cov-report=term-missing
--cov-report=html:htmlcov
--cov-report=xml:coverage.xml
--cov-fail-under=80
--cov-branch
-v
--tb=short
--durations=20
--color=yes
--junitxml=test_results.xml
"""
markers = [
"slow: marks tests as slow (deselect with '-m \"not slow\"')",
"integration: marks tests as integration tests",
"unit: marks tests as unit tests",
"e2e: marks tests as end-to-end tests",
"performance: marks tests as performance tests",
"stress: marks tests as stress tests",
]
filterwarnings = ["error", "ignore::DeprecationWarning", "ignore::UserWarning"]
[tool.coverage.run]
source = ["nodupe"]
branch = true
parallel = true
omit = [
"*/tests/*",
"*/__init__.py",
"*/conftest.py",
"*/setup.py",
"*/__main__.py",
]
[tool.coverage.report]
precision = 2
show_missing = true
skip_covered = false
exclude_lines = [
"pragma: no cover",
"def __repr__",
"raise NotImplementedError",
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
]
[tool.coverage.html]
directory = "htmlcov"
title = "NoDupeLabs Test Coverage Report"
[tool.pytest-cov]
context = "continuous_integration"
[tool.black]
# Code formatting
line-length = 100
target-version = ['py39']
include = '\.pyi?$'
exclude = '''
/(
\.git
| \.venv
| build
| dist
)/
'''
[tool.isort]
# Import sorting
profile = "black"
line_length = 100
multi_line_output = 3
include_trailing_comma = true
force_grid_wrap = 0
use_parentheses = true
[tool.mypy]
# Type checking
python_version = "3.9"
warn_return_any = true
warn_unused_configs = true
disallow_untyped_defs = true
disallow_incomplete_defs = true
check_untyped_defs = true
[tool.pylint.main]
# Files or directories to be skipped
ignore = ["tests", "node_modules", ".git"]
[tool.pylint.messages_control]
# Disable specific warnings that are impractical to fix
disable = [
"C0301", # line-too-long (handled by black)
"C0303", # trailing-whitespace
"C0321", # multiple-statements
"C0325", # superfluous-parens
"C0201", # consider-iterating-dictionary
"W0212", # protected-access (intentional for decorators)
"W0511", # fixme (TODO comments are acceptable)
"W0611", # unused-import
"W0612", # unused-variable
"W0613", # unused-argument
"W0622", # redefined-builtin
"W0702", # bare-except
"W0707", # raise-missing-from
"W0718", # broad-exception-caught (intentional for graceful degradation)
"W0603", # global-statement (used for module-level state)
"W0404", # reimported
"W1309", # f-string-without-interpolation
"W1514", # unspecified-encoding
"R0902", # too-many-instance-attributes
"R0903", # too-few-public-methods
"R0912", # too-many-branches
"R0913", # too-many-arguments
"R0914", # too-many-locals
"R0915", # too-many-statements
"R0911", # too-many-return-statements
"R1702", # too-many-nested-blocks
"R1705", # no-else-return
"R1723", # no-else-break
"C0415", # import-outside-toplevel (used for optional deps)
"C0413", # wrong-import-position
"C0411", # wrong-import-order (isort handles this)
"W0621", # redefined-outer-name
"W0107", # unnecessary-pass (used in ABC stubs)
"W1203", # logging-fstring-interpolation
"E0401", # import-error (optional deps)
"E0611", # no-name-in-module
"E1101", # no-member
"E1102", # not-callable
"E0602", # undefined-variable (optional deps like cv2)
"W0311", # bad-indentation
"R0801", # duplicate-code
]
[tool.pylint.format]
max-line-length = 120
[tool.pylint.design]
max-args = 10
max-locals = 25
max-branches = 20
max-statements = 75
[tool.mutmut]
# Mutation testing configuration
paths_to_mutate = ["nodupe/core/compression.py"]
runner = "pytest -q"