From da811061f4aab1272150c61d5fc7779ea604e885 Mon Sep 17 00:00:00 2001 From: Andy Lee Date: Fri, 19 Sep 2025 11:56:40 -0700 Subject: [PATCH] feat: Add GitHub PR and issue templates for better contributor experience --- .github/ISSUE_TEMPLATE/bug_report.yml | 160 +++++++++++++++++++++ .github/ISSUE_TEMPLATE/config.yml | 14 ++ .github/ISSUE_TEMPLATE/feature_request.yml | 136 ++++++++++++++++++ .github/pull_request_template.md | 84 +++++++++++ 4 files changed, 394 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/bug_report.yml create mode 100644 .github/ISSUE_TEMPLATE/config.yml create mode 100644 .github/ISSUE_TEMPLATE/feature_request.yml create mode 100644 .github/pull_request_template.md diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml new file mode 100644 index 0000000..56b3050 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -0,0 +1,160 @@ +name: ๐Ÿ› Bug Report +description: Report a bug or unexpected behavior in LEANN +title: "[BUG] " +labels: ["bug", "triage"] +assignees: [] + +body: + - type: markdown + attributes: + value: | + Thanks for taking the time to report this bug! Please fill out the sections below to help us understand and reproduce the issue. + + - type: textarea + id: description + attributes: + label: Bug Description + description: A clear and concise description of what the bug is. + placeholder: | + When I try to build an index with..., I get an error... + validations: + required: true + + - type: textarea + id: reproduce + attributes: + label: Steps to Reproduce + description: Steps to reproduce the behavior + placeholder: | + 1. Install LEANN with '...' + 2. Run command '...' + 3. See error + value: | + 1. + 2. + 3. + validations: + required: true + + - type: textarea + id: expected + attributes: + label: Expected Behavior + description: What did you expect to happen? + placeholder: The index should build successfully... + validations: + required: true + + - type: textarea + id: actual + attributes: + label: Actual Behavior + description: What actually happened? + placeholder: The process crashed with error... + validations: + required: true + + - type: textarea + id: error-output + attributes: + label: Error Output + description: If applicable, paste any error messages or stack traces + render: shell + placeholder: | + Traceback (most recent call last): + File "...", line X, in + ... + + - type: dropdown + id: backend + attributes: + label: Backend + description: Which backend are you using? + options: + - leann-backend-diskann + - leann-backend-hnsw + - Both + - Not sure + validations: + required: true + + - type: input + id: version + attributes: + label: LEANN Version + description: What version of LEANN are you using? (run `pip show leann`) + placeholder: "0.1.0" + validations: + required: true + + - type: input + id: python-version + attributes: + label: Python Version + description: What version of Python are you using? + placeholder: "3.11.5" + validations: + required: true + + - type: dropdown + id: os + attributes: + label: Operating System + options: + - macOS (Intel) + - macOS (Apple Silicon) + - Ubuntu/Debian + - Other Linux + - Windows + - Docker + validations: + required: true + + - type: input + id: os-version + attributes: + label: OS Version + description: Please specify your OS version + placeholder: "macOS 14.0, Ubuntu 22.04, etc." + + - type: dropdown + id: installation-method + attributes: + label: Installation Method + description: How did you install LEANN? + options: + - pip install from PyPI + - Built from source with uv + - Docker + - Other + validations: + required: true + + - type: textarea + id: code-sample + attributes: + label: Minimal Reproducible Example + description: If possible, provide a minimal code example that reproduces the issue + render: python + placeholder: | + from leann import LeannBuilder + + # Your code here + + - type: textarea + id: additional-context + attributes: + label: Additional Context + description: Add any other context about the problem here (e.g., dataset size, memory constraints, etc.) + + - type: checkboxes + id: checklist + attributes: + label: Checklist + options: + - label: I have searched the existing issues and this is not a duplicate + required: true + - label: I have read the documentation and followed the setup instructions + required: true + - label: I am using the latest version of LEANN (or have tested with it) + required: false diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000..b71f847 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,14 @@ +blank_issues_enabled: true +contact_links: + - name: ๐Ÿ“– Documentation + url: https://github.com/LEANN-RAG/LEANN-RAG/tree/main/docs + about: Read the documentation for setup and usage instructions + - name: ๐Ÿ’ฌ Discord Community + url: https://discord.gg/your-discord-link + about: Join our Discord for discussions and community support + - name: ๐Ÿค” Discussions + url: https://github.com/LEANN-RAG/LEANN-RAG/discussions + about: Ask questions and share ideas with the community + - name: ๐Ÿงช Benchmark Question + url: https://github.com/LEANN-RAG/LEANN-RAG/discussions/categories/benchmarks + about: Share or discuss performance benchmarks diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml new file mode 100644 index 0000000..3cc34de --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -0,0 +1,136 @@ +name: โœจ Feature Request +description: Suggest a new feature or enhancement for LEANN +title: "[FEATURE] " +labels: ["enhancement", "triage"] +assignees: [] + +body: + - type: markdown + attributes: + value: | + Thanks for suggesting a feature! We're always looking for ways to improve LEANN. + + - type: textarea + id: problem + attributes: + label: Problem Statement + description: Is your feature request related to a problem? Please describe. + placeholder: | + I'm always frustrated when... + It would be helpful if... + validations: + required: true + + - type: textarea + id: solution + attributes: + label: Proposed Solution + description: Describe the solution you'd like + placeholder: | + I would like LEANN to... + The feature should... + validations: + required: true + + - type: textarea + id: alternatives + attributes: + label: Alternatives Considered + description: Describe any alternative solutions or features you've considered + placeholder: | + I've tried using... + Another approach could be... + + - type: dropdown + id: feature-area + attributes: + label: Feature Area + description: Which area of LEANN does this feature relate to? + options: + - Core API + - DiskANN Backend + - HNSW Backend + - CLI Tools + - Documentation + - Performance + - Testing + - Build/Installation + - Other + validations: + required: true + + - type: dropdown + id: priority + attributes: + label: Priority + description: How important is this feature to you? + options: + - Critical - Blocking my work + - High - Significantly improves workflow + - Medium - Nice to have + - Low - Minor improvement + validations: + required: true + + - type: textarea + id: use-case + attributes: + label: Use Case + description: Describe your use case and how this feature would benefit you or others + placeholder: | + In my project, I need to... + This would help when... + validations: + required: true + + - type: textarea + id: api-example + attributes: + label: API Example + description: If applicable, show how you envision using this feature + render: python + placeholder: | + from leann import LeannBuilder + + # How the API might look + builder = LeannBuilder() + builder.new_feature(...) + + - type: textarea + id: implementation-ideas + attributes: + label: Implementation Ideas + description: If you have ideas about how this could be implemented, share them here + placeholder: | + This could be implemented by... + We might need to modify... + + - type: dropdown + id: breaking-change + attributes: + label: Breaking Change + description: Would this feature require breaking changes to existing APIs? + options: + - "No - Fully backward compatible" + - "Yes - Would require API changes" + - "Not sure" + validations: + required: true + + - type: textarea + id: additional-context + attributes: + label: Additional Context + description: Add any other context, screenshots, or examples about the feature request + + - type: checkboxes + id: contribution + attributes: + label: Contribution + options: + - label: I am willing to help implement this feature + required: false + - label: I am willing to help test this feature + required: false + - label: I have searched existing issues and this is not a duplicate + required: true diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 0000000..451c876 --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,84 @@ +## ๐Ÿ“‹ Description + + + +## ๐ŸŽฏ Type of Change + + + +- [ ] ๐Ÿ› Bug fix (non-breaking change which fixes an issue) +- [ ] โœจ New feature (non-breaking change which adds functionality) +- [ ] ๐Ÿ’ฅ Breaking change (fix or feature that would cause existing functionality to not work as expected) +- [ ] ๐Ÿ“š Documentation update +- [ ] ๐ŸŽจ Code refactoring +- [ ] โšก Performance improvement +- [ ] ๐Ÿงช Test addition/modification +- [ ] ๐Ÿ”ง Build/CI configuration change + +## ๐Ÿ”— Related Issues + + + +Fixes # +Related to # + +## โœ… Checklist + + + +- [ ] My code follows the style guidelines of this project (ran `ruff format` and `ruff check`) +- [ ] I have performed a self-review of my own code +- [ ] I have commented my code, particularly in hard-to-understand areas +- [ ] I have made corresponding changes to the documentation +- [ ] My changes generate no new warnings +- [ ] I have added tests that prove my fix is effective or that my feature works +- [ ] New and existing unit tests pass locally with my changes +- [ ] Any dependent changes have been merged and published in downstream modules +- [ ] I have run pre-commit hooks (`pre-commit run --all-files`) + +## ๐Ÿงช Testing + + + +### Test Configuration +- **Python version**: +- **Operating System**: + +### Test Results + + +```bash +# Add test command outputs here +``` + +## ๐Ÿ“ธ Screenshots (if applicable) + + + +## ๐Ÿ“ Additional Notes + + + +## ๐Ÿš€ Performance Impact + + + +- [ ] No performance impact +- [ ] Performance improvement (describe below) +- [ ] Potential performance regression (explain mitigation) + + + +## ๐Ÿ”„ Migration Guide (if breaking change) + + + +### Before +```python +# Old usage example +``` + +### After +```python +# New usage example +```