From d7c02ebcd156c336a78b1f3488842e0cf3577eb8 Mon Sep 17 00:00:00 2001 From: Massimiliano Pippi Date: Sun, 27 Apr 2025 18:57:18 +0200 Subject: [PATCH] add basic CONTRIBUTING.md (#492) --- .pre-commit-config.yaml | 2 -- CONTRIBUTING.md | 79 +++++++++++++++++++++++++++++++++++++++++ README.md | 1 + e2e_tests/README.md | 8 ++--- pyproject.toml | 2 +- 5 files changed, 85 insertions(+), 7 deletions(-) create mode 100644 CONTRIBUTING.md diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 072f75b..ca027ea 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -23,7 +23,6 @@ repos: hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix] - exclude: ".*poetry.lock" - id: ruff-format - repo: https://github.com/pre-commit/mirrors-mypy @@ -72,4 +71,3 @@ repos: rev: v0.23.1 hooks: - id: toml-sort-fix - exclude: ".*poetry.lock" diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..e595fa1 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,79 @@ +# Contributing to llama_deploy + +Thank you for your interest in contributing to llama_deploy! This document provides guidelines and +instructions for contributing to the project. + +## Getting Started + +1. Fork the repository +2. Clone your fork: `git clone https://github.com/yourusername/llama_deploy.git` +3. Set up your development environment (see below) +4. Create a feature branch: `git checkout -b feature/my-feature` + +## Development Environment + +### Installing uv + +We use `uv` for package management. If you don't have it installed: + +``` +curl -LsSf https://astral.sh/uv/install.sh | sh +``` + +Or on macOS with Homebrew: +``` +brew install uv +``` + +For more installation options, visit the [uv documentation](https://docs.astral.sh/uv/getting-started/installation/). + +### Setting up the project + +Run the unit tests to verify your setup: +``` +uv run -- pytest tests +``` + +You can also run the end-to-end tests: +``` +uv run -- pytest e2e_tests +``` + +## Making Changes + +1. Make your changes +2. Add or update tests as needed +3. Run tests to make sure everything passes +4. Update documentation if necessary +5. Commit your changes with a descriptive message + +## Pull Request Process + +1. Push changes to your fork +2. Submit a pull request to the main repository +3. Add a clear description of the changes +4. Address any review comments + +## Code Style + +Follow the existing code style in the project. We use: + +- Black for code formatting +- Ruff for linting + +## Testing + +- Write tests for any new functionality +- Ensure all tests pass before submitting a PR +- Run tests with: `uv run -- pytest` + +## Documentation + +- Update documentation for any changed functionality +- Document new features thoroughly + +## Questions? + +If you have questions about contributing, please open an issue in the repository. + +Thank you for contributing to llama_deploy! diff --git a/README.md b/README.md index 6ea4c92..e45bc84 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,4 @@ +[![uv](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/uv/main/assets/badge/v0.json)](https://github.com/astral-sh/uv) [![PyPI - Version](https://img.shields.io/pypi/v/llama-deploy.svg)](https://pypi.org/project/llama-deploy) [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/llama-deploy.svg)](https://pypi.org/project/llama-deploy) [![Static Badge](https://img.shields.io/badge/docs-latest-blue)](https://docs.llamaindex.ai/en/latest/module_guides/llama_deploy/) diff --git a/e2e_tests/README.md b/e2e_tests/README.md index c7e4745..fcd90e1 100644 --- a/e2e_tests/README.md +++ b/e2e_tests/README.md @@ -9,21 +9,21 @@ When new folders are added, they will be executed automatically in the CI/CD pip To run all the tests: ```sh -$ poetry run pytest -m"e2e" +$ uv run -- pytest -m"e2e" ``` or ```sh -$ poetry run pytest ./e2e_tests +$ uv run -- pytest ./e2e_tests ``` To run a specific scenario: ```sh -$ poetry run pytest e2e_tests/basic_streaming +$ uv run -- pytest e2e_tests/basic_streaming ``` If you want to see the output of the different services running, pass the `-s` flag to pytest: ```sh -$ poetry run pytest e2e_tests/basic_streaming -s +$ uv run -- pytest e2e_tests/basic_streaming -s ``` diff --git a/pyproject.toml b/pyproject.toml index 515771b..cb0be14 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -72,7 +72,7 @@ llamactl = "llama_deploy.cli.__main__:main" [tool.codespell] ignore-words-list = "LITS" -skip = "poetry.lock,./examples,*/algolia.js,docs/poetry.lock" +skip = "./examples,*/algolia.js,docs/poetry.lock" [tool.coverage.run] omit = [