Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Archita-Dash committed Nov 7, 2024
2 parents e300e43 + 6b419e8 commit 5e218f3
Showing 352 changed files with 27,132 additions and 14,526 deletions.
6 changes: 6 additions & 0 deletions .checkov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
# You can see all available properties here: https://github.com/bridgecrewio/checkov#configuration-using-a-config-file
quiet: true
skip-check:
- CKV_DOCKER_2
- CKV_GHA_7
64 changes: 64 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
---
alice3:
- changed-files:
- any-glob-to-any-file: ['ALICE3/**']

common:
- changed-files:
- any-glob-to-any-file: ['Common/**']

infrastructure:
- changed-files:
- any-glob-to-any-file:
- '.clang-format'
- '.clang-tidy'
- '.flake8'
- '.github/**'
- '.checkov.yml'
- '.mega-linter.yml'
- 'cmake/**'
- 'CODEOWNERS'
- 'CPPLINT.cfg'
- 'dependencies/**'
- 'packaging/**'
- 'pyproject.toml'

dpg:
- changed-files:
- any-glob-to-any-file: ['DPG/**']

pwgcf:
- changed-files:
- any-glob-to-any-file: ['PWGCF/**', '*/PWGCF/**']

pwgdq:
- changed-files:
- any-glob-to-any-file: ['PWGDQ/**', '*/PWGDQ/**']

pwgem:
- changed-files:
- any-glob-to-any-file: ['PWGEM/**', '*/PWGEM/**']

pwghf:
- changed-files:
- any-glob-to-any-file: ['PWGHF/**', '*/PWGHF/**']

pwgje:
- changed-files:
- any-glob-to-any-file: ['PWGJE/**', '*/PWGJE/**']

pwglf:
- changed-files:
- any-glob-to-any-file: ['PWGLF/**', '*/PWGLF/**', 'PWGMM/**', '*/PWGMM/**']

pwgud:
- changed-files:
- any-glob-to-any-file: ['PWGUD/**', '*/PWGUD/**']

trigger:
- changed-files:
- any-glob-to-any-file: ['EventFiltering/**']

tutorial:
- changed-files:
- any-glob-to-any-file: ['Tutorials/**']
51 changes: 51 additions & 0 deletions .github/workflows/clean-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
---
name: Clean PR checks

'on':
workflow_dispatch:
inputs:
pr:
description: PR number in this repo to be cleaned
type: string # can't use number here
required: true
message:
description: Human-readable message displayed on the new pending status
type: string
required: false
default: ''

# Warning: GitHub limits the total number of inputs to 10, so a maximum of
# 8 checks is allowed here!
# Warning: the check_* keys are magic and must consist of the string
# "check_" followed by the applicable check name exactly. The
# "description" field is only the human-readable label for the input.
'check_build/O2Physics/o2/macOS-arm':
description: build/O2Physics/o2/macOS-arm
type: boolean
default: true

'check_build/O2Physics/o2/macOS':
description: build/O2Physics/o2/macOS
type: boolean
default: true

'check_build/O2Physics/o2':
description: build/O2Physics/o2
type: boolean
default: true

permissions: {}

jobs:
clean:
name: Clean PR checks
uses: alisw/ali-bot/.github/workflows/clean-pr-checks.yml@master
with:
owner: ${{ github.event.repository.owner.login }}
repo: ${{ github.event.repository.name }}
pr: ${{ github.event.inputs.pr }}
message: ${{ github.event.inputs.message }}
checks: ${{ toJSON(github.event.inputs) }}
permissions:
pull-requests: read # to get last commit for pr (octokit/graphql-action)
statuses: write # for set-github-status
4 changes: 2 additions & 2 deletions .github/workflows/codeowner-self-approval.yml
Original file line number Diff line number Diff line change
@@ -13,7 +13,7 @@ permissions:

jobs:
approve:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
# Only run if the PR author enabled auto-merge, not someone else.
# Also run if a new approval was created, as this affects whether we can
# auto-approve. There is a risk of infinite loops here, though -- when we
@@ -25,7 +25,7 @@ jobs:
steps:
- name: Install dependencies
run: pip install --break-system-packages codeowners PyGithub
run: pip install codeowners PyGithub

