Skip to content

Commit 5e361d8

Browse files
Merge branch 'AliceO2Group:master' into master
2 parents a7c12ef + fa73d91 commit 5e361d8

File tree

1,304 files changed

+315936
-99712
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,304 files changed

+315936
-99712
lines changed

.checkov.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
# You can see all available properties here: https://github.com/bridgecrewio/checkov#configuration-using-a-config-file
3+
quiet: true
4+
skip-check:
5+
- CKV_DOCKER_2
6+
- CKV_GHA_7

.clang-format

Lines changed: 54 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,60 @@ PenaltyBreakFirstLessLess: 120
3939
PenaltyBreakString: 1000
4040
PenaltyExcessCharacter: 1000000
4141
PenaltyReturnTypeOnItsOwnLine: 200
42-
SortIncludes: false
42+
SortIncludes: CaseSensitive
43+
IncludeBlocks: Regroup
44+
IncludeCategories:
45+
# O2Physics, PWG
46+
- Regex: ^(<|")PWG[A-Z]{2}/.*\.h
47+
Priority: 2
48+
CaseSensitive: true
49+
# O2Physics, non-PWG
50+
- Regex: ^(<|")(Common|ALICE3|DPG|EventFiltering|Tools|Tutorials)/.*\.h
51+
Priority: 3
52+
CaseSensitive: true
53+
# O2
54+
- Regex: ^(<|")(Algorithm|CCDB|Common[A-Z]|DataFormats|DCAFitter|Detectors|EMCAL|Field|Framework|FT0|FV0|GlobalTracking|ITS|MathUtils|MFT|MCH|MID|PHOS|PID|ReconstructionDataFormats|SimulationDataFormat|TOF|TPC|ZDC).*/.*\.h
55+
Priority: 4
56+
CaseSensitive: true
57+
# ROOT
58+
- Regex: ^(<|")(T[A-Z]|Math/|Roo[A-Z])[[:alnum:]/]+\.h
59+
Priority: 5
60+
CaseSensitive: true
61+
# known third-party: KFParticle
62+
- Regex: ^(<|")KF[A-Z][[:alnum:]]+\.h
63+
Priority: 6
64+
CaseSensitive: true
65+
# known third-party: FastJet
66+
- Regex: ^(<|")fastjet/
67+
Priority: 6
68+
CaseSensitive: true
69+
# known third-party: ONNX runtime
70+
- Regex: ^(<|")onnxruntime
71+
Priority: 6
72+
CaseSensitive: true
73+
# incomplete path to DataModel
74+
- Regex: ^(<|").*DataModel/
75+
Priority: 1
76+
CaseSensitive: true
77+
# other third-party
78+
- Regex: ^(<|")([[:alnum:]_]+/)+[[:alnum:]_]+\.h
79+
Priority: 6
80+
CaseSensitive: true
81+
# other local-looking file
82+
- Regex: ^".*\.
83+
Priority: 1
84+
CaseSensitive: true
85+
# C system
86+
- Regex: ^(<|")[[:lower:]_]+\.h(>|")
87+
Priority: 102
88+
CaseSensitive: true
89+
# C++ system
90+
- Regex: ^(<|")[[:lower:]_/]+(>|")
91+
Priority: 101
92+
CaseSensitive: true
93+
# rest
94+
- Regex: .*
95+
Priority: 100
4396
SpaceBeforeAssignmentOperators: true
4497
SpaceBeforeParens: ControlStatements
4598
SpaceInEmptyParentheses: false

.git-blame-ignore-revs

Whitespace-only changes.

.github/dependabot.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
# Dependabot configuration
3+
# Reference: https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
4+
5+
version: 2
6+
updates:
7+
- package-ecosystem: "github-actions" # See documentation for possible values
8+
directory: "/" # Location of package manifests
9+
schedule:
10+
interval: "weekly"

.github/labeler.yml

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
---
2+
alice3:
3+
- changed-files:
4+
- any-glob-to-any-file: ['ALICE3/**']
5+
6+
common:
7+
- changed-files:
8+
- any-glob-to-any-file: ['Common/**']
9+
10+
infrastructure:
11+
- 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'
26+
27+
datamodel:
28+
- changed-files:
29+
- any-glob-to-any-file: ['DataModel/**', '**/DataModel/**']
30+
31+
dpg:
32+
- changed-files:
33+
- any-glob-to-any-file: ['DPG/**']
34+
35+
pwgcf:
36+
- changed-files:
37+
- any-glob-to-any-file: ['PWGCF/**', '*/PWGCF/**']
38+
39+
pwgdq:
40+
- changed-files:
41+
- any-glob-to-any-file: ['PWGDQ/**', '*/PWGDQ/**']
42+
43+
pwgem:
44+
- changed-files:
45+
- any-glob-to-any-file: ['PWGEM/**', '*/PWGEM/**']
46+
47+
pwghf:
48+
- changed-files:
49+
- any-glob-to-any-file: ['PWGHF/**', '*/PWGHF/**']
50+
51+
pwgje:
52+
- changed-files:
53+
- any-glob-to-any-file: ['PWGJE/**', '*/PWGJE/**']
54+
55+
pwglf:
56+
- changed-files:
57+
- any-glob-to-any-file: ['PWGLF/**', '*/PWGLF/**', 'PWGMM/**', '*/PWGMM/**']
58+
59+
pwgud:
60+
- changed-files:
61+
- any-glob-to-any-file: ['PWGUD/**', '*/PWGUD/**']
62+
63+
trigger:
64+
- changed-files:
65+
- any-glob-to-any-file: ['EventFiltering/**']
66+
67+
tutorial:
68+
- changed-files:
69+
- any-glob-to-any-file: ['Tutorials/**']

.github/workflows/clean-test.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
---
2+
name: Clean PR checks
3+
4+
'on':
5+
workflow_dispatch:
6+
inputs:
7+
pr:
8+
description: PR number in this repo to be cleaned
9+
type: string # can't use number here
10+
required: true
11+
message:
12+
description: Human-readable message displayed on the new pending status
13+
type: string
14+
required: false
15+
default: ''
16+
17+
# Warning: GitHub limits the total number of inputs to 10, so a maximum of
18+
# 8 checks is allowed here!
19+
# Warning: the check_* keys are magic and must consist of the string
20+
# "check_" followed by the applicable check name exactly. The
21+
# "description" field is only the human-readable label for the input.
22+
'check_build/O2Physics/o2/macOS-arm':
23+
description: build/O2Physics/o2/macOS-arm
24+
type: boolean
25+
default: true
26+
27+
'check_build/O2Physics/o2/macOS':
28+
description: build/O2Physics/o2/macOS
29+
type: boolean
30+
default: true
31+
32+
'check_build/O2Physics/o2':
33+
description: build/O2Physics/o2
34+
type: boolean
35+
default: true
36+
37+
permissions: {}
38+
39+
jobs:
40+
clean:
41+
name: Clean PR checks
42+
uses: alisw/ali-bot/.github/workflows/clean-pr-checks.yml@master
43+
with:
44+
owner: ${{ github.event.repository.owner.login }}
45+
repo: ${{ github.event.repository.name }}
46+
pr: ${{ github.event.inputs.pr }}
47+
message: ${{ github.event.inputs.message }}
48+
checks: ${{ toJSON(github.event.inputs) }}
49+
permissions:
50+
pull-requests: read # to get last commit for pr (octokit/graphql-action)
51+
statuses: write # for set-github-status

.github/workflows/codeowner-self-approval.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ permissions:
1313

1414
jobs:
1515
approve:
16-
runs-on: ubuntu-latest
16+
runs-on: ubuntu-22.04
1717
# Only run if the PR author enabled auto-merge, not someone else.
1818
# Also run if a new approval was created, as this affects whether we can
1919
# auto-approve. There is a risk of infinite loops here, though -- when we

.github/workflows/labeler.yml

Lines changed: 122 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
1+
---
2+
name: "Pull Request Labeler"
3+
'on':
4+
pull_request_target:
5+
types: [opened, synchronize, reopened, edited]
6+
permissions: read-all
7+
8+
jobs:
9+
labeler:
10+
runs-on: ubuntu-latest
11+
permissions:
12+
contents: read
13+
pull-requests: write
14+
outputs:
15+
labels: ${{ steps.labeler.outputs.all-labels }}
16+
steps:
17+
- name: Label the PR
18+
id: labeler
19+
uses: actions/labeler@v5
20+
with:
21+
repo-token: ${{ secrets.GITHUB_TOKEN }}
22+
sync-labels: true
23+
title-prefix-checker:
24+
runs-on: ubuntu-latest
25+
permissions:
26+
contents: read
27+
pull-requests: write
28+
needs: labeler
29+
steps:
30+
- name: Check the PR title prefix
31+
id: check-prefix
32+
env:
33+
title: ${{ github.event.pull_request.title }}
34+
labels: ${{ needs.labeler.outputs.labels }}
35+
shell: python
36+
run: |
37+
import os
38+
import re
39+
import sys
40+
title = os.environ['title']
41+
labels = os.environ['labels']
42+
tags = {
43+
"infrastructure": "Infrastructure",
44+
"common": "Common",
45+
"alice3": "ALICE3",
46+
"pwgcf": "PWGCF",
47+
"pwgdq": "PWGDQ",
48+
"pwgem": "PWGEM",
49+
"pwghf": "PWGHF",
50+
"pwgje": "PWGJE",
51+
"pwglf": "PWGLF",
52+
"pwgud": "PWGUD",
53+
"dpg": "DPG",
54+
"trigger": "Trigger",
55+
"tutorial": "Tutorial",
56+
}
57+
print(f'PR title: "{title}"')
58+
print(f'PR labels: "{labels}"')
59+
tags_relevant = [tags[label] for label in tags if label in labels.split(",")]
60+
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
67+
# If there is a prefix which contains a known tag, check it for correct tags, and reformat it if needed.
68+
# If there is a prefix which does not contain any known tag, add the tag prefix.
69+
# If there is no prefix, add the tag prefix.
70+
if match := re.match(r"\[?(\w[\w, /\+-]+)[\]:]+ ", title):
71+
prefix_title = match.group(1)
72+
words_prefix_title = prefix_title.replace(",", " ").replace("/", " ").split()
73+
title_stripped = title[len(match.group()) :]
74+
print(f'PR title prefix: "{prefix_title}" -> tags: {words_prefix_title}')
75+
print(f'Stripped PR title: "{title_stripped}"')
76+
if any(tag in words_prefix_title for tag in tags.values()):
77+
for tag in tags.values():
78+
if tag in tags_relevant and tag not in words_prefix_title:
79+
print(f'::error::Relevant tag "{tag}" not found in the prefix of the PR title.')
80+
passed = False
81+
if tag not in tags_relevant and tag in words_prefix_title:
82+
print(f'::error::Irrelevant tag "{tag}" found in the prefix of the PR title.')
83+
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
92+
else:
93+
print("::warning::No known tags found in the prefix.")
94+
if tags_relevant:
95+
replace_title = 1
96+
title_new = prefix_good + title
97+
else:
98+
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}".')
109+
else:
110+
print("::notice::The PR title prefix is fine.")
111+
with open(os.environ["GITHUB_OUTPUT"], "a", encoding="utf-8") as fh:
112+
print(f"replace={replace_title}", file=fh)
113+
print(f"title={title_new}", file=fh)
114+
- name: Fix the PR title prefix
115+
if: ${{ steps.check-prefix.outputs.replace == 1 }}
116+
uses: the-wright-jamie/Update-PR-Info-Action@v1.1.0
117+
with:
118+
repo-token: "${{ secrets.GITHUB_TOKEN }}"
119+
base-branch-regex: master
120+
error-on-fail: false
121+
title-template: "${{ steps.check-prefix.outputs.title }}"
122+
title-update-action: replace

.github/workflows/mega-linter.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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@v8
41+
uses: oxsecurity/megalinter@v8.7.0
4242
env:
4343
# All available variables are described in documentation:
4444
# https://megalinter.io/configuration/

0 commit comments

Comments
 (0)