Skip to content

Commit 7b79905

Browse files
authored
Initial commit
0 parents  commit 7b79905

Some content is hidden

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

83 files changed

+9862
-0
lines changed

Diff for: .clang-format

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
Language: Cpp
2+
AccessModifierOffset: -4
3+
AlignAfterOpenBracket: true
4+
AlignEscapedNewlinesLeft: true
5+
AlignTrailingComments: true
6+
AllowAllParametersOfDeclarationOnNextLine: true
7+
AllowShortBlocksOnASingleLine: false
8+
AllowShortCaseLabelsOnASingleLine: true
9+
AllowShortFunctionsOnASingleLine: All
10+
AllowShortIfStatementsOnASingleLine: true
11+
AllowShortLoopsOnASingleLine: false
12+
AlwaysBreakBeforeMultilineStrings: false
13+
AlwaysBreakTemplateDeclarations: true
14+
BinPackArguments: true
15+
BinPackParameters: true
16+
BreakBeforeBinaryOperators: false
17+
BreakBeforeBraces: Custom
18+
BraceWrapping:
19+
AfterClass: true
20+
AfterFunction: true
21+
BreakBeforeTernaryOperators: false
22+
BreakConstructorInitializersBeforeComma: false
23+
ColumnLimit: 0
24+
CommentPragmas: '^ IWYU pragma:'
25+
ConstructorInitializerAllOnOneLineOrOnePerLine: false
26+
ConstructorInitializerIndentWidth: 4
27+
ContinuationIndentWidth: 4
28+
Cpp11BracedListStyle: true
29+
DerivePointerAlignment: false
30+
DisableFormat: false
31+
IndentCaseLabels: false
32+
IndentFunctionDeclarationAfterType: false
33+
IndentWidth: 4
34+
KeepEmptyLinesAtTheStartOfBlocks: false
35+
MaxEmptyLinesToKeep: 2
36+
NamespaceIndentation: None
37+
PointerAlignment: Left
38+
SpaceBeforeAssignmentOperators: true
39+
SpaceBeforeParens: ControlStatements
40+
SpaceInEmptyParentheses: false
41+
SpacesBeforeTrailingComments: 1
42+
SpacesInAngles: false
43+
SpacesInContainerLiterals: true
44+
SpacesInCStyleCastParentheses: false
45+
SpacesInParentheses: false
46+
Standard: c++17
47+
UseTab: Never

Diff for: .clang-tidy

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Checks: '-*,bugprone-argument-comment'
2+
WarningsAsErrors: bugprone-argument-comment

Diff for: .gitattributes

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Auto detect text files and perform LF normalization
2+
* text=auto

Diff for: .github/workflows/sync-from-template.yml

