mirror of
https://github.com/katanemo/plano.git
synced 2026-06-17 15:25:17 +02:00
add instructions about planoai and update guide to talk about pre-commit and running tests locally
This commit is contained in:
parent
6a29f8398f
commit
512e0a0045
1 changed files with 96 additions and 18 deletions
114
CONTRIBUTING.md
114
CONTRIBUTING.md
|
|
@ -1,15 +1,15 @@
|
|||
# Contribution
|
||||
|
||||
We would love feedback on our [Roadmap](https://github.com/orgs/katanemo/projects/1) and we welcome contributions to **Arch**!
|
||||
We would love feedback on our [Roadmap](https://github.com/orgs/katanemo/projects/1) and we welcome contributions to **Plano**!
|
||||
Whether you're fixing bugs, adding new features, improving documentation, or creating tutorials, your help is much appreciated.
|
||||
|
||||
## How to Contribute
|
||||
|
||||
### 1. Fork the Repository
|
||||
|
||||
Fork the repository to create your own version of **Arch**:
|
||||
Fork the repository to create your own version of **Plano**:
|
||||
|
||||
- Navigate to the [Arch GitHub repository](https://github.com/katanemo/arch).
|
||||
- Navigate to the [Plano GitHub repository](https://github.com/katanemo/plano).
|
||||
- Click the "Fork" button in the upper right corner.
|
||||
- This will create a copy of the repository under your GitHub account.
|
||||
|
||||
|
|
@ -18,11 +18,53 @@ Fork the repository to create your own version of **Arch**:
|
|||
Once you've forked the repository, clone it to your local machine:
|
||||
|
||||
```bash
|
||||
$ git clone https://github.com/katanemo/arch.git
|
||||
$ cd arch
|
||||
$ git clone https://github.com/katanemo/plano.git
|
||||
$ cd plano
|
||||
```
|
||||
|
||||
### 3. Create a branch
|
||||
### 3. Install Prerequisites
|
||||
|
||||
**Install uv** (Python package manager for the planoai CLI):
|
||||
|
||||
```bash
|
||||
$ curl -LsSf https://astral.sh/uv/install.sh | sh
|
||||
```
|
||||
|
||||
**Install pre-commit hooks:**
|
||||
|
||||
Pre-commit hooks help maintain code quality by running automated checks before each commit. Install them with:
|
||||
|
||||
```bash
|
||||
$ pip install pre-commit
|
||||
$ pre-commit install
|
||||
```
|
||||
|
||||
The pre-commit hooks will automatically run:
|
||||
- YAML validation
|
||||
- Code formatting checks (Rust with `cargo fmt`, Python with `black`)
|
||||
- Linting checks (Rust with `cargo clippy`)
|
||||
- Rust unit tests
|
||||
|
||||
### 4. Setup the planoai CLI
|
||||
|
||||
The planoai CLI is used to build, run, and manage Plano locally:
|
||||
|
||||
```bash
|
||||
$ cd cli
|
||||
$ uv sync
|
||||
```
|
||||
|
||||
This creates a virtual environment in `.venv` and installs all dependencies.
|
||||
|
||||
Optionally, install planoai globally in editable mode:
|
||||
|
||||
```bash
|
||||
$ uv tool install --editable .
|
||||
```
|
||||
|
||||
Now you can use `planoai` commands from anywhere, or use `uv run planoai` from the `cli` directory.
|
||||
|
||||
### 5. Create a Branch
|
||||
|
||||
Use a descriptive name for your branch (e.g., fix-bug-123, add-feature-x).
|
||||
|
||||
|
|
@ -30,29 +72,65 @@ Use a descriptive name for your branch (e.g., fix-bug-123, add-feature-x).
|
|||
$ git checkout -b <your-branch-name>
|
||||
```
|
||||
|
||||
### 4. Make Your changes
|
||||
### 6. Make Your Changes
|
||||
|
||||
Make your changes in the relevant files. If you're adding new features or fixing bugs, please include tests where applicable.
|
||||
|
||||
### 5. Test your changes
|
||||
### 7. Test Your Changes Locally
|
||||
|
||||
**Run Rust tests:**
|
||||
|
||||
```bash
|
||||
cd arch
|
||||
cargo test
|
||||
$ cd crates
|
||||
$ cargo test
|
||||
```
|
||||
|
||||
### 6. Push changes, and create a Pull request
|
||||
For library tests only:
|
||||
```bash
|
||||
$ cargo test --lib
|
||||
```
|
||||
|
||||
Go back to the original Arch repository, and you should see a "Compare & pull request" button. Click that to submit a Pull Request (PR). In your PR description, clearly explain the changes you made and why they are necessary.
|
||||
**Run Python CLI tests:**
|
||||
|
||||
```bash
|
||||
$ cd cli
|
||||
$ uv run pytest
|
||||
```
|
||||
|
||||
Or with verbose output:
|
||||
```bash
|
||||
$ uv run pytest -v
|
||||
```
|
||||
|
||||
**Run pre-commit checks manually:**
|
||||
|
||||
Before committing, you can run all pre-commit checks manually:
|
||||
|
||||
```bash
|
||||
$ pre-commit run --all-files
|
||||
```
|
||||
|
||||
This ensures your code passes all checks before you commit.
|
||||
|
||||
### 8. Push Changes and Create a Pull Request
|
||||
|
||||
Once your changes are tested and committed:
|
||||
|
||||
```bash
|
||||
$ git push origin <your-branch-name>
|
||||
```
|
||||
|
||||
Go back to the original Plano repository, and you should see a "Compare & pull request" button. Click that to submit a Pull Request (PR). In your PR description, clearly explain the changes you made and why they are necessary.
|
||||
|
||||
We will review your pull request and provide feedback. Once approved, your contribution will be merged into the main repository!
|
||||
|
||||
Contribution Guidelines
|
||||
## Contribution Guidelines
|
||||
|
||||
Ensure that all existing tests pass.
|
||||
Write clear commit messages.
|
||||
Add tests for any new functionality.
|
||||
Follow the existing coding style.
|
||||
Update documentation as needed.
|
||||
- Ensure that all existing tests pass.
|
||||
- Write clear commit messages.
|
||||
- Add tests for any new functionality.
|
||||
- Follow the existing coding style (enforced by pre-commit hooks).
|
||||
- Update documentation as needed.
|
||||
- Pre-commit hooks must pass before committing.
|
||||
|
||||
To get in touch with us, please join our [discord server](https://discord.gg/pGZf2gcwEc). We will be monitoring that actively and offering support there.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue