Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

24m05a #27

Merged
merged 28 commits into from
May 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
985c182
update not finished
AstroAir May 1, 2024
8092221
big update
AstroAir May 3, 2024
8a700d9
sync pocketpy
AstroAir May 3, 2024
89fc571
update not finished
AstroAir May 11, 2024
c051c3c
update not finished and a big problem
AstroAir May 11, 2024
77447e8
update lithium image module not finished
AstroAir May 12, 2024
b20d341
big update not finished
AstroAir May 15, 2024
7f84af8
fixed compile bugs but linking problem still exists
AstroAir May 15, 2024
9eb0c4e
fix linking bugs
AstroAir May 16, 2024
35790fd
update pre
AstroAir May 17, 2024
41db1ac
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] May 17, 2024
da977bc
update not finished
AstroAir May 18, 2024
f5d47af
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] May 18, 2024
f11493c
update lithium image module
AstroAir May 19, 2024
7155b84
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] May 20, 2024
d237692
for precommit
AstroAir May 21, 2024
814dc97
update atom-type
AstroAir May 21, 2024
fdfcdcb
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] May 21, 2024
0d604c5
atom-core update
AstroAir May 23, 2024
31fa182
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] May 23, 2024
a121f64
update atom-connection
AstroAir May 24, 2024
b90e539
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] May 24, 2024
20364ad
update atom-function and atom-component
AstroAir May 25, 2024
3c5efc0
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] May 25, 2024
7c26c0d
update atom-function
AstroAir May 26, 2024
93eeb5f
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] May 26, 2024
5d69ebc
move tools to lithium.cxxtools
AstroAir May 26, 2024
0afe5c2
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] May 26, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
68 changes: 33 additions & 35 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
---
Language: Cpp
Language: Cpp
# BasedOnStyle: Google
AccessModifierOffset: -4
AlignAfterOpenBracket: Align
AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: false
AlignEscapedNewlinesLeft: true
AlignOperands: true
AlignOperands: true
AlignTrailingComments: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortBlocksOnASingleLine: false
Expand All @@ -20,50 +20,50 @@ AlwaysBreakBeforeMultilineStrings: true
AlwaysBreakTemplateDeclarations: true
BinPackArguments: true
BinPackParameters: true
BraceWrapping:
AfterClass: false
BraceWrapping:
AfterClass: false
AfterControlStatement: false
AfterEnum: false
AfterFunction: false
AfterNamespace: false
AfterEnum: false
AfterFunction: false
AfterNamespace: false
AfterObjCDeclaration: false
AfterStruct: false
AfterUnion: false
BeforeCatch: false
BeforeElse: false
IndentBraces: false
AfterStruct: false
AfterUnion: false
BeforeCatch: false
BeforeElse: false
IndentBraces: false
BreakBeforeBinaryOperators: None
BreakBeforeBraces: Attach
BreakBeforeTernaryOperators: true
BreakConstructorInitializersBeforeComma: false
BreakAfterJavaFieldAnnotations: false
BreakStringLiterals: true
ColumnLimit: 80
CommentPragmas: '^ IWYU pragma:'
ColumnLimit: 80
CommentPragmas: "^ IWYU pragma:"
ConstructorInitializerAllOnOneLineOrOnePerLine: true
ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 4
Cpp11BracedListStyle: true
DerivePointerAlignment: true
DisableFormat: false
DisableFormat: false
ExperimentalAutoDetectBinPacking: false
ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ]
IncludeCategories:
- Regex: '^<.*\.h>'
Priority: 1
- Regex: '^<.*'
Priority: 2
- Regex: '.*'
Priority: 3
IncludeIsMainRegex: '([-_](test|unittest))?$'
ForEachMacros: [foreach, Q_FOREACH, BOOST_FOREACH]
IncludeCategories:
- Regex: '^<.*\.h>'
Priority: 1
- Regex: "^<.*"
Priority: 2
- Regex: ".*"
Priority: 3
IncludeIsMainRegex: "([-_](test|unittest))?$"
IndentCaseLabels: true
IndentWidth: 4
IndentWidth: 4
IndentWrappedFunctionNames: false
JavaScriptQuotes: Leave
JavaScriptWrapImports: true
KeepEmptyLinesAtTheStartOfBlocks: false
MacroBlockBegin: ''
MacroBlockEnd: ''
MacroBlockBegin: ""
MacroBlockEnd: ""
MaxEmptyLinesToKeep: 1
NamespaceIndentation: None
ObjCBlockIndentWidth: 4
Expand All @@ -76,23 +76,21 @@ PenaltyBreakString: 1000
PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 200
PointerAlignment: Left
ReflowComments: true
SortIncludes: true
ReflowComments: true
SortIncludes: true
SpaceAfterCStyleCast: false
SpaceBeforeAssignmentOperators: true
SpaceBeforeParens: ControlStatements
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 2
SpacesInAngles: false
SpacesInAngles: false
SpacesInContainerLiterals: true
SpacesInCStyleCastParentheses: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
Standard: Auto
TabWidth: 8
UseTab: Never
...

