Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 49 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Auto detect text files and perform LF normalization
* text=auto

# Source code
*.cc text
*.h text
*.py text
*.md text
*.txt text
*.toml text
*.yml text
*.yaml text
*.json text
*.cmake text
*.in text

# Scripts
*.sh text eol=lf
*.bash text eol=lf

# Documentation
*.rst text
*.ipynb text

# Binary files
*.so binary
*.pyd binary
*.dylib binary
*.dll binary
*.a binary
*.o binary
*.png binary
*.jpg binary
*.jpeg binary
*.gif binary
*.ico binary
*.pdf binary

# Git
.gitattributes export-ignore
.gitignore export-ignore
.github export-ignore

# Language statistics for GitHub
*.h linguist-language=C++
*.cc linguist-language=C++
include/prtree/** linguist-language=C++
src/cpp/** linguist-language=C++
benchmarks/cpp/** linguist-language=C++
103 changes: 103 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
name: Bug Report
description: Report a bug or unexpected behavior
title: "[Bug]: "
labels: ["bug", "needs-triage"]
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to report a bug! Please fill out the information below.

- type: textarea
id: description
attributes:
label: Bug Description
description: A clear and concise description of what the bug is.
placeholder: Describe the bug...
validations:
required: true

- type: textarea
id: reproduce
attributes:
label: Steps to Reproduce
description: Steps to reproduce the behavior
placeholder: |
1. Create a tree with...
2. Call query with...
3. See error...
validations:
required: true

- type: textarea
id: expected
attributes:
label: Expected Behavior
description: What did you expect to happen?
placeholder: Expected to return...
validations:
required: true

- type: textarea
id: actual
attributes:
label: Actual Behavior
description: What actually happened? Include any error messages.
placeholder: |
Error message:
```
paste error here
```
validations:
required: true

- type: textarea
id: code
attributes:
label: Minimal Reproducible Example
description: Please provide a minimal code example that reproduces the issue
placeholder: |
```python
from python_prtree import PRTree2D
# your code here
```
render: python
validations:
required: true

- type: input
id: version
attributes:
label: python_prtree Version
description: What version are you using?
placeholder: "0.7.0"
validations:
required: true

- type: input
id: python-version
attributes:
label: Python Version
description: What Python version are you using?
placeholder: "3.11"
validations:
required: true

- type: dropdown
id: os
attributes:
label: Operating System
options:
- Linux
- macOS
- Windows
- Other
validations:
required: true

- type: textarea
id: additional
attributes:
label: Additional Context
description: Add any other context about the problem here
placeholder: Any additional information...
54 changes: 54 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Feature Request
description: Suggest a new feature or enhancement
title: "[Feature]: "
labels: ["enhancement"]
body:
- type: markdown
attributes:
value: |
Thanks for suggesting a feature! Please fill out the information below.

- 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...
validations:
required: true

- type: textarea
id: solution
attributes:
label: Proposed Solution
description: Describe the solution you'd like
placeholder: I would like to be able to...
validations:
required: true

- type: textarea
id: alternatives
attributes:
label: Alternatives Considered
description: Describe alternatives you've considered
placeholder: I've considered...

- type: textarea
id: example
attributes:
label: Example Usage
description: How would you use this feature?
placeholder: |
```python
# Example code showing desired API
tree.new_feature(...)
```
render: python

- type: checkboxes
id: contribution
attributes:
label: Contribution
description: Would you be willing to contribute this feature?
options:
- label: I'm willing to submit a PR for this feature
77 changes: 77 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
## Description

<!-- Please include a summary of the changes and the related issue. -->

Fixes #(issue)

## Type of Change

<!-- Please check the one that applies to this PR -->

- [ ] 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 or modification

## Changes Made

<!-- List the main changes in this PR -->

-
-
-

## Testing

<!-- Describe the tests that you ran to verify your changes -->

- [ ] All existing tests pass (`make test` or `pytest`)
- [ ] Added new tests for new functionality
- [ ] Tested on multiple Python versions (if applicable)
- [ ] Tested on multiple platforms (if applicable)

### Test Commands Run

```bash
# List the test commands you ran
make test
pytest tests/unit/test_*.py -v
```

## Documentation

- [ ] Updated docstrings for modified functions/classes
- [ ] Updated README.md (if needed)
- [ ] Updated CHANGES.md
- [ ] Updated type hints (if applicable)

## Checklist

- [ ] My code follows the project's code style (`make format` and `make lint` pass)
- [ ] I have performed a self-review of my code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] 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

## Performance Impact

<!-- If applicable, describe any performance implications -->

- [ ] No performance impact
- [ ] Performance improvement (describe below)
- [ ] Potential performance regression (describe below and justify)

## Breaking Changes

<!-- If this is a breaking change, describe the impact and migration path -->

N/A

## Additional Notes

<!-- Any additional information that reviewers should know -->
7 changes: 3 additions & 4 deletions .github/workflows/cibuildwheel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,11 @@ jobs:
python-version: ${{ matrix.python }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip wheel setuptools
python -m pip install numpy pytest
python -m pip install --upgrade pip build
- name: Build and install
run: python -m pip install -e .
run: python -m pip install -e ".[dev]"
- name: Run tests
run: pytest tests -vv
run: python -m pytest tests -vv

build_wheels:
# Skip wheel builds on PRs - only build on main branch and tags
Expand Down
Loading