Skip to content

Commit bfbeadc

Browse files
authored
Merge branch 'master' into master
2 parents 0cedf77 + 695559c commit bfbeadc

File tree

1,481 files changed

+203994
-76091
lines changed

Some content is hidden

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

1,481 files changed

+203994
-76091
lines changed

.clang-tidy

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,15 @@
11
CheckOptions:
2-
- { key: CheckPathRegex, value: ".*/O2/.*" }
32
# Naming conventions
43
- { key: readability-identifier-naming.ClassCase, value: CamelCase }
54
- { key: readability-identifier-naming.ClassMemberPrefix, value: m }
65
- { key: readability-identifier-naming.ConceptCase, value: CamelCase }
76
- { key: readability-identifier-naming.ConstexprVariableCase, value: CamelCase }
8-
- { key: readability-identifier-naming.ConstexprVariableIgnoredRegexp, value: "^k[A-Z].*$" } # Allow "k" prefix.
97
- { key: readability-identifier-naming.EnumCase, value: CamelCase }
108
- { key: readability-identifier-naming.EnumConstantCase, value: CamelCase }
11-
- { key: readability-identifier-naming.EnumConstantIgnoredRegexp, value: "^k[A-Z].*$" } # Allow "k" prefix.
9+
- { key: readability-identifier-naming.EnumConstantIgnoredRegexp, value: "^k?[A-Z][a-zA-Z0-9_]*$" } # Allow "k" prefix and non-trailing underscores in PDG names.
1210
- { key: readability-identifier-naming.FunctionCase, value: camelBack }
1311
- { key: readability-identifier-naming.MacroDefinitionCase, value: UPPER_CASE }
14-
- { key: readability-identifier-naming.MacroDefinitionIgnoredRegexp, value: "^[A-Z]+(_[A-Z]+)*_$" } # Allow the trailing underscore in header guards.
12+
- { key: readability-identifier-naming.MacroDefinitionIgnoredRegexp, value: "^[A-Z][A-Z0-9_]*_$" } # Allow the trailing underscore in header guards.
1513
- { key: readability-identifier-naming.MemberCase, value: camelBack }
1614
- { key: readability-identifier-naming.NamespaceCase, value: lower_case }
1715
- { key: readability-identifier-naming.ParameterCase, value: camelBack }

.github/labeler.yml

Lines changed: 51 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,69 +1,89 @@
11
---
2-
alice3:
2+
infrastructure:
33
- changed-files:
4-
- any-glob-to-any-file: ['ALICE3/**']
4+
- any-glob-to-any-file:
5+
- ".checkov.yml"
6+
- ".clang-format"
7+
- ".clang-tidy"
8+
- ".flake8"
9+
- ".git-blame-ignore-revs"
10+
- ".github/**"
11+
- ".gitignore"
12+
- ".mega-linter.yml"
13+
- ".pre-commit-config.yaml"
14+
- "cmake/**"
15+
- "CMakeLists.txt"
16+
- "CODEOWNERS"
17+
- "COPYING"
18+
- "cppcheck_config"
19+
- "CPPLINT.cfg"
20+
- "dependencies/**"
21+
- "o2linter_config"
22+
- "packaging/**"
23+
- "pyproject.toml"
24+
- "README.md"
525

6-
common:
26+
datamodel:
727
- changed-files:
8-
- any-glob-to-any-file: ['Common/**']
28+
- any-glob-to-any-file: ["DataModel/**", "**/DataModel/**"]
929

10-
infrastructure:
30+
alice3:
1131
- changed-files:
12-
- any-glob-to-any-file:
13-
- '.clang-format'
14-
- '.clang-tidy'
15-
- '.flake8'
16-
- '.github/**'
17-
- '.checkov.yml'
18-
- '.mega-linter.yml'
19-
- '.pre-commit-config.yaml'
20-
- 'cmake/**'
21-
- 'CODEOWNERS'
22-
- 'CPPLINT.cfg'
23-
- 'dependencies/**'
24-
- 'packaging/**'
25-
- 'pyproject.toml'
32+
- any-glob-to-any-file: ["ALICE3/**"]
2633

27-
datamodel:
34+
common:
2835
- changed-files:
29-
- any-glob-to-any-file: ['DataModel/**', '**/DataModel/**']
36+
- any-glob-to-any-file: ["Common/**"]
3037

3138
dpg:
3239
- changed-files:
33-
- any-glob-to-any-file: ['DPG/**']
40+
- any-glob-to-any-file: ["DPG/**"]
3441