Standard: Auto
TabWidth: 8
UseTab: Never
---
Language: JavaScript
DisableFormat: true
Expand Down
70 changes: 70 additions & 0 deletions .clang-tidy
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
---
Checks: "*, -android-*, -fuchsia-*, -zircon-*, -llvm-*, -google-*, -hicpp-no-assembler, -cppcoreguidelines-*, -llvmlibc-*"
WarningsAsErrors: ""
HeaderFilterRegex: ""
FormatStyle: none
User: ""

CheckOptions:
- key: modernize-use-nullptr.NullMacros
value: "NULL"
- key: readability-identifier-naming.NamespaceCase
value: "aN"
- key: readability-identifier-naming.ClassCase
value: "CamelCase"
- key: readability-identifier-naming.StructCase
value: "CamelCase"
- key: readability-identifier-naming.FunctionCase
value: "camelBack"
- key: readability-identifier-naming.VariableCase
value: "camelBack"
- key: readability-identifier-naming.PrivateMemberSuffix
value: "_"
- key: readability-identifier-naming.PublicMemberCase
value: "camelBack"
- key: readability-identifier-naming.ConstantCase
value: "UPPER_CASE"
- key: readability-identifier-naming.GlobalConstantCase
value: "UPPER_CASE"
- key: readability-braces-around-statements.ShortStatementLines
value: "1"
- key: readability-function-size.LineThreshold
value: "100"
- key: readability-function-size.StatementThreshold
value: "1000"
- key: readability-magic-numbers.IgnoredIntegerValues
value: "1;2;3;4"
- key: readability-magic-numbers.IgnoredFloatingPointValues
value: "1.0;2.0;0.5;0.25"
- key: modernize-loop-convert.MaxCopySize
value: "16"
- key: modernize-make-shared.IncludeStyle
value: '"<memory>"'
- key: modernize-make-unique.IncludeStyle
value: '"<memory>"'
- key: modernize-pass-by-value.IncludeStyle
value: '"<utility>"'
- key: modernize-replace-auto-ptr.IncludeStyle
value: '"<memory>"'
- key: modernize-use-auto.MinTypeNameLength
value: "5"
- key: modernize-use-bool-literals.BoolMacros
value: "TRUE;FALSE"
- key: modernize-use-emplace.ContainersWithPushBack
value: "::std::vector;::std::list;::std::deque"
- key: modernize-use-emplace.SmartPointers
value: "::std::shared_ptr;::std::unique_ptr;::std::auto_ptr"
- key: modernize-use-emplace.TupleMakeFunctions
value: "::std::make_pair;::std::make_tuple"
- key: modernize-use-noexcept.ReplacementString
value: "noexcept"
- key: modernize-use-override.IgnoreDestructors
value: "1"
- key: modernize-use-using.IgnoreMacros
value: "1"
- key: performance-for-range-copy.WarnOnAllAutoCopies
value: "1"
- key: performance-unnecessary-copy-initialization.AllowedTypes
value: "::std::string;::std::vector"
- key: performance-unnecessary-value-param.AllowedTypes
value: "::std::string;::std::vector"
79 changes: 43 additions & 36 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,39 +1,46 @@
# Auto detect text files and perform LF normalization
* text=auto eol=lf

# Images are binary
# 设置默认行为,防止 Git 自动转换换行符
* text=auto

