Skip to content

Commit 3903b42

Browse files
committed
Add code check version in config
1 parent c28d083 commit 3903b42

3 files changed

Lines changed: 57 additions & 3 deletions

File tree

.pre-commit-config.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ repos:
33
rev: 23.9.1
44
hooks:
55
- id: black
6+
# Use pyproject.toml for configuration (ensures consistency)
7+
args: ['--config', 'pyproject.toml']
68
- repo: https://github.com/pycqa/flake8
79
rev: 6.1.0
810
hooks:

pyproject.toml

Lines changed: 33 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,38 @@ name = "infinimetrics"
77
version = "0.1.0"
88
description = "An InfiniTensor-featured comprehensive accelerator evaluation framework"
99
dependencies = [
10-
10+
1111
]
1212

13-
[tool.setuptools.packages.find]
14-
where = ["src"]
13+
[tool.black]
14+
target-version = ['py310']
15+
line-length = 88
16+
exclude = '''
17+
/(
18+
\.git
19+
| \.hg
20+
| \.mypy_cache
21+
| \.tox
22+
| \.venv
23+
| _build
24+
| buck-out
25+
| build
26+
| dist
27+
| __pycache__
28+
)/
29+
'''
30+
31+
[tool.flake8]
32+
python-version = '3.10'
33+
max-line-length = 127
34+
select = ['E9', 'F63', 'F7', 'F82']
35+
extend-ignore = ['E203', 'W503']
36+
exclude = ['.git', '__pycache__', '.venv', 'venv', 'build', 'dist', '*.egg-info']
37+
show-source = true
38+
statistics = true
39+
40+
[tool.pytest.ini_options]
41+
testpaths = ["tests"]
42+
python_files = ["test_*.py"]
43+
python_classes = ["Test*"]
44+
python_functions = ["test_*"]

requirements-dev.txt

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Development dependencies for InfiniMetrics
2+
# Install with: pip install -r requirements-dev.txt
3+
4+
# ============================================================
5+
# Code Quality Tools (exact versions for consistency)
6+
# ============================================================
7+
black==23.9.1 # Code formatter
8+
flake8==7.3.0 # Linter (syntax and style checker)
9+
pre-commit==3.6.0 # Pre-commit hooks framework
10+
11+
# ============================================================
12+
# Testing Tools (for future use)
13+
# ============================================================
14+
pytest>=7.0.0 # Testing framework
15+
pytest-cov>=4.0.0 # Coverage plugin
16+
pytest-mock>=3.10.0 # Mock support
17+
18+
# ============================================================
19+
# Type Checking (optional but recommended)
20+
# ============================================================
21+
mypy>=1.0.0 # Static type checker
22+
types-setuptools # Type stubs for setuptools

0 commit comments

Comments
 (0)