Skip to content

Commit 2d33a98

Browse files
shijiashuaiqwencoder
andcommitted
refactor: optimize project directory structure
- Move GitHub Pages files (_config.yml, index.md, Gemfile) to site/ - Add missing docs/tutorials/ and docs/assets/ directories - Create scripts/ directory with build.sh, test.sh, format.sh - Update AGENTS.md, README.md, and docs/README.md with new structure - Update GitHub Pages workflow to use site/ directory - Add .gitkeep files for empty directories This reorganization improves project clarity by: - Separating site generation files from source code - Providing proper locations for tutorials and assets - Adding convenient build/test/format automation scripts - Better aligning with documented project structure Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
1 parent cdb6c60 commit 2d33a98

28 files changed

Lines changed: 1770 additions & 5 deletions

.github/CODEOWNERS

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# CODEOWNERS - Define code ownership for automatic PR reviews
2+
# See: https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners
3+
4+
# Default owners for everything
5+
* @LessUp
6+
7+
# CUDA kernel code
8+
/src/cuda/ @LessUp
9+
10+
# Core simulation logic
11+
/src/core/ @LessUp
12+
/include/nbody/ @LessUp
13+
14+
# Rendering code
15+
/src/render/ @LessUp
16+
/shaders/ @LessUp
17+
18+
# Build system
19+
/CMakeLists.txt @LessUp
20+
21+
# Documentation
22+
/docs/ @Lessup
23+
/README.md @LessUp
24+
/README.zh-CN.md @LessUp
25+
/CHANGELOG.md @LessUp
26+
27+
# Tests
28+
/tests/ @LessUp
29+
30+
# CI/CD
31+
/.github/workflows/ @LessUp

