Skip to content

Latest commit

 

History

History
164 lines (126 loc) · 4.07 KB

File metadata and controls

164 lines (126 loc) · 4.07 KB

Contributing to Cpplify

Thank you for your interest in contributing to Cpplify! This document provides guidelines for contributing.

Getting Started

Prerequisites

  • Node.js 18+
  • Docker 20.10+
  • CMake 3.20+ (for kernel development)
  • Clang 15+ (for kernel development)

Development Setup

# Clone the repository
git clone https://github.com/your-org/cpplify.git
cd cpplify

# Start the development environment with hot-reload
docker compose -f docker-compose.dev.yml up --watch

# Frontend development
cd frontend
npm install
npm run dev

# Kernel development (requires C++ toolchain)
cd kernel
mkdir build && cd build
cmake ..
make

Project Modules

The project is organized into independent modules:

Module Directory Description
Frontend frontend/ React notebook UI
Kernel kernel/ C++ execution engine
Docker docker/ Container platform

Development Workflow

1. Create an Issue

Before starting work, ensure there's an issue describing the change.

2. Branch Naming

We follow a strict naming convention for branches: type/module/description

Types:

  • feature: New features or significant improvements
  • bugfix: Fixes for bugs
  • hotfix: Critical fixes for production
  • docs: Documentation only changes
  • refactor: Code restructuring without checking behavior
  • style: Formatting, missing semi-colons, etc; no production code change
  • test: Adding missing tests, refactoring tests
  • chore: Updating build tasks, package manager configs, etc
  • ci: CI configuration changes

Examples:

feature/frontend/add-dark-mode
bugfix/kernel/memory-leak
docs/readme/update-installation

3. Commit Messages

We follow the Conventional Commits specification. The structure is: <type>(<scope>): <description>

Types:

  • feat: A new feature
  • fix: A bug fix
  • docs: Documentation only changes
  • style: Changes that do not affect the meaning of the code (white-space, formatting, etc)
  • refactor: A code change that neither fixes a bug nor adds a feature
  • perf: A code change that improves performance
  • test: Adding missing tests or correcting existing tests
  • build: Changes that affect the build system or external dependencies
  • ci: Changes to our CI configuration files and scripts
  • chore: Other changes that don't modify src or test files
  • revert: Reverts a previous commit

Examples:

feat(frontend): add cell reordering capability
fix(kernel): resolve compilation timeout issue
docs: update installation guide in README

4. Example Contribution Workflow

Here is a complete example of how to contribute:

  1. Fork and Clone:

    git clone https://github.com/your-username/cpplify.git
    cd cpplify
  2. Create a Branch: Assuming you are adding a new Markdown export feature to the frontend.

    git checkout -b feature/frontend/markdown-export
  3. Make Changes: Modify the code...

  4. Commit Changes:

    git add .
    git commit -m "feat(frontend): add markdown export functionality"
  5. Push and Create Pull Request:

    git push origin feature/frontend/markdown-export

    Go to GitHub and open a Pull Request against the main branch.

5. Pull Requests

  • Reference the issue number (e.g., "Closes #123")
  • Include tests for new features
  • Update documentation as needed
  • Request review from the module owner

Code Style

TypeScript/JavaScript (Frontend)

  • ESLint + Prettier configuration in frontend/
  • Run npm run lint before committing

C++ (Kernel)

  • Follow Google C++ Style Guide
  • clang-format configuration in kernel/

Testing

# Frontend tests
cd frontend && npm test

# Kernel tests
cd kernel/build && ctest

# Integration tests
./scripts/test-integration.sh

Module Owners

For questions about specific modules, contact the respective owners:

  • Frontend - [TBD]
  • Kernel - [TBD]
  • Docker - [TBD]

License

By contributing, you agree that your contributions will be licensed under the MIT License.