Thank you for your interest in contributing to DS! We welcome issues and pull requests from everyone.
This document provides guidelines and instructions for contributing to the project.
- Getting Started
- Development Environment
- Code Style
- Pre-commit Hooks
- Running Tests
- Submitting Pull Requests
- License
DS is a deductive system for logical inference implemented in C++, with bindings for Python (via pybind11) and TypeScript/JavaScript (via Emscripten/WebAssembly).
To get started:
- Fork the repository on GitHub
- Clone your fork locally:
git clone https://github.com/YOUR_USERNAME/ds.git cd ds - Set up your development environment (see below)
- C++: C++20 compatible compiler (GCC 10+, Clang 10+, MSVC 2019+), CMake 3.30+
- Python: Python 3.11-3.14
- TypeScript/JavaScript: Node.js 20+, Emscripten SDK (for building WebAssembly)
cmake -B build
cmake --build builduv sync --extra devRequires Emscripten SDK to be installed.
npm install
npm run buildThis project uses automated code formatting tools to ensure consistency. Please make sure your code follows these styles before submitting.
- Uses clang-format for formatting
- Configuration is in
.clang-format - Run manually:
clang-format -i <file>
- Uses ruff for linting and formatting
- Configuration is in
pyproject.toml - Run manually:
ruff check --fix ruff format
- Uses Biome for linting and formatting
- Configuration is in
biome.json - Run manually:
npx @biomejs/biome check
This project uses pre-commit to run code quality checks automatically before each commit.
Install pre-commit hooks:
pip install pre-commit
pre-commit installThe hooks will automatically run on staged files when you commit. To run all hooks manually:
pre-commit run --all-files- clang-format: Formats C/C++/CUDA files
- ruff-check: Lints Python files (with auto-fix)
- ruff-format: Formats Python files
- biome-check: Lints and formats TypeScript/JavaScript files
npm testuv run pytestcd build
ctest-
Create a new branch for your changes
-
Make your changes and commit with a clear, descriptive commit message
-
Push to your fork and submit a pull request to the main repository
By contributing to DS, you agree that your contributions will be licensed under the GNU Affero General Public License v3.0 or later.