# Approve the PR, if the author is only editing files owned by themselves.
- name: Auto-approve PR if permitted
122 changes: 122 additions & 0 deletions .github/workflows/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
---
name: "Pull Request Labeler"
'on':
pull_request_target:
types: [opened, synchronize, reopened, edited]
permissions: read-all

jobs:
labeler:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
outputs:
labels: ${{ steps.labeler.outputs.all-labels }}
steps:
- name: Label the PR
id: labeler
uses: actions/labeler@v5
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
sync-labels: true
title-prefix-checker:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
needs: labeler
steps:
- name: Check the PR title prefix
id: check-prefix
env:
title: ${{ github.event.pull_request.title }}
labels: ${{ needs.labeler.outputs.labels }}
shell: python
run: |
import os
import re
import sys
title = os.environ['title']
labels = os.environ['labels']
tags = {
"infrastructure": "Infrastructure",
"common": "Common",
"alice3": "ALICE3",
"pwgcf": "PWGCF",
"pwgdq": "PWGDQ",
"pwgem": "PWGEM",
"pwghf": "PWGHF",
"pwgje": "PWGJE",
"pwglf": "PWGLF",
"pwgud": "PWGUD",
"dpg": "DPG",
"trigger": "Trigger",
"tutorial": "Tutorial",
}
print(f'PR title: "{title}"')
print(f'PR labels: "{labels}"')
tags_relevant = [tags[label] for label in tags if label in labels.split(",")]
print("Relevant title tags:", ",".join(tags_relevant))
passed = True
prefix_good = ",".join(tags_relevant)
prefix_good = f"[{prefix_good}] "
print(f"Generated prefix: {prefix_good}")
replace_title = 0
title_new = title
# If there is a prefix which contains a known tag, check it for correct tags, and reformat it if needed.
# If there is a prefix which does not contain any known tag, add the tag prefix.
# If there is no prefix, add the tag prefix.
if match := re.match(r"\[?(\w[\w, /\+-]+)[\]:]+ ", title):
prefix_title = match.group(1)
words_prefix_title = prefix_title.replace(",", " ").replace("/", " ").split()
title_stripped = title[len(match.group()) :]
print(f'PR title prefix: "{prefix_title}" -> tags: {words_prefix_title}')
print(f'Stripped PR title: "{title_stripped}"')
if any(tag in words_prefix_title for tag in tags.values()):
for tag in tags.values():
if tag in tags_relevant and tag not in words_prefix_title:
print(f'::error::Relevant tag "{tag}" not found in the prefix of the PR title.')
passed = False
if tag not in tags_relevant and tag in words_prefix_title:
print(f'::error::Irrelevant tag "{tag}" found in the prefix of the PR title.')
passed = False
# Format a valid prefix.
if passed:
prefix_good = ",".join(w for w in prefix_title.replace(",", " ").split() if w)
prefix_good = f"[{prefix_good}] "
print(f"::notice::Reformatted prefix: {prefix_good}")
if match.group() != prefix_good:
replace_title = 1
title_new = prefix_good + title_stripped
else:
print("::warning::No known tags found in the prefix.")
if tags_relevant:
replace_title = 1
title_new = prefix_good + title
else:
print("::warning::No valid prefix found in the PR title.")
if tags_relevant:
replace_title = 1
title_new = prefix_good + title
if not passed:
print("::error::Problems were found in the PR title prefix.")
print('::notice::Use the form "tags: title" or "[tags] title".')
sys.exit(1)
if replace_title:
print("::warning::The PR title prefix with tags needs to be added or adjusted.")
print(f'::warning::New title: "{title_new}".')
else:
print("::notice::The PR title prefix is fine.")
with open(os.environ["GITHUB_OUTPUT"], "a", encoding="utf-8") as fh:
print(f"replace={replace_title}", file=fh)
print(f"title={title_new}", file=fh)
- name: Fix the PR title prefix
if: ${{ steps.check-prefix.outputs.replace == 1 }}
uses: the-wright-jamie/[email protected]
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
base-branch-regex: master
error-on-fail: false
title-template: "${{ steps.check-prefix.outputs.title }}"
title-update-action: replace
2 changes: 1 addition & 1 deletion .github/workflows/mega-linter.yml
Original file line number Diff line number Diff line change
@@ -38,7 +38,7 @@ jobs:
id: ml
# You can override MegaLinter flavor used to have faster performances
# More info at https://megalinter.io/flavors/
uses: oxsecurity/megalinter@v8
uses: oxsecurity/megalinter@v8.1.0
env:
# All available variables are described in documentation:
# https://megalinter.io/configuration/
32 changes: 22 additions & 10 deletions CODEOWNERS
Original file line number Diff line number Diff line change
@@ -27,21 +27,33 @@
/EventFiltering/PWGCF @alibuild @lauraser @mpuccio @lietava
/EventFiltering/PWGMM @alibuild @aortizve @mpuccio @lietava
/EventFiltering/PWGJE @alibuild @fkrizek @nzardosh @mpuccio @lietava
/PWGCF @alibuild @saganatt @victor-gonzalez @zchochul
/PWGCF/Core @alibuild @jgrosseo @saganatt @victor-gonzalez @zchochul
/PWGCF/DataModel @alibuild @jgrosseo @saganatt @victor-gonzalez @zchochul
/PWGCF/TableProducer @alibuild @jgrosseo @saganatt @victor-gonzalez @zchochul
/PWGCF/Tasks @alibuild @jgrosseo @saganatt @victor-gonzalez @zchochul
/PWGCF @alibuild @saganatt @victor-gonzalez @zchochul @lgraczykCern @prchakra @lauraser @ariedel-cern @EmilGorm @otonvd @shouqiye
/PWGCF/Core @alibuild @jgrosseo @saganatt @victor-gonzalez @zchochul @lgraczykCern @prchakra @lauraser @ariedel-cern @EmilGorm @otonvd @shouqiye
/PWGCF/DataModel @alibuild @jgrosseo @saganatt @victor-gonzalez @zchochul @lgraczykCern @prchakra @lauraser @ariedel-cern @EmilGorm @otonvd @shouqiye
/PWGCF/TableProducer @alibuild @jgrosseo @saganatt @victor-gonzalez @zchochul @lgraczykCern @prchakra @lauraser @ariedel-cern @EmilGorm @otonvd @shouqiye
/PWGCF/Tasks @alibuild @jgrosseo @saganatt @victor-gonzalez @zchochul @lgraczykCern @prchakra @lauraser @ariedel-cern @EmilGorm @otonvd @shouqiye
/PWGDQ @alibuild @iarsene @dsekihat @feisenhu @lucamicheletti93
/PWGEM @alibuild @mikesas @rbailhac @feisenhu
/PWGEM/Dilepton @alibuild @mikesas @rbailhac @dsekihat @ivorobye @feisenhu
/PWGEM/PhotonMeson @alibuild @mikesas @rbailhac @m-c-danisch @novitzky @mhemmer-cern @dsekihat
/PWGHF @alibuild @vkucera @fcolamar @fgrosa @fcatalan92 @mfaggin @mmazzilli @deepathoms @NicoleBastid @hahassan7 @jpxrk @apalasciano
/PWGLF @alibuild @ercolessi @fmazzasc @chiarapinto @maciacco @BongHwi @smaff92 @ChiaraDeMartin95 @njacazio @skundu692
/PWGMM @alibuild @aalkin @njacazio @skundu692
# PWG-LF
/PWGLF @alibuild @njacazio @skundu692
/PWGLF/Tasks/GlobalEventProperties @alibuild @njacazio @skundu692 @gbencedi @omvazque
/PWGLF/TableProducer/GlobalEventProperties @alibuild @njacazio @skundu692 @gbencedi @omvazque
/PWGLF/Tasks/Nuspex @alibuild @njacazio @skundu692 @fmazzasc @chiarapinto @maciacco
/PWGLF/TableProducer/Nuspex @alibuild @njacazio @skundu692 @fmazzasc @chiarapinto @maciacco
/PWGLF/Tasks/Resonances @alibuild @njacazio @skundu692 @BongHwi @smaff92
/PWGLF/TableProducer/Resonances @alibuild @njacazio @skundu692 @BongHwi @smaff92
/PWGLF/Tasks/Strangeness @alibuild @njacazio @skundu692 @ercolessi @ChiaraDeMartin95
/PWGLF/TableProducer/Strangeness @alibuild @njacazio @skundu692 @ercolessi @ChiaraDeMartin95

