Contributing to PyCauset
Thank you for your interest in contributing to PyCauset! We welcome contributions from the community, whether it's fixing bugs, adding new features, or improving documentation.
Before you start, read the project protocols:
Getting Started
Prerequisites
To build PyCauset from source, you will need:
- Python 3.8+
- C++ Compiler:
- Windows: Visual Studio 2022 (Desktop development with C++)
- Linux: GCC or Clang
- macOS: Xcode Command Line Tools
- CMake 3.15+
- CUDA Toolkit (Optional, for GPU support)
Setting Up the Development Environment
-
Clone the Repository:
-
Create a Virtual Environment:
-
Install from source (this builds the native extension via
scikit-build-core):
Building the Project
We provide helper scripts to simplify the build process.
Windows
# Build Python extension and run tests
./build.ps1 -All
# Only build Python extension
./build.ps1 -Python
Linux/macOS
Recommended workflow:
Running Tests
PyCauset has a comprehensive test suite covering both the C++ core and the Python interface.
Python Tests
C++ Unit Tests
If you built with CMake, you can run C++ tests via CTest from your build directory.
Coding Standards
C++
- Use C++17 features.
- Follow standard RAII principles.
- Use
pybind11for Python bindings. - Keep headers in
include/and implementation insrc/.
Python
- Follow PEP 8.
- Use type hints.
- Document all public functions and classes using Google-style docstrings.
Documentation
Documentation is written in Markdown and built with MkDocs.
Install documentation dependencies:
If you are changing behavior, remember the docs checklist in Documentation Protocol.
Submitting a Pull Request
- Fork the repository.
- Create a new branch (
git checkout -b feature/my-feature). - Commit your changes.
- Push to the branch (
git push origin feature/my-feature). - Open a Pull Request.
Please ensure all tests pass before submitting!