e518bce922
Resolve all merge conflicts between our automation feature branch and current main (v0.163.0, 920 commits ahead). Conflicts resolved: - app/api/__init__.py: add automation_router alongside main's new routers (classification_rules, qr_auth, sessions, system_reset) - app/config.py: add main's new settings (dropbox_use_global_credentials, factory_reset_on_startup, enable_factory_reset) - app/models.py: add main's new models (ClassificationRuleModel, UserSession, QRLoginChallenge, SharePoint integration type) - app/utils/settings_service.py: merge automation_hooks_enabled with main's new metadata entries - docs/API.md: merge automation API docs with main's classification rules docs - docs/ConfigurationGuide.md: add factory reset settings - tests/conftest.py: import both AutomationHook and new main models Migration renumbered: - 037_add_automation_hooks → 040_add_automation_hooks - down_revision: 039_add_classification_rules (was 036_add_document_translation_fields) - Chain: 036 → 037 → 038 → 039 → 040 (automation hooks) For all non-automation files with conflicts, main's version was taken since our branch did not modify those files (conflicts were from a stale prior merge). Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com> Agent-Logs-Url: https://github.com/christianlouis/DocuElevate/sessions/cb62f012-3b69-4415-835e-3857ce3e9f45
68 lines
1.8 KiB
YAML
68 lines
1.8 KiB
YAML
# Pre-commit hooks for code quality and security
|
|
# Install: pip install pre-commit
|
|
# Setup: pre-commit install
|
|
# Run manually: pre-commit run --all-files
|
|
|
|
repos:
|
|
# General file checks
|
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
rev: v4.5.0
|
|
hooks:
|
|
- id: trailing-whitespace
|
|
- id: end-of-file-fixer
|
|
- id: check-yaml
|
|
- id: check-json
|
|
- id: check-added-large-files
|
|
args: ['--maxkb=1000']
|
|
- id: check-merge-conflict
|
|
- id: detect-private-key
|
|
- id: detect-aws-credentials
|
|
args: ['--allow-missing-credentials']
|
|
|
|
# Ruff - Fast Python linter and formatter (replaces Black, Flake8, isort, Bandit)
|
|
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
rev: v0.3.0
|
|
hooks:
|
|
- id: ruff
|
|
args: [ --fix ]
|
|
- id: ruff-format
|
|
|
|
# Type checking
|
|
- repo: https://github.com/pre-commit/mirrors-mypy
|
|
rev: v1.8.0
|
|
hooks:
|
|
- id: mypy
|
|
args: ['--ignore-missing-imports']
|
|
additional_dependencies: ['types-requests']
|
|
|
|
# Secret detection
|
|
- repo: https://github.com/Yelp/detect-secrets
|
|
rev: v1.4.0
|
|
hooks:
|
|
- id: detect-secrets
|
|
args: ['--baseline', '.secrets.baseline']
|
|
exclude: |
|
|
(?x)^(
|
|
.+\.lock|
|
|
.+\.json|
|
|
.env.demo
|
|
)$
|
|
|
|
# Alembic migration chain validation
|
|
- repo: local
|
|
hooks:
|
|
- id: check-alembic-migrations
|
|
name: Check Alembic migration chain
|
|
entry: python scripts/check_alembic_migrations.py
|
|
language: python
|
|
pass_filenames: false
|
|
files: ^migrations/versions/.*\.py$
|
|
|
|
# Conventional commits validation
|
|
- repo: https://github.com/compilerla/conventional-pre-commit
|
|
rev: v3.0.0
|
|
hooks:
|
|
- id: conventional-pre-commit
|
|
stages: [commit-msg]
|
|
args: []
|