Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.11", "3.12"]
python-version: ["3.9", "3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v4
- name: Install uv
Expand All @@ -24,3 +24,19 @@ jobs:
run: uv run --no-sync ruff check src benchmarks
- name: Test
run: uv run --no-sync pytest -q

security:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
python-version: "3.12"
- name: Install deps
run: uv pip install -e ".[dev]"
- name: Run pip-audit
uses: pypa/gh-action-pip-audit@v1.1.0
with:
requirements: pyproject.toml

23 changes: 23 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.6.0
hooks:
# Run the linter.
- id: ruff
args: [--fix]
# Run the formatter.
- id: ruff-format
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
# Checks for trailing whitespace.
- id: trailing-whitespace
# Checks that files end with a newline.
- id: end-of-file-fixer
# Checks for files that would conflict with git's case-insensitive file system.
- id: check-case-conflict
# Checks for added large files.
- id: check-added-large-files
77 changes: 77 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
# Contributing to dynavec

Welcome! We're glad you're interested in contributing to dynavec.

## Getting Started

1. **Fork the repository** on GitHub
2. **Clone your fork** locally
3. **Install dependencies**:
```bash
pip install -e ".[dev]"
```
4. **Install pre-commit hooks**:
```bash
pre-commit install
```

## Development Workflow

### Code Style

We use [Ruff](https://github.com/astral-sh/ruff) for linting and formatting:

```bash
# Run ruff linter
ruff check .

# Run ruff formatter
ruff format .
```

### Pre-commit Hooks

This project uses pre-commit hooks to ensure code quality:

- `ruff` - Linting with automatic fixes
- `ruff-format` - Code formatting
- `trailing-whitespace` - Removes trailing whitespace
- `end-of-file-fixer` - Ensures files end with a newline
- `check-case-conflict` - Checks for case conflicts
- `check-added-large-files` - Prevents adding large files

Install hooks with:
```bash
pre-commit install
```

Run hooks manually:
```bash
pre-commit run --all-files
```

### Running Tests

```bash
# Run all tests
pytest

# Run with coverage
pytest --cov=dynavec --cov-report=term-missing
```

### Submitting Changes

1. Create a new branch for your changes
2. Make your changes and commit them
3. Ensure pre-commit hooks pass
4. Push to your fork and open a Pull Request
5. Reference the issue number in your PR description

## Good First Issues

Looking for a place to start? Check out issues labeled [good first issue](https://github.com/codeforstartups/dynavec/labels/good%20first%20issue).

## Questions?

Feel free to open an issue for any questions or discussions.