Skip to content

Commit 5c2c03f

Browse files
committed
refactor: comprehensive documentation optimization and workflow fixes
## Documentation Structure - Move CLAUDE.md to docs/developers/claude-guide.md (standardized location) - Move package.json, package-lock.json, book.json to docs/ subdirectory - Delete DOCS.md (content consolidated into README.md) - Add FAQ and troubleshooting guides (en/zh bilingual) - Update gitbook-sync.md to reference README.md instead of deleted DOCS.md ## Workflow Fixes - Fix all workflow branch references from 'main' to 'master' - Update pages.yml sparse-checkout (remove DOCS.md, add npm cache path) - Validate all YAML syntax passes ## Changelog Improvements - Rename changelog files with consistent naming (YYYY-MM-DD-description.md) - Add changelog/README.md with organized index - Add CHANGELOG.md at root for quick reference - Add 2026-04-15_readme-refactor-completion.md entry ## Example Modules - Standardize all 5 example module READMEs with consistent format - Add badges, contents tables, key concepts, and further reading ## Project Files - Add .editorconfig for consistent coding style - Add GitHub templates (issues, PR, security, code of conduct) - Add scripts/ directory with build, test, format, setup helpers - Reorganize tools/ to tools/performance/ - Update .gitignore with additional patterns ## Verification - All SUMMARY.md links validated - All workflow YAML syntax validated - Bilingual docs (en/zh) synchronized
1 parent 0606c65 commit 5c2c03f

54 files changed

Lines changed: 2270 additions & 192 deletions

Some content is hidden

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

.editorconfig

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# EditorConfig for C++ High Performance Guide
2+
# https://editorconfig.org
3+
4+
root = true
5+
6+
[*]
7+
charset = utf-8
8+
end_of_line = lf
9+
insert_final_newline = true
10+
trim_trailing_whitespace = true
11+
12+
# C++ source files
13+
[*.{cpp,hpp,h}]
14+
indent_style = space
15+
indent_size = 4
16+
max_line_length = 100
17+
18+
# CMake files
19+
[{CMakeLists.txt,*.cmake}]
20+
indent_style = space
21+
indent_size = 4
22+
23+
# YAML and JSON files
24+
[*.{yml,yaml,json}]
25+
indent_style = space
26+
indent_size = 2
27+
28+
# Python and shell scripts
29+
[*.{py,sh}]
30+
indent_style = space
31+
indent_size = 4
32+
33+
# Markdown files
34+
[*.md]
35+
trim_trailing_whitespace = false
36+
max_line_length = 80
37+
38+
# Makefile
39+
[Makefile]
40+
indent_style = tab

.gitbook.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
root: ./
22
structure:
3-
readme: DOCS.md
3+
readme: README.md
44
summary: SUMMARY.md

