Skip to content

Commit 239f347

Browse files
committed
chore: add community health files, CI, and project scaffolding
Add CONTRIBUTING.md, CODE_OF_CONDUCT.md, SECURITY.md, CHANGELOG.md, issue templates, PR template, GitHub Actions lint workflow, and .editorconfig.
1 parent e58598c commit 239f347

9 files changed

Lines changed: 235 additions & 0 deletions

File tree

.editorconfig

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
root = true
2+
3+
[*]
4+
indent_style = space
5+
indent_size = 4
6+
end_of_line = lf
7+
charset = utf-8
8+
trim_trailing_whitespace = true
9+
insert_final_newline = true
10+
11+
[*.md]
12+
trim_trailing_whitespace = false
13+
14+
[*.yml]
15+
indent_size = 2
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
---
2+
name: Bug Report
3+
about: Report a bug to help us improve
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
---
8+
9+
### Describe the bug
10+
11+
A clear description of what the bug is.
12+
13+
### To Reproduce
14+
15+
Steps to reproduce the behavior:
16+
17+
1. Run `ollama-benchmark ...`
18+
2. See error
19+
20+
### Expected behavior
21+
22+
What you expected to happen.
23+
24+
### Environment
25+
26+
- **OS**: [e.g., Ubuntu 22.04, macOS 14, Windows 11]
27+
- **Python version**: [e.g., 3.11.5]
28+
- **Ollama version**: [e.g., 0.1.29]
29+
- **GPU**: [e.g., RTX 3090, M2 Max]
30+
- **Installation method**: [pip / source]
31+
32+
### Additional context
33+
34+
Any other context, error messages, or screenshots.
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
name: Feature Request
3+
about: Suggest a new feature or improvement
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
---
8+
9+
### Problem
10+
11+
What problem does this feature solve? Describe the use case.
12+
13+
### Proposed Solution
14+
15+
How would you like this to work?
16+
17+
### Alternatives Considered
18+
19+
Any other approaches you've thought about.
20+
21+
### Additional Context
22+
23+
Any other context, screenshots, or examples.

.github/pull_request_template.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
## What
2+
3+
Brief description of the changes.
4+
5+
## Why
6+
7+
Why is this change needed? Link to related issue if applicable.
8+
9+
## How
10+
11+
How does this change work? Any notable implementation details.
12+
13+
## Checklist
14+
15+
- [ ] Code runs locally without errors
16+
- [ ] Changes are tested with at least one Ollama model
17+
- [ ] Commit messages follow conventional format (`fix:`, `feat:`, `docs:`)

.github/workflows/lint.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Lint
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
lint:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
15+
- name: Set up Python
16+
uses: actions/setup-python@v5
17+
with:
18+
python-version: '3.11'
19+
20+
- name: Install dependencies
21+
run: |
22+
pip install -e .
23+
pip install ruff
24+
25+
- name: Run ruff
26+
run: ruff check .

CHANGELOG.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7+
8+
## [0.1.0] - 2025-02-16
9+
10+
### Added
11+
- Initial release
12+
- Benchmark tool for measuring Ollama LLM performance
13+
- Support for prompt processing speed, generation speed, and combined throughput
14+
- Verbose mode with streaming output
15+
- Multi-model benchmarking
16+
- Custom prompt support
17+
- Table comparison output (`--table_output`)
18+
- Pydantic-based response parsing

CODE_OF_CONDUCT.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
We as members, contributors, and leaders pledge to make participation in our
6+
community a harassment-free experience for everyone, regardless of age, body
7+
size, visible or invisible disability, ethnicity, sex characteristics, gender
8+
identity and expression, level of experience, education, socio-economic status,
9+
nationality, personal appearance, race, religion, or sexual identity
10+
and orientation.
11+
12+
## Our Standards
13+
14+
Examples of behavior that contributes to a positive environment:
15+
16+
* Using welcoming and inclusive language
17+
* Being respectful of differing viewpoints and experiences
18+
* Gracefully accepting constructive criticism
19+
* Focusing on what is best for the community
20+
* Showing empathy towards other community members
21+
22+
Examples of unacceptable behavior:
23+
24+
* The use of sexualized language or imagery and unwelcome sexual attention
25+
* Trolling, insulting/derogatory comments, and personal or political attacks
26+
* Public or private harassment
27+
* Publishing others' private information without explicit permission
28+
* Other conduct which could reasonably be considered inappropriate
29+
30+
## Enforcement
31+
32+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
33+
reported by opening an issue or contacting the maintainers directly.
34+
35+
## Attribution
36+
37+
This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org),
38+
version 2.1, available at
39+
[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html](https://www.contributor-covenant.org/version/2/1/code_of_conduct.html).

CONTRIBUTING.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Contributing to Ollama Benchmark
2+
3+
Thanks for your interest in contributing! Here's how to get started.
4+
5+
## Getting Started
6+
7+
1. Fork the repo and clone your fork
8+
2. Create a virtual environment: `python3 -m venv venv && source venv/bin/activate`
9+
3. Install in editable mode: `pip install -e .`
10+
4. Create a branch: `git checkout -b my-feature`
11+
12+
## Development
13+
14+
### Running the tool locally
15+
16+
```bash
17+
ollama serve # make sure Ollama is running
18+
python benchmark.py --verbose --models <your-model>
19+
```
20+
21+
### Code Style
22+
23+
- Follow PEP 8
24+
- Use type hints where practical
25+
- Keep functions focused and well-documented
26+
27+
## Submitting Changes
28+
29+
1. Make sure your changes work locally
30+
2. Write a clear commit message (e.g., `fix: guard against zero division`, `docs: add usage example`)
31+
3. Open a Pull Request with a brief description of what and why
32+
33+
## Reporting Bugs
34+
35+
Open an issue using the **Bug Report** template. Include:
36+
- What you expected to happen
37+
- What actually happened
38+
- Your environment (OS, Python version, Ollama version, GPU)
39+
40+
## Feature Requests
41+
42+
Open an issue using the **Feature Request** template. Describe the use case and, if possible, sketch a proposed approach.
43+
44+
## Questions?
45+
46+
Open a Discussion or reach out in an issue. We're happy to help.

SECURITY.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Security Policy
2+
3+
## Supported Versions
4+
5+
| Version | Supported |
6+
|---------|-----------|
7+
| 0.1.x | Yes |
8+
9+
## Reporting a Vulnerability
10+
11+
If you discover a security vulnerability, please report it responsibly:
12+
13+
1. **Do not** open a public issue
14+
2. Email the maintainer directly or use GitHub's private vulnerability reporting
15+
3. Include a description of the vulnerability and steps to reproduce
16+
17+
We will acknowledge your report within 48 hours and work on a fix promptly.

0 commit comments

Comments
 (0)