+114
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
---
2+
#
3+
# - Run this workflow to pull changes from the template repository.
4+
#
5+
# - Clone this repository. Check out a branch
6+
# - Copy files from the template onto this clone
7+
# - Push the branch to this repository
8+
# - Create a pull request in this repository
9+
#
10+
11+
name: Sync changes from template project.
12+
13+
on:
14+
# cronjob trigger
15+
schedule:
16+
- cron: "17 5 * * 5"
17+
18+
# Run when this file changes
19+
push:
20+
paths:
21+
- .github/workflows/sync-from-template.yml
22+
23+
# Run when manually triggered
24+
workflow_dispatch:
25+
26+
env:
27+
BASE_BRANCH: main
28+
HEAD_BRANCH: chore/sync-from-template
29+
GIT_AUTHOR_NAME: ${{ github.repository_owner }}
30+
GIT_AUTHOR_EMAIL: ${{ github.repository_owner }}@users.noreply.github.com
31+
REPO_TEMPLATE: KambizAsadzadeh/Project-Template
32+
THIS_REPO: ${{ github.repository }}
33+
34+
jobs:
35+
sync-from-template:
36+
# Do not run on the template repository itself
37+
if: github.repository != 'KambizAsadzadeh/Project-Template'
38+
name: Sync changes from KambizAsadzadeh/Project-Template
39+
runs-on: ubuntu-latest
40+
continue-on-error: true
41+
42+
steps:
43+
# Clone the template repository
44+
- name: Check out template repository
45+
uses: actions/checkout@v2
46+
with:
47+
repository: ${{ env.REPO_TEMPLATE }}
48+
token: ${{ github.token }}
49+
path: ${{ env.REPO_TEMPLATE }}
50+
51+
# Clone the target repository. Check out a branch
52+
- name: Check out ${{ github.repository }}
53+
uses: actions/checkout@v2
54+
with:
55+
repository: ${{ github.repository }}
56+
token: ${{ github.token }}
57+
path: ${{ github.repository }}
58+
- name: Create branch in ${{ env.THIS_REPO }}
59+
run: |
60+
git -C "${THIS_REPO}" fetch origin "${HEAD_BRANCH}" || true
61+
git -C "${THIS_REPO}" branch -a
62+
git -C "${THIS_REPO}" checkout -B "${HEAD_BRANCH}" \
63+
"remotes/origin/${HEAD_BRANCH}" || \
64+
git -C "${THIS_REPO}" checkout -b "${HEAD_BRANCH}"
65+
66+
# Copy files from the template onto the target clone
67+
- name: Copy template contents
68+
run: |
69+
_files="$(find ${REPO_TEMPLATE} \
70+
! -path "*/.git/*" \
71+
! -path "*/.github/workflows/*" \
72+
! -name ".gitignore" \
73+
! -name "README.md" \
74+
-type f \
75+
-print)"
76+
for _file in ${_files}; do
77+
_src="${_file}"
78+
_dst="${THIS_REPO}/${_file#${REPO_TEMPLATE}/}"
79+
# TODO: Find a more robust / elegant way to get this :point_down:
80+
_dst="${_dst%/*}/"
81+
mkdir -p "${_dst}"
82+
echo "INFO: Copy '${_src}' to '${_dst}'."
83+
cp "${_src}" "${_dst}"
84+
done
85+
git -C "${THIS_REPO}" diff
86+
87+
# Commit changes, if there are any
88+
- name: Commit changes, if any
89+
run: |
90+
git -C ${THIS_REPO} config user.name "${GIT_AUTHOR_NAME}"
91+
git -C ${THIS_REPO} config \
92+
user.email "${GIT_AUTHOR_EMAIL}"
93+
git -C ${THIS_REPO} add .
94+
git -C ${THIS_REPO} commit \
95+
-m "Sync from template@${{ github.sha }}"
96+
97+
# Push the branch to the target repository
98+
- name: Push topic branch
99+
run: git -C ${THIS_REPO} push -u origin "${HEAD_BRANCH}"
100+
101+
# Create a pull request in the target repository
102+
- name: Create pull request
103+
env:
104+
GITHUB_TOKEN: ${{ github.token }}
105+
GITHUB_USER: ${{ github.actor }}
106+
run: |
107+
pushd ${THIS_REPO}
108+
hub pull-request \
109+
-b "${BASE_BRANCH}" \
110+
-h "${HEAD_BRANCH}" \
111+
--no-edit \
112+
-m "Pull updates from ${REPO_TEMPLATE}" \
113+
-m "Pull updates from ${REPO_TEMPLATE}"
114+
popd

Diff for: .gitignore

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Prerequisites
2+
*.d
3+
4+
# Compiled Object files
5+
*.slo
6+
*.lo
7+
*.o
8+
*.obj
9+
10+
# Precompiled Headers
11+
*.gch
12+
*.pch
13+
14+
# Compiled Dynamic libraries
15+
*.so
16+
*.dylib
17+
*.dll
18+
19+
# Fortran module files
20+
*.mod
21+
*.smod
22+
23+
# Compiled Static libraries
24+
*.lai
25+
*.la
26+
*.a
27+
*.lib
28+
29+
# Executables
30+
*.exe
31+
*.out
32+
*.app
33+
34+
#Extra
35+
.DS_Store
36+
37+
# Final Output
38+
build/ProjectTemplate

Diff for: .idea/Project-Template.iml

+2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: .idea/misc.xml

+4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: .idea/modules.xml

+8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: CITATION.md

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
cff-version: 1.2.0
2+
message: "If you use this software, please cite it as below."
3+
authors:
4+
- family-names: "Asadzadeh"
5+
given-names: "Kambiz"
6+
orcid: "https://orcid.org/0009-0009-2065-3977"
7+
title: "PT"
8+
version: 1.1.222
9+
date-released: 2023-04-25
10+
url: "https://kambizasadzadeh.com"
11+
repository-code: "https://github.com/genyleap/Project-Template"

0 commit comments

Comments
 (0)