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.
This project and everyone participating in it is governed by our Code of Conduct. By participating, you are expected to uphold this code.
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.mdor 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."
To contribute code, you'll need to set up a local development environment.
-
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
-
Create a Python Virtual Environment We use
venvto manage dependencies.python3 -m venv .venv source .venv/bin/activate -
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 thezerocapcommand.# 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
-
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.
Ready to submit your changes? Follow this process.
-
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 -
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.
-
Commit Your Changes Use clear and descriptive commit messages.
git add . git commit -m "feat: Add persistent state storage using SQLite"
-
Push to Your Fork
git push origin feature/add-persistent-state
-
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!