3542
pwgcf:
3643
- changed-files:
37-
- any-glob-to-any-file: ['PWGCF/**', '*/PWGCF/**']
44+
- any-glob-to-any-file: ["PWGCF/**", "*/PWGCF/**"]
3845

3946
pwgdq:
4047
- changed-files:
41-
- any-glob-to-any-file: ['PWGDQ/**', '*/PWGDQ/**']
48+
- any-glob-to-any-file: ["PWGDQ/**", "*/PWGDQ/**"]
4249

4350
pwgem:
4451
- changed-files:
45-
- any-glob-to-any-file: ['PWGEM/**', '*/PWGEM/**']
52+
- any-glob-to-any-file: ["PWGEM/**", "*/PWGEM/**"]
4653

4754
pwghf:
4855
- changed-files:
49-
- any-glob-to-any-file: ['PWGHF/**', '*/PWGHF/**']
56+
- any-glob-to-any-file: ["PWGHF/**", "*/PWGHF/**"]
5057

5158
pwgje:
5259
- changed-files:
53-
- any-glob-to-any-file: ['PWGJE/**', '*/PWGJE/**']
60+
- any-glob-to-any-file: ["PWGJE/**", "*/PWGJE/**"]
5461

5562
pwglf:
5663
- changed-files:
57-
- any-glob-to-any-file: ['PWGLF/**', '*/PWGLF/**', 'PWGMM/**', '*/PWGMM/**']
64+
- any-glob-to-any-file:
65+
["PWGLF/**", "*/PWGLF/**", "PWGMM/**", "*/PWGMM/**"]
66+
67+
pwgmm:
68+
- changed-files:
69+
- any-glob-to-any-file: ["PWGMM/**", "*/PWGMM/**"]
5870

5971
pwgud:
6072
- changed-files:
61-
- any-glob-to-any-file: ['PWGUD/**', '*/PWGUD/**']
73+
- any-glob-to-any-file: ["PWGUD/**", "*/PWGUD/**"]
74+
75+
scripts:
76+
- changed-files:
77+
- any-glob-to-any-file: ["Scripts/**"]
78+
79+
tools:
80+
- changed-files:
81+
- any-glob-to-any-file: ["Tools/**"]
6282

6383
trigger:
6484
- changed-files:
65-
- any-glob-to-any-file: ['EventFiltering/**']
85+
- any-glob-to-any-file: ["EventFiltering/**"]
6686

6787
tutorial:
6888
- changed-files:
69-
- any-glob-to-any-file: ['Tutorials/**']
89+
- any-glob-to-any-file: ["Tutorials/**"]

