Skip to content

Latest commit

 

History

History
185 lines (123 loc) · 3.65 KB

File metadata and controls

185 lines (123 loc) · 3.65 KB

Contributing to PyFastL2LiR

Thank you for your interest in contributing to PyFastL2LiR! This document provides guidelines and instructions for contributing to the project.

Table of Contents

Getting Started

Prerequisites

Development Setup

  1. Fork and clone the repository

    git clone https://github.com/<USERNAME>/PyFastL2LiR.git
    cd PyFastL2LiR
  2. Create a virtual environment and install dependencies

    uv sync

    This will install the package in editable mode along with all development dependencies.

Making Changes

  1. Create a new branch for your changes

    git checkout -b feature/your-feature-name

    Use descriptive branch names:

    • feature/ for new features
    • fix/ for bug fixes
    • docs/ for documentation changes
    • refactor/ for code refactoring
  2. Make your changes

    • Write clear, concise commit messages
    • Keep commits focused and atomic
    • Update documentation as needed

Testing

We use pytest for testing. All tests should pass before submitting a pull request.

Running Tests

Run all tests:

pytest

Run tests with coverage:

pytest --cov=fastl2lir --cov-report=term-missing

Run specific tests:

pytest tests/test_specific_module.py

Writing Tests

  • Place tests in the tests/ directory
  • Name test files with the test_ prefix
  • Name test functions with the test_ prefix
  • Aim for high test coverage, especially for new features
  • Include both unit tests and integration tests where appropriate

Code Style

We use Ruff for linting and code formatting.

Running Ruff

Check for linting issues:

ruff check .

Automatically fix issues:

ruff check --fix .

Format code:

ruff format .

Before Committing

Make sure your code passes both linting and formatting checks:

ruff check . && ruff format --check .

Submitting Changes

  1. Ensure all tests pass

    pytest
  2. Ensure code passes linting

    ruff check .
    ruff format --check .
  3. Commit your changes

    git add .
    git commit -m "[tag] Brief description of your changes"

    Write clear commit messages following these guidelines:

    • Use the imperative mood ("Add feature" not "Added feature")
    • Provide additional details in the body if needed
  4. Push to your fork

    git push origin feature/your-feature-name
  5. Create a Pull Request

    • Go to the original repository on GitHub
    • Click "New Pull Request"
    • Select your fork and branch
    • Provide a clear description of your changes
    • Reference any related issues

Pull Request Guidelines

  • Provide a clear description of the problem and solution
  • Include relevant issue numbers (e.g., "Fixes #123")
  • Ensure CI checks pass
  • Respond to review comments promptly
  • Keep pull requests focused on a single feature or fix

Code Review Process

  • Maintainers will review your pull request
  • Address any requested changes
  • Once approved, your changes will be merged

Questions?

If you have questions or need help, feel free to:

  • Open an issue on GitHub
  • Reach out to the maintainers

License

By contributing to PyFastL2LiR, you agree that your contributions will be licensed under the same license as the project.

Thank you for contributing!