Thank you for your interest in contributing to nprime! This guide will help you set up your development environment and understand the contribution process.
This project uses uv for dependency management and development workflows.
- Python 3.9 or higher
- Git
- uv (Python package manager)
-
Install uv if you haven't already:
curl -LsSf https://astral.sh/uv/install.sh | sh -
Clone the repository:
git clone https://github.com/Sylhare/nprime.git cd nprime -
Set up the development environment:
uv sync --extra dev --extra test --extra coverage
# Run all tests
uv run pytest
# Run specific test file
uv run pytest tests/test_pyprime.py
# Run with verbose output
uv run pytest -v
# Run tests matching a pattern
uv run pytest -k "test_prime"# Generate coverage report
uv run pytest --cov=nprime.pyprime --cov-report=term-missing
# Generate HTML coverage report
uv run pytest --cov=nprime.pyprime --cov-report=html
# View coverage report (HTML)
open htmlcov/index.html # macOS
start htmlcov/index.html # Windows