# PWG-MM
/PWGMM @alibuild @njacazio @skundu692 @aalkin
/PWGMM/Mult @alibuild @njacazio @skundu692 @aalkin @aortizve @ddobrigk
/PWGMM/Lumi @alibuild @aalkin
/PWGMM/Mult @alibuild @aalkin @aortizve @ddobrigk
/PWGMM/UE @alibuild @aalkin @aortizve
/PWGMM/UE @alibuild @aalkin @aortizve

/PWGUD @alibuild @pbuehler @abylinkin @rolavick
/PWGJE @alibuild @lhavener @maoyx @nzardosh @ddobrigk @mfasDa
/Tools/PIDML @alibuild @saganatt
@@ -50,7 +62,7 @@
/Tutorials/PWGDQ @alibuild @iarsene @dsekihat @feisenhu @lucamicheletti93
/Tutorials/PWGEM @alibuild @mikesas @rbailhac @dsekihat @ivorobye @feisenhu
/Tutorials/PWGHF @alibuild @vkucera @fcolamar @fgrosa
/Tutorials/PWGJE @alibuild @lhavener @maoyx @nzardosh @ddobrigk @mfasDa
/Tutorials/PWGJE @alibuild @lhavener @maoyx @nzardosh @mfasDa @fjonasALICE
/Tutorials/PWGLF @alibuild @alcaliva @lbariogl @chiarapinto @BongHwi @lbarnby @mbombara @iravasen @njacazio @ChiaraDeMartin95 @skundu692
/Tutorials/PWGMM @alibuild @aalkin @ddobrigk
/Tutorials/PWGUD @alibuild @pbuehler
2 changes: 1 addition & 1 deletion CPPLINT.cfg
Original file line number Diff line number Diff line change
@@ -1 +1 @@
filter=-build/c++11,-build/namespaces,-readability/fn_size,-readability/todo,-runtime/references,-whitespace/blank_line,-whitespace/braces,-whitespace/comments,-whitespace/line_length,-whitespace/semicolon,-whitespace/todo
filter=-build/c++11,-build/namespaces,-readability/fn_size,-readability/todo,-runtime/references,-whitespace/blank_line,-whitespace/braces,-whitespace/comments,-whitespace/indent_namespace,-whitespace/line_length,-whitespace/semicolon,-whitespace/todo
11 changes: 5 additions & 6 deletions Common/CCDB/EventSelectionParams.cxx
Original file line number Diff line number Diff line change
@@ -55,13 +55,12 @@ const char* selectionLabels[kNsel] = {
"kIsVertexITSTPC",
"kIsVertexTOFmatched",
"kIsVertexTRDmatched",
"kNoHighOccupancyAgressive",
"kNoHighOccupancyStrict",
"kNoHighOccupancyMedium",
"kNoHighOccupancyRelaxed",
"kNoHighOccupancyGentle",
"kNoCollInTimeRangeNarrow",
"kNoCollInTimeRangeStrict",
"kNoCollInTimeRangeStandard",
"kNoCollInTimeRangeNarrow"};
"kNoCollInTimeRangeVzDependent",
"kNoCollInRofStrict",
"kNoCollInRofStandard"};
} // namespace o2::aod::evsel

using namespace o2::aod::evsel;
Loading

0 comments on commit 5e218f3

Please sign in to comment.