Skip to content

Commit 6095f3a

Browse files
committed
scaffolding
0 parents  commit 6095f3a

11 files changed

Lines changed: 4038 additions & 0 deletions

.gitignore

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# Python
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
*.so
6+
.Python
7+
build/
8+
develop-eggs/
9+
dist/
10+
downloads/
11+
eggs/
12+
.eggs/
13+
lib/
14+
lib64/
15+
parts/
16+
sdist/
17+
var/
18+
wheels/
19+
*.egg-info/
20+
.installed.cfg
21+
*.egg
22+
MANIFEST
23+
24+
# Virtual environments
25+
venv/
26+
env/
27+
ENV/
28+
.venv
29+
30+
# IDE
31+
.vscode/
32+
.idea/
33+
*.swp
34+
*.swo
35+
36+
# Testing and tooling caches
37+
.pytest_cache/
38+
.coverage
39+
htmlcov/
40+
.tox/
41+
.mypy_cache/
42+
.ruff_cache/
43+
.pre-commit-cache/
44+
45+
# Environment
46+
.env
47+
.env.local
48+
49+
# OS
50+
.DS_Store
51+
Thumbs.db
52+
53+
# Runtime traces and artifacts
54+
traces/
55+
artifacts/
56+
tmp/
57+
temp/

.markdownlint.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
default: false
2+
3+
# Keep this lightweight and non-disruptive for design-heavy docs.
4+
# Enable only the most universal, low-noise rule.
5+
MD010: true

.pre-commit-config.yaml

Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
# Pre-commit hooks for AgentIdentity repository
2+
# Baseline adapted from /Code/Sentience/sdk-python/.pre-commit-config.yaml
3+
4+
repos:
5+
# General file checks
6+
- repo: https://github.com/pre-commit/pre-commit-hooks
7+
rev: v4.5.0
8+
hooks:
9+
- id: trailing-whitespace
10+
- id: end-of-file-fixer
11+
- id: check-yaml
12+
- id: check-json
13+
- id: check-added-large-files
14+
args: ["--maxkb=1000"]
15+
- id: check-merge-conflict
16+
- id: check-case-conflict
17+
- id: detect-private-key
18+
- id: debug-statements
19+
- id: mixed-line-ending
20+
args: ["--fix=lf"]
21+
22+
# Python code formatting with Black
23+
- repo: https://github.com/psf/black
24+
rev: 24.2.0
25+
hooks:
26+
- id: black
27+
language_version: python3.11
28+
args: ["--line-length=100"]
29+
exclude: ^(venv/|\.venv/|build/|dist/)
30+
31+
# Import sorting with isort (compatible with Black)
32+
- repo: https://github.com/pycqa/isort
33+
rev: 5.13.2
34+
hooks:
35+
- id: isort
36+
args: ["--profile=black", "--line-length=100"]
37+
exclude: ^(venv/|\.venv/|build/|dist/)
38+
39+
# Flake8 for style guide enforcement
40+
- repo: https://github.com/pycqa/flake8
41+
rev: 7.0.0
42+
hooks:
43+
- id: flake8
44+
args:
45+
- "--max-line-length=100"
46+
- "--extend-ignore=E203,W503,E501" # Black compatibility
47+
- "--exclude=venv,build,dist,.eggs,*.egg"
48+
- "--max-complexity=15"
49+
exclude: ^(venv/|\.venv/|build/|dist/)
50+
51+
# Type checking with mypy
52+
- repo: https://github.com/pre-commit/mirrors-mypy
53+
rev: v1.8.0
54+
hooks:
55+
- id: mypy
56+
additional_dependencies:
57+
- pydantic>=2.0
58+
- types-requests
59+
args:
60+
- "--ignore-missing-imports"
61+
- "--no-strict-optional"
62+
- "--warn-unused-ignores"
63+
exclude: ^(tests/|examples/|venv/|\.venv/|build/|dist/)
64+
65+
# Security checks
66+
- repo: https://github.com/PyCQA/bandit
67+
rev: 1.7.7
68+
hooks:
69+
- id: bandit
70+
args: ["-c", "pyproject.toml"]
71+
additional_dependencies: ["bandit[toml]"]
72+
exclude: ^(tests/|venv/|\.venv/)
73+
74+
# Check for common Python anti-patterns
75+
- repo: https://github.com/asottile/pyupgrade
76+
rev: v3.15.0
77+
hooks:
78+
- id: pyupgrade
79+
args: ["--py311-plus"]
80+
exclude: ^(venv/|\.venv/|build/|dist/)
81+
82+
# Markdown linting for docs-heavy workflows
83+
- repo: https://github.com/DavidAnson/markdownlint-cli2
84+
rev: v0.14.0
85+
hooks:
86+
- id: markdownlint-cli2
87+
args: ["--config", ".markdownlint.yaml"]
88+
files: \.md$
89+
90+
default_language_version:
91+
python: python3.11
92+
93+
fail_fast: false
94+
95+
exclude: |
96+
(?x)^(
97+
venv/.*|
98+
\.venv/.*|
99+
build/.*|
100+
dist/.*|
101+
\.eggs/.*|
102+
.*\.egg-info/.*|
103+
__pycache__/.*|
104+
\.pytest_cache/.*|
105+
\.mypy_cache/.*|
106+
\.ruff_cache/.*|
107+
\.pre-commit-cache/.*
108+
)$

Makefile

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
.PHONY: hooks lint format format-python format-docs lint-docs
2+
3+
hooks:
4+
pre-commit install
5+
6+
lint:
7+
pre-commit run --all-files
8+
9+
format: format-python format-docs
10+
11+
format-python:
12+
pre-commit run black --all-files
13+
pre-commit run isort --all-files
14+
pre-commit run pyupgrade --all-files
15+
16+
format-docs:
17+
pre-commit run trailing-whitespace --all-files
18+
pre-commit run end-of-file-fixer --all-files
19+
pre-commit run mixed-line-ending --all-files
20+
21+
lint-docs:
22+
pre-commit run markdownlint-cli2

0 commit comments

Comments
 (0)