.github/CODE_OF_CONDUCT.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Code of Conduct
2+
3+
## Our Pledge
4+
5+
We as members, contributors, and leaders pledge to make participation in our
6+
community a harassment-free experience for everyone, regardless of age, body
7+
size, visible or invisible disability, ethnicity, sex characteristics, gender
8+
identity and expression, level of experience, education, socio-economic status,
9+
nationality, personal appearance, race, religion, or sexual identity and
10+
orientation.
11+
12+
## Our Standards
13+
14+
Examples of behavior that contributes to a positive environment:
15+
16+
* Using welcoming and inclusive language
17+
* Being respectful of differing viewpoints and experiences
18+
* Gracefully accepting constructive criticism
19+
* Focusing on what is best for the community
20+
* Showing empathy towards other community members
21+
22+
Examples of unacceptable behavior:
23+
24+
* The use of sexualized language or imagery
25+
* Trolling, insulting/derogatory comments, and personal attacks
26+
* Public or private harassment
27+
* Publishing others' private information without permission
28+
* Other conduct which could reasonably be considered inappropriate
29+
30+
## Enforcement
31+
32+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
33+
reported to the community leaders responsible for enforcement at the project
34+
repository.
35+
36+
All complaints will be reviewed and investigated promptly and fairly.
37+
38+
## Scope
39+
40+
This Code of Conduct applies within all community spaces, and also applies when
41+
an individual is officially representing the community in public spaces.
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Bug Report
2+
about: Create a report to help us improve
3+
title: "[Bug] "
4+
labels: [bug]
5+
body:
6+
- type: textarea
7+
id: description
8+
attributes:
9+
label: Description
10+
description: A clear description of the bug
11+
validations:
12+
required: true
13+
14+
- type: textarea
15+
id: reproduce
16+
attributes:
17+
label: Steps to Reproduce
18+
description: Steps to reproduce the behavior
19+
validations:
20+
required: true
21+
22+
- type: input
23+
id: os
24+
attributes:
25+
label: Operating System
26+
placeholder: "e.g., Ubuntu 22.04"
27+
28+
- type: input
29+
id: compiler
30+
attributes:
31+
label: Compiler
32+
placeholder: "e.g., GCC 11.4"
33+
34+
- type: textarea
35+
id: logs
36+
attributes:
37+
label: Logs
38+
description: Relevant log output
39+
render: shell
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Documentation Improvement
2+
title: "[Docs] "
3+
labels: [documentation]
4+
body:
5+
- type: textarea
6+
id: description
7+
attributes:
8+
label: Description
9+
description: Describe the documentation issue or improvement
10+
validations:
11+
required: true
12+
13+
- type: input
14+
id: location
15+
attributes:
16+
label: Location
17+
description: Which file or section?
18+
19+
- type: textarea
20+
id: suggestion
21+
attributes:
22+
label: Suggested Improvement
23+
description: How should it be improved?
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Feature Request
2+
about: Suggest an idea for this project
3+
title: "[Feature] "
4+
labels: [enhancement]
5+
body:
6+
- type: textarea
7+
id: description
8+
attributes:
9+
label: Description
10+
description: Describe the feature you'd like
11+
validations:
12+
required: true
13+
14+
- type: textarea
15+
id: motivation
16+
attributes:
17+
label: Motivation
18+
description: Why is this feature needed?
19+
20+
- type: textarea
21+
id: alternatives
22+
attributes:
23+
label: Alternatives
24+
description: Any alternative solutions you've considered

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# Pull Request
2+
3+
## Description
4+
5+
Brief description of what this PR adds or fixes.
6+
7+
## Type of Change
8+
9+
- [ ] Bug fix (non-breaking change which fixes an issue)
10+
- [ ] New feature/example (non-breaking change which adds functionality)
11+
- [ ] Documentation update
12+
- [ ] Performance improvement
13+
- [ ] Code refactoring
14+
- [ ] Build/CI improvement
15+
16+
## Checklist
17+
18+
- [ ] My code follows the project's coding style (`.clang-format`)
19+
- [ ] I have tested my changes locally:
20+
- [ ] Debug build: `cmake --preset=debug && cmake --build build/debug && ctest --preset=debug`
21+
- [ ] Release build: `cmake --preset=release && cmake --build build/release && ctest --preset=release`
22+
- [ ] For code changes, I have run sanitizers:
23+
- [ ] AddressSanitizer: `cmake --preset=asan && cmake --build build/asan && ctest --preset=asan`
24+
- [ ] ThreadSanitizer (for concurrency code): `cmake --preset=tsan && cmake --build build/tsan && ctest --preset=tsan`
25+
- [ ] UndefinedBehaviorSanitizer: `cmake --preset=ubsan && cmake --build build/ubsan && ctest --preset=ubsan`
26+
- [ ] I have updated the documentation accordingly (if applicable)
27+
- [ ] Both English and Chinese documentation are updated (if applicable)
28+
- [ ] My changes generate no new warnings
29+
- [ ] I have added tests that prove my fix is effective or that my feature works (if applicable)
30+
31+
## Testing Notes
32+
33+
Describe how you tested your changes:
34+
35+
- Build presets tested:
36+
- Benchmark results (if applicable):
37+
- Platform/compiler:
38+
39+
## Related Issues
40+
41+
Fixes #(issue number)
42+
Related to #(issue number)
43+
44+
## Screenshots (if applicable)
45+
46+
Add screenshots to help explain your changes.
47+
48+
---
49+
50+
**Thank you for contributing to C++ High Performance Guide! 🚀**

.github/SECURITY.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Security Policy
2+
3+
## Supported Versions
4+
5+
| Version | Supported |
6+
| ------- | ------------------ |
7+
| 1.0.x | :white_check_mark: |
8+
9+
## Reporting a Vulnerability
10+
11+
If you discover a security vulnerability in this project, please report it by
12+
creating a private security advisory through GitHub.
13+
14+
We will respond to security reports within 48 hours and aim to release patches
15+
within 7 days for confirmed vulnerabilities.
16+
17+
## Security Considerations
18+
19+
This is an educational project focused on C++ performance optimization.
20+
The code examples are intended for learning purposes and may not include
21+
all production-ready security considerations.

.github/workflows/benchmark.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ name: Benchmark
22

33
on:
44
push:
5-
branches: [ main ]
5+
branches: [ master ]
66
pull_request:
7-
branches: [ main ]
7+
branches: [ master ]
88

99
permissions:
1010
contents: read
@@ -70,7 +70,7 @@ jobs:
7070
uses: dawidd6/action-download-artifact@v3
7171
with:
7272
workflow: benchmark.yml
73-
branch: main
73+
branch: master
7474
name: benchmark-results
7575
path: baseline/
7676
continue-on-error: true
@@ -79,7 +79,7 @@ jobs:
7979
if: github.event_name == 'pull_request'
8080
run: |
8181
if [ -f baseline/memory_bench.json ] && [ -f memory_bench.json ]; then
82-
python3 tools/analysis/benchmark_compare.py \
82+
python3 tools/performance/benchmark_compare.py \
8383
baseline/memory_bench.json \
8484
memory_bench.json \
8585
--report memory_comparison.md \
@@ -94,7 +94,7 @@ jobs:
9494
benchmark-matrix:
9595
name: Benchmark on ${{ matrix.os }}
9696
runs-on: ${{ matrix.os }}
97-
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
97+
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
9898

9999
strategy:
100100
matrix:

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ name: Build and Test
22

33
on:
44
push:
5-
branches: [ main, develop ]
5+
branches: [ master, develop ]
66
pull_request:
7-
branches: [ main ]
7+
branches: [ master ]
88

99
env:
1010
BUILD_TYPE: Release

0 commit comments

Comments
 (0)