.github/FUNDING.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Funding
2+
3+
If you find this project useful and would like to support its development, consider:
4+
5+
## Sponsoring
6+
7+
<!-- Uncomment and configure if you set up GitHub Sponsors -->
8+
<!-- github: LessUp -->
9+
10+
## Other Ways to Support
11+
12+
- ⭐ Star the repository
13+
- 🐛 Report bugs and issues
14+
- 💡 Suggest new features
15+
- 📖 Improve documentation
16+
- 🔧 Submit pull requests
17+
18+
Thank you for your support! 🙏
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
---
2+
name: Bug Report
3+
about: Report a bug in the N-Body simulation
4+
title: '[BUG] '
5+
labels: 'bug'
6+
assignees: ''
7+
---
8+
9+
## Bug Description
10+
11+
A clear and concise description of what the bug is.
12+
13+
## Environment
14+
15+
**Hardware:**
16+
- GPU: [e.g., NVIDIA RTX 3080]
17+
- VRAM: [e.g., 10GB]
18+
- RAM: [e.g., 32GB]
19+
20+
**Software:**
21+
- OS: [e.g., Ubuntu 22.04]
22+
- CUDA Version: [e.g., 12.1]
23+
- GPU Driver: [e.g., 530.41.03]
24+
- Project Version: [e.g., 2.0.0]
25+
26+
## Steps to Reproduce
27+
28+
1. Build command used: `cmake ...`
29+
2. Run command: `./nbody_sim ...`
30+
3. Configuration/parameters used: `...`
31+
4. See error
32+
33+
## Expected Behavior
34+
35+
What you expected to happen.
36+
37+
## Actual Behavior
38+
39+
What actually happened.
40+
41+
## Logs/Output
42+
43+
```
44+
Paste relevant logs here
45+
```
46+
47+
## Screenshots
48+
49+
If applicable, add screenshots to help explain the problem.
50+
51+
## Additional Context
52+
53+
Add any other context about the problem here.
54+
55+
## Minimal Reproducible Example
56+
57+
If possible, provide a minimal set of steps or code that reproduces the issue:
58+
59+
```bash
60+
# Minimal commands to reproduce
61+
```
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
---
2+
name: Feature Request
3+
about: Suggest a new feature for the N-Body simulation
4+
title: '[FEATURE] '
5+
labels: 'enhancement'
6+
assignees: ''
7+
---
8+
9+
## Feature Description
10+
11+
A clear and concise description of the feature you'd like to see.
12+
13+
## Motivation
14+
15+
Why is this feature needed? What problem does it solve?
16+
17+
## Proposed Solution
18+
19+
Describe how you envision this feature being implemented.
20+
21+
### API Design (if applicable)
22+
23+
```cpp
24+
// Example of how the feature might be used
25+
```
26+
27+
### Implementation Considerations
28+
29+
- [ ] Performance impact
30+
- [ ] Memory usage
31+
- [ ] Backward compatibility
32+
- [ ] Documentation needs
33+
34+
## Alternatives Considered
35+
36+
A clear description of any alternative solutions or features you've considered.
37+
38+
## Use Cases
39+
40+
Describe specific use cases for this feature:
41+
42+
1. **Use Case 1**: Description...
43+
2. **Use Case 2**: Description...
44+
45+
## Related Work
46+
47+
- Links to relevant papers, articles, or other projects
48+
- Related issues: #
49+
50+
## Additional Context
51+
52+
Add any other context or screenshots about the feature request here.
53+
54+
## Would you be willing to contribute this feature?
55+
56+
- [ ] Yes, I'd like to submit a PR for this feature
57+
- [ ] I can help with testing
58+
- [ ] I can help with documentation
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
---
2+
name: Performance Issue
3+
about: Report performance problems or suggest optimizations
4+
title: '[PERF] '
5+
labels: 'performance'
6+
assignees: ''
7+
---
8+
9+
## Performance Issue Description
10+
11+
Describe the performance issue you're experiencing.
12+
13+
## Environment
14+
15+
**Hardware:**
16+
- GPU: [e.g., NVIDIA RTX 3080]
17+
- VRAM: [e.g., 10GB]
18+
- CPU: [e.g., AMD Ryzen 9 5900X]
19+
- RAM: [e.g., 32GB]
20+
21+
**Software:**
22+
- OS: [e.g., Ubuntu 22.04]
23+
- CUDA Version: [e.g., 12.1]
24+
- GPU Driver: [e.g., 530.41.03]
25+
- Project Version: [e.g., 2.0.0]
26+
27+
## Benchmark Results
28+
29+
### Current Performance
30+
31+
| Particles | Algorithm | FPS | Expected FPS |
32+
|-----------|-----------|-----|--------------|
33+
| | | | |
34+
35+
### Profiling Data
36+
37+
```
38+
Paste nvprof or Nsight profiling results here
39+
```
40+
41+
## Reproduction Steps
42+
43+
```bash
44+
# Commands used for benchmarking
45+
./nbody_sim 100000 --algorithm barnes-hut --benchmark
46+
```
47+
48+
## Expected Performance
49+
50+
What performance do you expect, and why? (Reference benchmarks, similar projects, etc.)
51+
52+
## Potential Optimizations
53+
54+
If you have ideas for potential optimizations, please share them:
55+
56+
1. ...
57+
2. ...
58+
59+
## Additional Context
60+
61+
Add any other context about the performance issue here.

