Skip to content

Commit fe96968

Browse files
committed
Complete project cleanup and add comprehensive documentation
This commit completes the project restructuring with: ## Cleanup - Remove legacy cpp/ directory (fully migrated to include/ and src/cpp/) - Update CMakeLists.txt to remove legacy paths - Clean up .gitignore (modern, organized) - Add .gitattributes (language detection, line endings) - Update MANIFEST.in (remove legacy references) ## GitHub Integration - Add bug report template (.github/ISSUE_TEMPLATE/bug_report.yml) - Add feature request template (.github/ISSUE_TEMPLATE/feature_request.yml) - Add PR template (.github/PULL_REQUEST_TEMPLATE.md) - All templates follow modern YAML format with validation ## Directory Documentation - Add include/README.md - C++ public headers guide - Add src/cpp/README.md - C++ implementation guide - Add src/python_prtree/README.md - Python package guide - Add tests/README.md - Test suite organization - Each README explains structure, responsibilities, and contribution guidelines ## Migration Documentation - Add MIGRATION.md - Complete migration guide for v0.7.0 - Documents all structural changes - Provides troubleshooting steps - 100% backwards compatible for users - Clear migration path for contributors ## Benefits ### For New Contributors - Every directory has a README explaining its purpose - Clear guidelines on where to add code - GitHub templates guide issue/PR creation - Complete migration guide for existing contributors ### For Project Quality - Clean git history (proper .gitattributes) - Organized .gitignore (no more stray build files) - Professional GitHub templates - Comprehensive documentation at every level ### For Maintainers - Legacy code removed (single source of truth) - Clear contribution path reduces review time - Documentation reduces repetitive questions - Professional appearance attracts contributors ## Documentation Hierarchy ``` Project Root ├── README.md - User-facing documentation ├── ARCHITECTURE.md - System architecture ├── DEVELOPMENT.md - Development setup ├── CONTRIBUTING.md - Contribution guide ├── MIGRATION.md - Migration guide (new) ├── CHANGES.md - Changelog │ ├── include/README.md - C++ headers guide (new) ├── src/cpp/README.md - C++ impl guide (new) ├── src/python_prtree/README.md - Python pkg guide (new) └── tests/README.md - Test suite guide (new) ``` ## Next Steps Ready for prtree.h modularization (1617 lines → separate files).
1 parent 23eecb7 commit fe96968

File tree

15 files changed

+744
-2899
lines changed

15 files changed

+744
-2899
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 -->

.gitignore

Lines changed: 48 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,59 @@
1-
cmake-build-*/
2-
docker/
3-
ldata/
1+
# Build artifacts
42
build/
5-
build_*/
63
dist/
7-
_build/
8-
_generate/
4+
*.egg-info/
95
*.so
10-
*.so.*
6+
*.pyd
7+
*.dylib
8+
*.dll
119
*.a
12-
*.py[cod]
13-
*.egg-info
14-
.eggs/
15-
.idea/
16-
input/*
17-
!input/.gitkeep
10+
*.o
11+
12+
# Python
1813
__pycache__/
19-
.ipynb_checkpoints/
14+
*.py[cod]
15+
*$py.class
16+
*.egg
17+
.Python
18+
.pytest_cache/
19+
.coverage
20+
htmlcov/
21+
.tox/
22+
.nox/
23+
.hypothesis/
24+
.mypy_cache/
25+
.dmypy.json
26+
dmypy.json
27+
.ruff_cache/
28+
29+
# IDEs
2030
.vscode/
31+
.idea/
32+
*.swp
33+
*.swo
34+
*~
2135
.DS_Store
22-
*.prof
23-
24-
# Test coverage
25-
htmlcov/
26-
.coverage
27-
.coverage.*
28-
coverage.xml
29-
*.cover
3036

31-
# Pytest
32-
.pytest_cache/
33-
.pytest_cache
37+
# CMake
38+
CMakeCache.txt
39+
CMakeFiles/
40+
cmake_install.cmake
41+
Makefile
42+
compile_commands.json
3443

35-
# Build artifacts
36-
*.o
37-
*.obj
38-
*.lib
39-
*.exp
44+
# Profiling
45+
*.prof
46+
*.log
47+
callgrind.*
48+
perf.data*
4049

41-
# Temporary files
42-
*.tmp
43-
*.bak
44-
*~
50+
# Documentation
51+
docs/_build/
52+
site/
4553

46-
# Phase 0 profiling artifacts (keep templates, ignore generated data)
47-
docs/baseline/reports/*.txt
48-
docs/baseline/reports/*.out
49-
docs/baseline/reports/*.data
50-
docs/baseline/flamegraphs/*.svg
51-
*_benchmark_results.csv
52-
*.prof
53-
perf.data
54-
perf.data.old
55-
cachegrind.out*
54+
# Local development
55+
.env
56+
.venv
57+
venv/
58+
ENV/
59+
env/

CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ set(PRTREE_SOURCES
5050
# Include directories
5151
set(PRTREE_INCLUDE_DIRS
5252
${CMAKE_CURRENT_SOURCE_DIR}/include
53-
${CMAKE_CURRENT_SOURCE_DIR}/cpp # Backward compatibility during migration
5453
)
5554

5655
option(SNAPPY_BUILD_TESTS "" OFF)

0 commit comments

Comments
 (0)