Add pyproject and pre-commit config
Browse filesIntroduce a `pyproject.toml` with project metadata, runtime dependencies, and Ruff/pyproject-fmt settings, and add a matching `.pre-commit-config.yaml` to enforce basic file checks, pyproject validation, and formatting/linting. Also normalize `.gitignore` with a trailing newline.
Files changed (3)
- .gitignore+2-1
- .pre-commit-config.yamlAdded+28
- pyproject.tomlAdded+33
123# Byte-compiled / optimized / DLL files__pycache__/model/__pycache__/1234# Byte-compiled / optimized / DLL files__pycache__/model/__pycache__/.vscode/settings.json
12345678910111213141516171819202122232425262728# Adapted from DeepLabCut's .pre-commit-config.yaml.repos: - repo: https://github.com/pre-commit/pre-commit-hooks rev: v6.0.0 hooks: - id: check-added-large-files - id: check-yaml - id: check-toml - id: check-merge-conflict - id: end-of-file-fixer - id: trailing-whitespace
- repo: https://github.com/tox-dev/pyproject-fmt rev: v2.19.0 hooks: - id: pyproject-fmt
- repo: https://github.com/abravalheri/validate-pyproject rev: v0.25 hooks: - id: validate-pyproject
- repo: https://github.com/astral-sh/ruff-pre-commit rev: v0.15.6 hooks: - id: ruff-check args: [--fix, --unsafe-fixes] - id: ruff-format123456789101112131415161718192021222324252627282930313233[project]name = "deeplabcut-modelzoo-superanimals"version = "0.1.0"description = "Gradio Space for the DeepLabCut Model Zoo SuperAnimal models"readme = "README.md"requires-python = ">=3.12,<3.13"classifiers = [ "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: 3.12",]# Hugging Face Spaces install from requirements.txt only: keep both lists in sync.dependencies = [ "deeplabcut[modelzoo,tf]==3.0.2", "deeplabcut-live", "dlclibrary", "gitpython>=3.1.30", "gradio", "humanfriendly", "psutil", "ruamel-yaml==0.17.21", "seaborn", "ultralytics",]
[tool.ruff]target-version = "py312"line-length = 120format.docstring-code-format = truelint.select = [ "B", "E", "F", "I", "PIE", "UP" ]lint.ignore = [ "B007", "E741" ]
[tool.pyproject-fmt]max_supported_python = "3.12".gitignore+2-1
.pre-commit-config.yamlAdded+28
pyproject.tomlAdded+33