.github/ISSUE_TEMPLATE/question.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
---
2+
name: Question
3+
about: Ask a question about the N-Body simulation
4+
title: '[QUESTION] '
5+
labels: 'question'
6+
assignees: ''
7+
---
8+
9+
## Question
10+
11+
A clear and specific question about the project.
12+
13+
## Context
14+
15+
Provide context for your question:
16+
17+
- What are you trying to accomplish?
18+
- What have you already tried?
19+
- What documentation have you consulted?
20+
21+
## Relevant Documentation
22+
23+
Did you check the following?
24+
25+
- [ ] README.md
26+
- [ ] docs/ARCHITECTURE.md
27+
- [ ] docs/GETTING_STARTED.md
28+
- [ ] docs/API.md (if available)
29+
- [ ] Existing issues
30+
31+
## Code Snippet (if applicable)
32+
33+
```cpp
34+
// Code you're working with
35+
```
36+
37+
## Environment (if relevant)
38+
39+
- OS:
40+
- CUDA Version:
41+
- Project Version:

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
## Description
2+
3+
<!-- Provide a clear and concise description of the changes -->
4+
5+
### Type of Change
6+
7+
- [ ] 🐛 Bug fix (non-breaking change which fixes an issue)
8+
- [ ] ✨ New feature (non-breaking change which adds functionality)
9+
- [ ] 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
10+
- [ ] 📝 Documentation update
11+
- [ ] 🎨 Style/formatting change
12+
- [ ] ♻️ Code refactoring
13+
- [ ] ⚡ Performance improvement
14+
- [ ] ✅ Test addition/update
15+
16+
### Related Issues
17+
18+
<!-- Link to related issues: Fixes #123, Closes #456 -->
19+
20+
## Changes Made
21+
22+
<!-- List the key changes made -->
23+
24+
1.
25+
2.
26+
3.
27+
28+
## Testing
29+
30+
### Test Environment
31+
32+
- OS:
33+
- CUDA Version:
34+
- GPU:
35+
36+
### Tests Run
37+
38+
```bash
39+
# Commands used to test
40+
mkdir build && cd build
41+
cmake .. -DCMAKE_BUILD_TYPE=Release
42+
cmake --build . -j$(nproc)
43+
ctest --output-on-failure
44+
```
45+
46+
### Test Results
47+
48+
- [ ] All existing tests pass
49+
- [ ] New tests added for new functionality
50+
- [ ] Manual testing performed
51+
52+
### Performance Impact
53+
54+
<!-- If applicable, describe any performance impact -->
55+
56+
| Metric | Before | After |
57+
|--------|--------|-------|
58+
| FPS (N=100K) | | |
59+
| Memory | | |
60+
61+
## Checklist
62+
63+
- [ ] Code follows the project's style guidelines
64+
- [ ] Code has been self-reviewed
65+
- [ ] Code has been commented, particularly in hard-to-understand areas
66+
- [ ] Corresponding changes to documentation made
67+
- [ ] No new warnings introduced
68+
- [ ] Tests added that prove the fix is effective or feature works
69+
- [ ] New and existing unit tests pass locally
70+
- [ ] Any dependent changes have been merged and published
71+
72+
## Documentation Updates
73+
74+
<!-- List any documentation that needs updating -->
75+
76+
- [ ] README.md
77+
- [ ] CHANGELOG.md
78+
- [ ] docs/
79+
- [ ] API documentation
80+
81+
## Additional Notes
82+
83+
<!-- Add any additional notes or context about the pull request -->
84+
85+
## Screenshots (if applicable)
86+
87+
<!-- Add screenshots to help explain the changes -->

.github/dependabot.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Dependabot configuration
2+
# See: https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
3+
4+
version: 2
5+
updates:
6+
# GitHub Actions
7+
- package-ecosystem: "github-actions"
8+
directory: "/"
9+
schedule:
10+
interval: "weekly"
11+
day: "monday"
12+
time: "06:00"
13+
open-pull-requests-limit: 5
14+
commit-message:
15+
prefix: "ci"
16+
include: "scope"
17+
labels:
18+
- "dependencies"
19+
- "github-actions"
20+
reviewers:
21+
- "LessUp"
22+
23+
# CMake dependencies (manual tracking)
24+
- package-ecosystem: "gitsubmodule"
25+
directory: "/"
26+
schedule:
27+
interval: "monthly"
28+
open-pull-requests-limit: 3
29+
commit-message:
30+
prefix: "build"
31+
labels:
32+
- "dependencies"
33+
- "submodules"

0 commit comments

Comments
 (0)