.github/workflows/labeler.yml

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -41,73 +41,73 @@ jobs:
4141
labels = os.environ['labels']
4242
tags = {
4343
"infrastructure": "Infrastructure",
44+
"scripts": "Scripts",
45+
"tools": "Tools",
4446
"common": "Common",
47+
"trigger": "Trigger",
48+
"dpg": "DPG",
49+
"tutorial": "Tutorial",
4550
"alice3": "ALICE3",
4651
"pwgcf": "PWGCF",
4752
"pwgdq": "PWGDQ",
4853
"pwgem": "PWGEM",
4954
"pwghf": "PWGHF",
5055
"pwgje": "PWGJE",
5156
"pwglf": "PWGLF",
57+
"pwgmm": "PWGMM",
5258
"pwgud": "PWGUD",
53-
"dpg": "DPG",
54-
"trigger": "Trigger",
55-
"tutorial": "Tutorial",
5659
}
5760
print(f'PR title: "{title}"')
5861
print(f'PR labels: "{labels}"')
5962
tags_relevant = [tags[label] for label in tags if label in labels.split(",")]
6063
print("Relevant title tags:", ",".join(tags_relevant))
61-
passed = True
62-
prefix_good = ",".join(tags_relevant)
63-
prefix_good = f"[{prefix_good}] "
64-
print(f"Generated prefix: {prefix_good}")
65-
replace_title = 0
66-
title_new = title
64+
prefix_generated = ",".join(tags_relevant)
65+
prefix_generated = f"[{prefix_generated}] "
66+
print(f"Generated prefix: {prefix_generated}")
67+
found_tags = False
68+
title_new = title.strip()
6769
# If there is a prefix which contains a known tag, check it for correct tags, and reformat it if needed.
6870
# If there is a prefix which does not contain any known tag, add the tag prefix.
6971
# If there is no prefix, add the tag prefix.
70-
if match := re.match(r"\[?(\w[\w, /\+-]+)[\]:]+ ", title):
72+
if match := re.match(r" *\[?(\w[\w,/\+\- ]+)[\]: ]+ ", title):
7173
prefix_title = match.group(1)
7274
words_prefix_title = prefix_title.replace(",", " ").replace("/", " ").split()
73-
title_stripped = title[len(match.group()) :]
75+
title_stripped = title[len(match.group()) :].strip()
7476
print(f'PR title prefix: "{prefix_title}" -> tags: {words_prefix_title}')
7577
print(f'Stripped PR title: "{title_stripped}"')
7678
if any(tag in words_prefix_title for tag in tags.values()):
79+
found_tags = True
80+
passed = True
7781
for tag in tags.values():
7882
if tag in tags_relevant and tag not in words_prefix_title:
7983
print(f'::error::Relevant tag "{tag}" not found in the prefix of the PR title.')
8084
passed = False
8185
if tag not in tags_relevant and tag in words_prefix_title:
8286
print(f'::error::Irrelevant tag "{tag}" found in the prefix of the PR title.')
8387
passed = False
84-
# Format a valid prefix.
85-
if passed:
86-
prefix_good = ",".join(w for w in prefix_title.replace(",", " ").split() if w)
87-
prefix_good = f"[{prefix_good}] "
88-
print(f"::notice::Reformatted prefix: {prefix_good}")
89-
if match.group() != prefix_good:
90-
replace_title = 1
91-
title_new = prefix_good + title_stripped
88+
if not passed:
89+
print("::error::Problems were found in the PR title prefix.")
90+
print('::notice::Use the form "tags: title" or "[tags] title".')
91+
sys.exit(1)
92+
# Form a valid title with the existing prefix.
93+
prefix_good = ",".join(w for w in prefix_title.replace(",", " ").split() if w)
94+
prefix_good = f"[{prefix_good}] "
95+
print(f'::notice::Reformatted prefix: "{prefix_good}"')
96+
title_new = prefix_good + title_stripped
9297
else:
9398
print("::warning::No known tags found in the prefix.")
94-
if tags_relevant:
95-
replace_title = 1
96-
title_new = prefix_good + title
99+
title_new = " ".join((*match.group().split(), title_stripped))
97100
else:
98101
print("::warning::No valid prefix found in the PR title.")
99-
if tags_relevant:
100-
replace_title = 1
101-
title_new = prefix_good + title
102-
if not passed:
103-
print("::error::Problems were found in the PR title prefix.")
104-
print('::notice::Use the form "tags: title" or "[tags] title".')
105-
sys.exit(1)
106-
if replace_title:
107-
print("::warning::The PR title prefix with tags needs to be added or adjusted.")
108-
print(f'::warning::New title: "{title_new}".')
102+
if not found_tags and tags_relevant:
103+
title_new = prefix_generated + title_new.strip()
104+
replace_title = 0
105+
if title_new == title:
106+
print("::notice::The PR title is fine.")
109107
else:
110-
print("::notice::The PR title prefix is fine.")
108+
replace_title = 1
109+
print("::warning::The PR title needs to be adjusted.")
110+
print(f'::warning::New title: "{title_new}".')
111111
with open(os.environ["GITHUB_OUTPUT"], "a", encoding="utf-8") as fh:
112112
print(f"replace={replace_title}", file=fh)
113113
print(f"title={title_new}", file=fh)

.github/workflows/mega-linter.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
steps:
2424
# Git Checkout
2525
- name: Checkout Code
26-
uses: actions/checkout@v5
26+
uses: actions/checkout@v6
2727
with:
2828
# Checkout the HEAD of the PR instead of the merge commit.
2929
ref: ${{ github.event.pull_request.head.sha }}
@@ -38,7 +38,7 @@ jobs:
3838
id: ml
3939
# You can override MegaLinter flavor used to have faster performances
4040
# More info at https://megalinter.io/flavors/
41-
uses: oxsecurity/megalinter@v9.0.1
41+
uses: oxsecurity/megalinter@v9.3.0
4242
env:
4343
# All available variables are described in documentation:
4444
# https://megalinter.io/configuration/
@@ -49,7 +49,7 @@ jobs:
4949

