Skip to content

Commit 8c51d49

Browse files
committed
feat: enhance project configuration with linting and formatting tools and add badges in README
1 parent 961e4a6 commit 8c51d49

3 files changed

Lines changed: 42 additions & 3 deletions

File tree

.github/workflows/tests.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,3 @@ jobs:
4040
uses: codecov/codecov-action@v5
4141
with:
4242
token: ${{ secrets.CODECOV_TOKEN }}
43-

README.md

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,16 @@
22

33
A lightweight CLI to estimate hardware requirements and quantization compatibility for Hugging Face models.
44

5-
[![PyPI version](https://badge.fury.io/py/canirun.svg)](https://badge.fury.io/py/canirun)
5+
[![codecov](https://codecov.io/github/PythonicVarun/canirun/branch/master/graph/badge.svg?token=FHPEETQPA7)](https://codecov.io/github/PythonicVarun/canirun)
6+
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/canirun)](https://pypi.org/project/canirun)
7+
[![PyPI - Version](https://img.shields.io/pypi/v/canirun)
8+
](https://pypi.org/project/canirun)
69
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
10+
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
11+
[![Linting: Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
12+
13+
> [!NOTE]
14+
> Currently optimized for standard Transformer architectures (Llama, Mistral, Gemma, BERT). MoE and custom architectures may have experimental support.
715
816
## Key Features
917

@@ -39,7 +47,7 @@ canirun meta-llama/Meta-Llama-3-8B --ctx 4096
3947
This will produce a report like this:
4048

4149
```
42-
🔍 ANALYSIS REPORT: meta-llama/Meta-Llama-3-8B
50+
🔍 ANALYSIS REPORT: meta-llama/Meta-Llama-3-8B
4351
Context Length : 4096
4452
Device : NVIDIA GeForce RTX 3090
4553
VRAM / RAM : 24.0 GB / 64.0 GB
@@ -91,6 +99,20 @@ else:
9199

92100
The tool checks for different levels of quantization to see if a smaller, quantized version of the model could fit.
93101

102+
## Development
103+
104+
This project maintains strict code quality standards:
105+
106+
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
107+
[![Linting: Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
108+
[![Checked with mypy](https://www.mypy-lang.org/static/mypy_badge.svg)](https://mypy-lang.org/)
109+
[![Imports: isort](https://img.shields.io/badge/%20imports-isort-%231674b1?style=flat&labelColor=ef8336)](https://pycqa.github.io/isort/)
110+
111+
- **Formatter**: Black
112+
- **Linter**: Ruff
113+
- **Type Checking**: MyPy (Strict)
114+
- **Docstrings**: Google Style
115+
94116
## License
95117

96118
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

pyproject.toml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,21 @@ canirun = "canirun.cli:main"
4242
[build-system]
4343
requires = ["setuptools~=80.9.0"]
4444
build-backend = "setuptools.build_meta"
45+
46+
[tool.black]
47+
line-length = 88
48+
target-version = ['py310']
49+
50+
[tool.isort]
51+
profile = "black"
52+
53+
[tool.ruff]
54+
line-length = 88
55+
target-version = "py310"
56+
57+
[tool.ruff.lint]
58+
select = ["E", "F", "I", "B"]
59+
ignore = ["E501"]
60+
61+
[tool.ruff.lint.pydocstyle]
62+
convention = "google"

0 commit comments

Comments
 (0)