Contributing

We welcome contributions to pyNavalToolbox! This document provides guidelines for contributing to the project.

Development Setup

  1. Fork the repository on GitHub

  2. Clone your fork locally:

    git clone https://github.com/NavalToolbox/pynavaltoolbox.git
    cd pyNavalToolbox
    
  3. Install development dependencies:

    pip install -e ".[dev]"
    

Code Standards

We follow PEP 8 style guide for Python code. Please ensure your code passes all linting checks:

make lint

Or using Docker:

make docker-lint

Testing

All code changes should include appropriate tests. We use unittest framework:

# Run tests locally
make test

# Run tests in Docker
make docker-test

# Run specific test file
python -m pytest tests/test_helloworld.py

Documentation

We use Sphinx with NumPy-style docstrings. Please document all public APIs:

  • Use NumPy-style docstrings for all functions and classes

  • Include examples in docstrings where appropriate

  • Build documentation to verify it renders correctly:

    # Build docs locally
    make docs
    
    # Build docs in Docker
    make docker-docs
    

Pull Request Process

  1. Create a new branch for your feature:

    git checkout -b feature/your-feature-name
    
  2. Make your changes and commit:

    git add .
    git commit -m "Description of your changes"
    
  3. Run all checks:

    make lint
    make test
    make docs
    
  4. Push to your fork:

    git push origin feature/your-feature-name
    
  5. Open a Pull Request on GitHub

Code Review

  • All submissions require review

  • We may suggest changes or improvements

  • Once approved, a maintainer will merge your PR

Questions?

If you have questions, please open an issue on GitHub.