5050
# Upload MegaLinter artifacts
5151
- name: Archive production artifacts
52-
uses: actions/upload-artifact@v4
52+
uses: actions/upload-artifact@v5
5353
if: success() || failure()
5454
with:
5555
name: MegaLinter reports

.github/workflows/o2-linter.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Find issues in O2 code
33
name: O2 linter
44

5-
"on": [pull_request_target, push]
5+
#"on": [pull_request_target, push]
66
permissions: {}
77
env:
88
BRANCH_MAIN: master
@@ -30,7 +30,7 @@ jobs:
3030
echo BRANCH_HEAD="$branch_head" >> "$GITHUB_ENV"
3131
echo BRANCH_BASE="$branch_base" >> "$GITHUB_ENV"
3232
- name: Checkout Code
33-
uses: actions/checkout@v5
33+
uses: actions/checkout@v6
3434
with:
3535
ref: ${{ env.BRANCH_HEAD }}
3636
fetch-depth: 0 # needed to get the full history
@@ -47,6 +47,8 @@ jobs:
4747
fi
4848
echo "linter_ran=1" >> "$GITHUB_OUTPUT"
4949
[[ "${{ github.event_name }}" == "pull_request_target" ]] && options="-g"
50+
# Checkout the script from the base branch to prevent execution of arbitrary code in the head branch.
51+
git checkout ${{ env.BRANCH_BASE }} -- Scripts/o2_linter.py
5052
# shellcheck disable=SC2086 # Ignore unquoted options.
5153
python3 Scripts/o2_linter.py $options "${files[@]}"
5254
echo "Tip: If you allow actions in your fork repository, O2 linter will run when you push commits."

.github/workflows/stale.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ jobs:
1717
with:
1818
repo-token: ${{ secrets.GITHUB_TOKEN }}
1919
stale-pr-message: 'This PR has not been updated in the last 30 days. Is it still needed? Unless further action is taken, it will be closed in 5 days.'
20+
stale-issue-message: 'This issue has not been updated in the last 30 days. Is it still needed? Unless further action is taken, it will be closed in 5 days.'
2021
stale-pr-label: stale
2122
days-before-stale: 30
2223
days-before-close: 5
24+
exempt-issue-labels: bug,enhancement

.mega-linter.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,5 +39,6 @@ PYTHON_PYRIGHT_CONFIG_FILE: pyproject.toml
3939
PYTHON_RUFF_CONFIG_FILE: pyproject.toml
4040
CPP_CPPLINT_FILE_EXTENSIONS: [".C", ".c", ".c++", ".cc", ".cl", ".cpp", ".cu", ".cuh", ".cxx", ".cxx.in", ".h", ".h++", ".hh", ".h.in", ".hpp", ".hxx", ".inc", ".inl", ".macro"]
4141
CPP_CLANG_FORMAT_FILE_EXTENSIONS: [".C", ".c", ".c++", ".cc", ".cl", ".cpp", ".cu", ".cuh", ".cxx", ".cxx.in", ".h", ".h++", ".hh", ".h.in", ".hpp", ".hxx", ".inc", ".inl", ".macro"]
42+
CPP_CPPCHECK_FILE_EXTENSIONS: [".C", ".c", ".c++", ".cc", ".cl", ".cpp", ".cu", ".cuh", ".cxx", ".cxx.in", ".h", ".h++", ".hh", ".h.in", ".hpp", ".hxx", ".inc", ".inl", ".macro"]
4243
CPP_CPPCHECK_ARGUMENTS: --language=c++ --std=c++20 --check-level=exhaustive --suppressions-list=cppcheck_config
4344
REPOSITORY_GITLEAKS_PR_COMMITS_SCAN: true

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
# See https://pre-commit.com/hooks.html for more hooks
33
repos:
44
- repo: https://github.com/pre-commit/pre-commit-hooks
5-
rev: v5.0.0
5+
rev: v6.0.0
66
hooks:
77
- id: trailing-whitespace
88
- id: end-of-file-fixer
99
- repo: https://github.com/pre-commit/mirrors-clang-format
10-
rev: v20.1.5 # clang-format version
10+
rev: v21.1.8 # clang-format version
1111
hooks:
1212
- id: clang-format
1313
- repo: https://github.com/cpplint/cpplint

ALICE3/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ add_subdirectory(Core)
1414
# add_subdirectory(DataModel)
1515
add_subdirectory(Tasks)
1616
add_subdirectory(TableProducer)
17-
# add_subdirectory(Tools)
17+
add_subdirectory(Macros)

0 commit comments

Comments
 (0)