Skip to content

Commit ddb3f0c

Browse files
authored
Modernize project structure for better OSS contribution experience (#52)
1 parent 40e664e commit ddb3f0c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+2564
-1319
lines changed

.gitattributes

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# Auto detect text files and perform LF normalization
2+
* text=auto
3+
4+
# Source code
5+
*.cc text
6+
*.h text
7+
*.py text
8+
*.md text
9+
*.txt text
10+
*.toml text
11+
*.yml text
12+
*.yaml text
13+
*.json text
14+
*.cmake text
15+
*.in text
16+
17+
# Scripts
18+
*.sh text eol=lf
19+
*.bash text eol=lf
20+
21+
# Documentation
22+
*.rst text
23+
*.ipynb text
24+
25+
# Binary files
26+
*.so binary
27+
*.pyd binary
28+
*.dylib binary
29+
*.dll binary
30+
*.a binary
31+
*.o binary
32+
*.png binary
33+
*.jpg binary
34+
*.jpeg binary
35+
*.gif binary
36+
*.ico binary
37+
*.pdf binary
38+
39+
# Git
40+
.gitattributes export-ignore
41+
.gitignore export-ignore
42+
.github export-ignore
43+
44+
# Language statistics for GitHub
45+
*.h linguist-language=C++
46+
*.cc linguist-language=C++
47+
include/prtree/** linguist-language=C++
48+
src/cpp/** linguist-language=C++
49+
benchmarks/cpp/** linguist-language=C++
Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
name: Bug Report
2+
description: Report a bug or unexpected behavior
3+
title: "[Bug]: "
4+
labels: ["bug", "needs-triage"]
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
Thanks for taking the time to report a bug! Please fill out the information below.
10+
11+
- type: textarea
12+
id: description
13+
attributes:
14+
label: Bug Description
15+
description: A clear and concise description of what the bug is.
16+
placeholder: Describe the bug...
17+
validations:
18+
required: true
19+
20+
- type: textarea
21+
id: reproduce
22+
attributes:
23+
label: Steps to Reproduce
24+
description: Steps to reproduce the behavior
25+
placeholder: |
26+
1. Create a tree with...
27+
2. Call query with...
28+
3. See error...
29+
validations:
30+
required: true
31+
32+
- type: textarea
33+
id: expected
34+
attributes:
35+
label: Expected Behavior
36+
description: What did you expect to happen?
37+
placeholder: Expected to return...
38+
validations:
39+
required: true
40+
41+
- type: textarea
42+
id: actual
43+
attributes:
44+
label: Actual Behavior
45+
description: What actually happened? Include any error messages.
46+
placeholder: |
47+
Error message:
48+
```
49+
paste error here
50+
```
51+
validations:
52+
required: true
53+
54+
- type: textarea
55+
id: code
56+
attributes:
57+
label: Minimal Reproducible Example
58+
description: Please provide a minimal code example that reproduces the issue
59+
placeholder: |
60+
```python
61+
from python_prtree import PRTree2D
62+
# your code here
63+
```
64+
render: python
65+
validations:
66+
required: true
67+
68+
- type: input
69+
id: version
70+
attributes:
71+
label: python_prtree Version
72+
description: What version are you using?
73+
placeholder: "0.7.0"
74+
validations:
75+
required: true
76+
77+
- type: input
78+
id: python-version
79+
attributes:
80+
label: Python Version
81+
description: What Python version are you using?
82+
placeholder: "3.11"
83+
validations:
84+
required: true
85+
86+
- type: dropdown
87+
id: os
88+
attributes:
89+
label: Operating System
90+
options:
91+
- Linux
92+
- macOS
93+
- Windows
94+
- Other
95+
validations:
96+
required: true
97+
98+
- type: textarea
99+
id: additional
100+
attributes:
101+
label: Additional Context
102+
description: Add any other context about the problem here
103+
placeholder: Any additional information...
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Feature Request
2+
description: Suggest a new feature or enhancement
3+
title: "[Feature]: "
4+
labels: ["enhancement"]
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
Thanks for suggesting a feature! Please fill out the information below.
10+
11+
- type: textarea
12+
id: problem
13+
attributes:
14+
label: Problem Statement
15+
description: Is your feature request related to a problem? Please describe.
16+
placeholder: I'm always frustrated when...
17+
validations:
18+
required: true
19+
20+
- type: textarea
21+
id: solution
22+
attributes:
23+
label: Proposed Solution
24+
description: Describe the solution you'd like
25+
placeholder: I would like to be able to...
26+
validations:
27+
required: true
28+
29+
- type: textarea
30+
id: alternatives
31+
attributes:
32+
label: Alternatives Considered
33+
description: Describe alternatives you've considered
34+
placeholder: I've considered...
35+
36+
- type: textarea
37+
id: example
38+
attributes:
39+
label: Example Usage
40+
description: How would you use this feature?
41+
placeholder: |
42+
```python
43+
# Example code showing desired API
44+
tree.new_feature(...)
45+
```
46+
render: python
47+
48+
- type: checkboxes
49+
id: contribution
50+
attributes:
51+
label: Contribution
52+
description: Would you be willing to contribute this feature?
53+
options:
54+
- label: I'm willing to submit a PR for this feature

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
## Description
2+
3+
<!-- Please include a summary of the changes and the related issue. -->
4+
5+
Fixes #(issue)
6+
7+
## Type of Change
8+
9+
<!-- Please check the one that applies to this PR -->
10+
11+
- [ ] Bug fix (non-breaking change which fixes an issue)
12+
- [ ] New feature (non-breaking change which adds functionality)
13+
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
14+
- [ ] Documentation update
15+
- [ ] Code refactoring
16+
- [ ] Performance improvement
17+
- [ ] Test addition or modification
18+
19+
## Changes Made
20+
21+
<!-- List the main changes in this PR -->
22+
23+
-
24+
-
25+
-
26+
27+
## Testing
28+
29+
<!-- Describe the tests that you ran to verify your changes -->
30+
31+
- [ ] All existing tests pass (`make test` or `pytest`)
32+
- [ ] Added new tests for new functionality
33+
- [ ] Tested on multiple Python versions (if applicable)
34+
- [ ] Tested on multiple platforms (if applicable)
35+
36+
### Test Commands Run
37+
38+
```bash
39+
# List the test commands you ran
40+
make test
41+
pytest tests/unit/test_*.py -v
42+
```
43+
44+
## Documentation
45+
46+
- [ ] Updated docstrings for modified functions/classes
47+
- [ ] Updated README.md (if needed)
48+
- [ ] Updated CHANGES.md
49+
- [ ] Updated type hints (if applicable)
50+
51+
## Checklist
52+
53+
- [ ] My code follows the project's code style (`make format` and `make lint` pass)
54+
- [ ] I have performed a self-review of my code
55+
- [ ] I have commented my code, particularly in hard-to-understand areas
56+
- [ ] My changes generate no new warnings
57+
- [ ] I have added tests that prove my fix is effective or that my feature works
58+
- [ ] New and existing unit tests pass locally with my changes
59+
- [ ] Any dependent changes have been merged and published
60+
61+
## Performance Impact
62+
63+
<!-- If applicable, describe any performance implications -->
64+
65+
- [ ] No performance impact
66+
- [ ] Performance improvement (describe below)
67+
- [ ] Potential performance regression (describe below and justify)
68+
69+
## Breaking Changes
70+
71+
<!-- If this is a breaking change, describe the impact and migration path -->
72+
73+
N/A
74+
75+
## Additional Notes
76+
77+
<!-- Any additional information that reviewers should know -->

.github/workflows/cibuildwheel.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,11 @@ jobs:
4545
python-version: ${{ matrix.python }}
4646
- name: Install dependencies
4747
run: |
48-
python -m pip install --upgrade pip wheel setuptools
49-
python -m pip install numpy pytest
48+
python -m pip install --upgrade pip build
5049
- name: Build and install
51-
run: python -m pip install -e .
50+
run: python -m pip install -e ".[dev]"
5251
- name: Run tests
53-
run: pytest tests -vv
52+
run: python -m pytest tests -vv
5453

5554
build_wheels:
5655
# Skip wheel builds on PRs - only build on main branch and tags

0 commit comments

Comments
 (0)