# 确保 C++ 源代码总是使用 LF 结尾
*.cpp text eol=lf
*.h text eol=lf
*.hpp text eol=lf

# 处理 Windows 系统上常见的文件类型
*.bat text eol=crlf

# 忽略对构建生成的文件的 diffs
*.obj binary
*.exe binary
*.dll binary
*.so binary
*.dylib binary
*.bin binary

# 确保 TypeScript 文件使用 LF
*.ts text eol=lf
*.tsx text eol=lf

# 配置样式表和 JSON 文件
*.css text eol=lf
*.scss text eol=lf
*.sass text eol=lf
*.json text eol=lf

# 处理 JavaScript 文件(可能由 TypeScript 编译产生)
*.js text eol=lf
*.jsx text eol=lf

# 图片和二进制文件
*.png binary
*.jpg binary
*.jpeg binary
*.png binary
*.gif binary

# Audio is binary
*.mp3 binary
*.wav binary

# Video is binary
*.mp4 binary

# Fonts are binary
*.ttf binary
*.otf binary

# C++ files
*.cpp text
*.hpp text
*.h text
*.cc text
*.hh text

# C files
*.c text

# Script files
*.py text
*.sh text
*.bat text
*.cmd text

# Documentation files
*.txt text
*.md text
*.webp binary

# 防止 Git 处理压缩文件和文档
*.zip binary
*.tar binary
*.gz binary
*.pdf binary
*.docx binary
36 changes: 21 additions & 15 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,29 +10,35 @@ assignees: ''
**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

**Smartphone (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]
- OS: [e.g. Ubuntu]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

**Additional context**
Add any other context about the problem here.

**描述错误**
清晰简洁地描述遇到的错误。

**预期行为**
清晰简洁地描述你期望发生的行为。

**屏幕截图**
如果适用,请添加屏幕截图以帮助解释你的问题。

**桌面环境(请填写以下信息):**

- 操作系统: [例如 Ubuntu]
- 浏览器: [例如 Chrome,Safari]
- 版本: [例如 22]

**其他信息**
在此处添加有关该问题的任何其他信息。
12 changes: 12 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,15 @@ A clear and concise description of any alternative solutions or features you've

**Additional context**
Add any other context or screenshots about the feature request here.

**您的功能请求是否与某个问题相关?请描述。**
清晰简洁地描述问题是什么。例如:我总是对……感到沮丧。

**描述您想要的解决方案**
清晰简洁地描述你希望发生的事情。

**描述您考虑过的替代方案**
清晰简洁地描述您考虑过的任何替代解决方案或功能。

**其他信息**
在此处添加有关功能请求的任何其他上下文或屏幕截图。
2 changes: 1 addition & 1 deletion .github/workflows/codecov.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
47 changes: 47 additions & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Build
on:
push:
branches:
- master
pull_request:
types: [opened, synchronize, reopened]
jobs:
build:
name: Build
runs-on: ubuntu-latest
env:
BUILD_WRAPPER_OUT_DIR: build_wrapper_output_directory # Directory where build-wrapper output will be placed
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- uses: actions/checkout@v4
- name: Set up Python 3.8 for gcovr
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: install gcovr 5.0
run: |
pip install gcovr==5.0 # 5.1 is not supported
- name: Install sonar-scanner and build-wrapper
uses: SonarSource/sonarcloud-github-c-cpp@v2
- name: Run build-wrapper
run: |
mkdir build
cmake -S . -B build
build-wrapper-linux-x86-64 --out-dir ${{ env.BUILD_WRAPPER_OUT_DIR }} cmake --build build/ --config Release
- name: Run tests to generate coverage statistics
run: |
./build/coverage_test1
./build/coverage_test2
- name: Collect coverage into one XML report
run: |
gcovr --sonarqube > coverage.xml
- name: Run sonar-scanner
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONARCLOUD_TOKEN }} # Put the name of your token here
run: |
sonar-scanner \
--define sonar.cfamily.compile-commands="${{ env.BUILD_WRAPPER_OUT_DIR }}/compile_commands.json" \
--define sonar.coverageReportPaths=coverage.xml
Loading
Loading