mirror of
https://github.com/yakhyo/uniface.git
synced 2025-12-30 00:52:25 +00:00
* refactor: Standardize naming conventions * chore: Update the version and re-run experiments * chore: Improve code quality tooling and documentation - Add pre-commit job to CI workflow for automated linting on PRs - Update uniface/__init__.py with copyright header, module docstring, and logically grouped exports - Revise CONTRIBUTING.md to reflect pre-commit handles all formatting - Remove redundant ruff check from CI (now handled by pre-commit) - Update build job Python version to 3.11 (matches requires-python)
149 lines
3.8 KiB
TOML
149 lines
3.8 KiB
TOML
[project]
|
|
name = "uniface"
|
|
version = "2.0.0"
|
|
description = "UniFace: A Comprehensive Library for Face Detection, Recognition, Landmark Analysis, Face Parsing, Gaze Estimation, Age, and Gender Detection"
|
|
readme = "README.md"
|
|
license = { text = "MIT" }
|
|
authors = [{ name = "Yakhyokhuja Valikhujaev", email = "yakhyo9696@gmail.com" }]
|
|
maintainers = [
|
|
{ name = "Yakhyokhuja Valikhujaev", email = "yakhyo9696@gmail.com" },
|
|
]
|
|
|
|
requires-python = ">=3.11,<3.14"
|
|
keywords = [
|
|
"face-detection",
|
|
"face-recognition",
|
|
"facial-landmarks",
|
|
"face-parsing",
|
|
"face-segmentation",
|
|
"gaze-estimation",
|
|
"age-detection",
|
|
"gender-detection",
|
|
"computer-vision",
|
|
"deep-learning",
|
|
"onnx",
|
|
"onnxruntime",
|
|
"face-analysis",
|
|
"bisenet",
|
|
]
|
|
|
|
classifiers = [
|
|
"Development Status :: 4 - Beta",
|
|
"Intended Audience :: Developers",
|
|
"Intended Audience :: Science/Research",
|
|
"License :: OSI Approved :: MIT License",
|
|
"Operating System :: OS Independent",
|
|
"Programming Language :: Python :: 3",
|
|
"Programming Language :: Python :: 3.11",
|
|
"Programming Language :: Python :: 3.12",
|
|
"Programming Language :: Python :: 3.13",
|
|
]
|
|
|
|
dependencies = [
|
|
"numpy>=1.21.0",
|
|
"opencv-python>=4.5.0",
|
|
"onnx>=1.12.0",
|
|
"onnxruntime>=1.16.0",
|
|
"scikit-image>=0.19.0",
|
|
"requests>=2.28.0",
|
|
"tqdm>=4.64.0",
|
|
]
|
|
|
|
[project.optional-dependencies]
|
|
dev = ["pytest>=7.0.0", "ruff>=0.4.0"]
|
|
gpu = ["onnxruntime-gpu>=1.16.0"]
|
|
|
|
[project.urls]
|
|
Homepage = "https://github.com/yakhyo/uniface"
|
|
Repository = "https://github.com/yakhyo/uniface"
|
|
Documentation = "https://github.com/yakhyo/uniface/blob/main/README.md"
|
|
"Quick Start" = "https://github.com/yakhyo/uniface/blob/main/QUICKSTART.md"
|
|
"Model Zoo" = "https://github.com/yakhyo/uniface/blob/main/MODELS.md"
|
|
|
|
[build-system]
|
|
requires = ["setuptools>=64", "wheel"]
|
|
build-backend = "setuptools.build_meta"
|
|
|
|
[tool.setuptools]
|
|
packages = { find = { where = ["."], include = ["uniface*"] } }
|
|
|
|
[tool.setuptools.package-data]
|
|
uniface = ["py.typed"]
|
|
|
|
[tool.ruff]
|
|
line-length = 120
|
|
target-version = "py311"
|
|
exclude = [
|
|
".git",
|
|
".ruff_cache",
|
|
"__pycache__",
|
|
"build",
|
|
"dist",
|
|
"*.egg-info",
|
|
".venv",
|
|
"venv",
|
|
".pytest_cache",
|
|
".mypy_cache",
|
|
"*.ipynb",
|
|
]
|
|
|
|
[tool.ruff.format]
|
|
quote-style = "single"
|
|
docstring-code-format = true
|
|
|
|
[tool.ruff.lint]
|
|
select = [
|
|
"E", # pycodestyle errors
|
|
"F", # pyflakes
|
|
"I", # isort
|
|
"W", # pycodestyle warnings
|
|
"UP", # pyupgrade (modern Python syntax)
|
|
"B", # flake8-bugbear
|
|
"C4", # flake8-comprehensions
|
|
"SIM", # flake8-simplify
|
|
"RUF", # Ruff-specific rules
|
|
]
|
|
ignore = [
|
|
"E501", # Line too long (handled by formatter)
|
|
"B008", # Function call in default argument (common in FastAPI/Click)
|
|
"SIM108", # Use ternary operator (can reduce readability)
|
|
"RUF022", # Allow logical grouping in __all__ instead of alphabetical sorting
|
|
]
|
|
|
|
[tool.ruff.lint.flake8-quotes]
|
|
docstring-quotes = "double"
|
|
|
|
[tool.ruff.lint.isort]
|
|
force-single-line = false
|
|
force-sort-within-sections = true
|
|
known-first-party = ["uniface"]
|
|
section-order = [
|
|
"future",
|
|
"standard-library",
|
|
"third-party",
|
|
"first-party",
|
|
"local-folder",
|
|
]
|
|
|
|
[tool.ruff.lint.pydocstyle]
|
|
convention = "google"
|
|
|
|
[tool.mypy]
|
|
python_version = "3.11"
|
|
warn_return_any = false
|
|
warn_unused_ignores = true
|
|
ignore_missing_imports = true
|
|
exclude = ["tests/", "scripts/", "examples/"]
|
|
# Disable strict return type checking for numpy operations
|
|
disable_error_code = ["no-any-return"]
|
|
|
|
[tool.bandit]
|
|
exclude_dirs = ["tests", "scripts", "examples"]
|
|
skips = ["B101", "B614"] # B101: assert, B614: torch.jit.load (models are SHA256 verified)
|
|
|
|
[tool.pytest.ini_options]
|
|
testpaths = ["tests"]
|
|
python_files = ["test_*.py"]
|
|
python_functions = ["test_*"]
|
|
addopts = "-v --tb=short"
|