Skip to content

Latest commit

 

History

History
97 lines (72 loc) · 3.93 KB

File metadata and controls

97 lines (72 loc) · 3.93 KB

Contributing to Zerocap

First off, thank you for considering contributing to Zerocap! It's people like you that make the open-source community such a fantastic place. We welcome any and all contributions, from fixing typos in the documentation to implementing major new features.

This document provides a guide for making a contribution.

Code of Conduct

This project and everyone participating in it is governed by our Code of Conduct. By participating, you are expected to uphold this code.

How Can I Contribute?

There are many ways to contribute to Zerocap, and many of them don't involve writing a single line of code.

  • Reporting Bugs: If you find a bug, please open an issue on our GitHub page. Be sure to include the version you're using, a clear description of the bug, and steps to reproduce it.
  • Suggesting Enhancements: If you have an idea for a new feature or an improvement to an existing one, open an issue to start a discussion.
  • Improving Documentation: If you find a section in the README.md or in the code comments that is unclear, confusing, or could be improved, let us know or submit a pull request.
  • Writing Code: If you're ready to write some code, you can get started by looking at issues labeled "good first issue" or "help wanted."

Setting Up Your Development Environment

To contribute code, you'll need to set up a local development environment.

  1. Fork & Clone the Repository

    • First, fork the repository to your own GitHub account.
    • Then, clone your fork to your local machine:
      git clone https://github.com/shunyai/zerocap.git
      cd zerocap
  2. Create a Python Virtual Environment We use venv to manage dependencies.

    python3 -m venv .venv
    source .venv/bin/activate
  3. Install in Editable Mode with Dev Dependencies Install the project in "editable" (-e) mode. This means any changes you make to the source code will be immediately reflected when you run the zerocap command.

    # This will install all production dependencies from pyproject.toml
    pip install -e .
    
    # You will also need to install dependencies for running tests
    # (We will add pytest later)
    # pip install pytest
  4. Install and Build the Frontend UI The Command Center UI is a React application. You will need Node.js and npm installed.

    # Navigate to the frontend directory
    cd src/zerocap/ui/frontend
    
    # Install all UI libraries
    npm install
    
    # Create the production build of the UI
    npm run build
    
    # Navigate back to the root directory
    cd ../../..

    After building the frontend, it's a good idea to re-run pip install -e . from the root to ensure the new static files are correctly picked up by the package.

Submitting a Pull Request

Ready to submit your changes? Follow this process.

  1. Create a New Branch Create a new branch for your feature or bugfix. Use a descriptive name.

    git checkout -b feature/add-persistent-state
    # or
    git checkout -b fix/ui-rendering-bug
  2. Make Your Changes Write your code! Make sure to follow the project's coding style. We generally follow the PEP 8 style guide for Python.

  3. Commit Your Changes Use clear and descriptive commit messages.

    git add .
    git commit -m "feat: Add persistent state storage using SQLite"
  4. Push to Your Fork

    git push origin feature/add-persistent-state
  5. Open a Pull Request Go to your fork on GitHub. You will see a button to "Compare & pull request". Click it, write a clear description of your changes, and submit the pull request.

A project maintainer will review your code, provide feedback, and merge it when it's ready. Thank you for your contribution!