Skip to content

Commit

Permalink
Merge branch 'main' into add-stereo-angle
Browse files Browse the repository at this point in the history
  • Loading branch information
kodiakhq[bot] authored Aug 4, 2023
2 parents 9ebd088 + b5babcb commit 60000bd
Show file tree
Hide file tree
Showing 449 changed files with 12,171 additions and 5,329 deletions.
5 changes: 5 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,21 @@
- cmake/**
'Component - Core':
- Core/**
- Tests/UnitTests/Core/**
'Component - Examples':
- Examples/**
- Tests/UnitTests/Examples/**
'Component - Fatras':
- Fatras/**
- Tests/UnitTests/Fatras/**
'Component - Plugins':
- Plugins/**
- Tests/UnitTests/Plugins/**
'Component - Documentation':
- docs/**
'Changes Performance':
- CI/physmon/reference/**
- Examples/Python/tests/root_file_hashes.txt
'Event Data Model':
- '**/*EventData*/**'
'Clustering':
Expand Down
39 changes: 37 additions & 2 deletions .github/workflows/builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,10 @@ jobs:
- name: Python level tests
shell: bash
env:
PYTEST_MD_REPORT: true
PYTEST_MD_REPORT_VERBOSE: 0
PYTEST_MD_REPORT_OUTPUT: pytest.md
run: >
/usr/local/bin/geant4-config --install-datasets
&& source /usr/local/bin/thisroot.sh
Expand All @@ -266,7 +270,9 @@ jobs:
&& export PYTHONPATH=/usr/local/python:$PYTHONPATH
&& export LD_LIBRARY_PATH=$PWD/build/thirdparty/OpenDataDetector/factory:$LD_LIBRARY_PATH
&& pip3 install -r Examples/Python/tests/requirements.txt
&& pip3 install pytest-md-report
&& pytest -rFsv -k "not exatrkx" -v
&& cat ${PYTEST_MD_REPORT_OUTPUT} >> $GITHUB_STEP_SUMMARY
linux_physmon:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -303,7 +309,7 @@ jobs:
run: >
echo "::group::Dependencies"
&& git config --global safe.directory "$GITHUB_WORKSPACE"
&& pip3 install histcmp==0.5.2
&& pip3 install histcmp==0.6.2 spyral-cli==1.1.0 matplotlib
&& pip3 install -r Examples/Scripts/requirements.txt
&& /usr/local/bin/geant4-config --install-datasets
&& source /usr/local/bin/thisroot.sh
Expand All @@ -314,13 +320,42 @@ jobs:
&& echo "::endgroup::"
&& export PYTHONPATH="${PYTHONPATH}":"${GITHUB_WORKSPACE}/Examples/Scripts/Python"
&& CI/physmon/phys_perf_mon.sh all physmon
&& cat physmon/summary.md >> $GITHUB_STEP_SUMMARY
- uses: actions/upload-artifact@v3
if: always()
with:
name: physmon
path: physmon

linux_physmon_perf_report:
needs: [linux_physmon]
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
steps:
- name: Install dependencies
run: pip3 install spyral-cli==1.1.0

- uses: actions/download-artifact@v3
with:
name: physmon
path: physmon

- name: Store metrics
env:
SSH_AUTH_SOCK: /tmp/ssh_agent.sock
run: |
ssh-agent -a $SSH_AUTH_SOCK > /dev/null
ssh-add - <<< "${{ secrets.RUNTIME_METRIC_DEPLOY_SSH_KEY }}"
git config --global user.email "[email protected]"
git config --global user.name "GitHub Action"
git clone [email protected]:acts-project/runtime_metrics.git
spyral maxima runtime_metrics/metrics.csv physmon/memory/*.csv -e $(date +%Y-%m-%dT%H-%M-%S) -e ${GITHUB_REF_NAME} -e ${GITHUB_REF} -e ${GITHUB_SHA}
cd runtime_metrics
git add -A
git commit -m"update metrics"
git push
linux_ubuntu_extra:
runs-on: ubuntu-latest
strategy:
Expand Down Expand Up @@ -373,7 +408,7 @@ jobs:
-DACTS_BUILD_ODD=ON
-DACTS_BUILD_EXAMPLES_PYTHON_BINDINGS=ON
-DACTS_BUILD_EXAMPLES_EDM4HEP=ON
-DACTS_FORCE_ASSERTIONS=ON
-DACTS_FORCE_ASSERTIONS=OFF
-DACTS_BUILD_ANALYSIS_APPS=ON
-DACTS_BUILD_PLUGIN_ACTSVG=ON
Expand Down
22 changes: 21 additions & 1 deletion .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,4 +97,24 @@ jobs:
- name: Check
run: >
CI/check_spelling
missing_includes:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install clang
run: >
sudo apt-get install -y clang libeigen3-dev libboost-dev
- name: Check
run: >
CI/missing_include_check.sh
fpe_masks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- name: Install dependencies
run: >
pip install -r CI/requirements_fpe_masks.txt
- name: Check
run: >
CI/check_fpe_masks.py --token ${{ secrets.GITHUB_TOKEN }}
1 change: 1 addition & 0 deletions .github/workflows/trigger_athena.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ jobs:
curl -X POST --fail
-F token=${{ secrets.GITLAB_ATHENA_BUILD_TRIGGER_TOKEN}}
-F ref=main
--form variables[SOURCE_SHA]="${{ github.sha }}"
https://gitlab.cern.ch/api/v4/projects/153873/trigger/pipeline
2 changes: 1 addition & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ linux_physmon:
- cd ..

- git config --global safe.directory "$GITHUB_WORKSPACE"
- pip3 install histcmp==0.5.2
- pip3 install histcmp==0.6.2 spyral-cli==1.1.0 matplotlib
- pip3 install -r src/Examples/Scripts/requirements.txt
- /usr/local/bin/geant4-config --install-datasets
- "source /usr/local/bin/thisroot.sh || true"
Expand Down
94 changes: 94 additions & 0 deletions CI/check_fpe_masks.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
#!/usr/bin/env python3
from pathlib import Path
import os
import re
import sys

import asyncio
import aiohttp
import gidgethub
from gidgethub.aiohttp import GitHubAPI
import typer
from rich import print
from rich.rule import Rule


def main(
token: str = typer.Option(..., envvar="GITHUB_TOKEN"),
repo: str = typer.Option(..., envvar="GITHUB_REPOSITORY"),
):
asyncio.run(check(token, repo))


async def check(token: str, repo: str):
ok = True

async with aiohttp.ClientSession() as session:
gh = GitHubAPI(session=session, requester="acts-project", oauth_token=token)
srcdir = Path(__file__).parent.parent
for root, _, files in os.walk(srcdir):
root = Path(root)
for f in files:
if (
not f.endswith(".hpp")
and not f.endswith(".cpp")
and not f.endswith(".ipp")
):
continue
f = root / f
rel = f.relative_to(srcdir)
first = True
with f.open("r") as fh:
for i, line in enumerate(fh, start=1):
if m := re.match(r".*\/\/ ?MARK: ?(fpeMask.*)$", line):
if first:
print(Rule(str(rel)))
first = False
exp = m.group(1)
for m in re.findall(
r"fpeMask\((\w+), ?(\d+) ?, ?issue: ?(\d+)\)", exp
):
fpeType, count, number = m

loc = f"{rel}:{i}"
this_ok = True
issue_info = number
try:
issue = await gh.getitem(
f"repos/{repo}/issues/{number}"
)
issue_info = issue["html_url"]
except gidgethub.BadRequest as e:
print(
f":red_circle: [bold]FPE mask at {loc} has invalid issue number {number}[/bold]"
)
this_ok = False
continue

if issue["state"] != "open":
print(
f":red_circle: [bold]FPE mask at {loc} has issue {number} but is not open[/bold]"
)
this_ok = False
if not "fpe" in issue["title"].lower():
print(
f":red_circle: [bold]FPE mask at {loc} has issue {number} but does not contain 'FPE' / 'fpe' in the title[/bold]"
)
this_ok = False
if not "fpe" in [l["name"] for l in issue["labels"]]:
print(
f":red_circle: [bold]FPE mask at {loc} has issue {number} but does not have the 'fpe' label[/bold]"
)
this_ok = False

if this_ok:
print(
f":green_circle: [bold]FPE mask at {loc}: {fpeType} <= {count}[/bold]"
)

ok = ok and this_ok

raise typer.Exit(code=0 if ok else 1)


typer.run(main)
26 changes: 26 additions & 0 deletions CI/missing_include_check.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/bin/bash

RET=0
ERRORS=0

FILES=$(find Core/include/ -name "*.hpp" | grep -v "/detail/")
N_FILES=$(echo "$FILES" | wc -l)
echo "Check $N_FILES files"

ITER=0

for file in $(find Core/include/ -name "*.hpp" | grep -v "/detail/"); do
ITER=$((ITER+1))
echo "$(date +%H:%M:%S) $((100*ITER/N_FILES))% check $file"
out=$(printf "#include <${file:13}>\nint main() { return 0; }" | clang++ -std=c++17 -O0 -c -I "Core/include" -I "/usr/include/eigen3" -x c++ - 2>&1)
if [[ "$?" -ne "0" ]]; then
echo "------------------------------------"
echo "$out"
echo "------------------------------------"
RET=1
ERRORS=$((ERRORS+1))
fi
done

echo "Total errors: $ERRORS"
exit $RET
4 changes: 1 addition & 3 deletions CI/physmon/ckf_truth_smeared.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,10 @@ checks:
IntegralCheck:
threshold: 3




nHoles_vs_eta:
KolmogorovTest:
threshold: 0.25

nOutliers_vs_pT:
KolmogorovTest:
threshold: 0.59
Expand Down
2 changes: 1 addition & 1 deletion CI/physmon/fpe_masks.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"Fatras/include/ActsFatras/Physics/ElectroMagnetic/BetheHeitler.hpp:66":
FLTUND: 1
"Fatras/include/ActsFatras/Kernel/detail/SimulationActor.hpp:178":
"Fatras/include/ActsFatras/Kernel/detail/SimulationActor.hpp:177":
FLTUND: 1
"Core/include/Acts/TrackFitting/detail/GsfUtils.hpp:197":
FLTUND: 1
Expand Down
1 change: 0 additions & 1 deletion CI/physmon/gsf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,3 @@ checks:
threshold: 3
IntegralCheck:
threshold: 3

56 changes: 56 additions & 0 deletions CI/physmon/particles_final_config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
histograms:
"vx|vy":
nbins: 100
min: -2000.0
max: 2000.0

vz:
nbins: 100
min: -5000.0
max: 5000.0

vt:
nbins: 100
min: -30.0
max: 30.0

"p|pt":
nbins: 100
min: 0
max: 200.0

"px|py|pz":
nbins: 100
min: -200.0
max: 200.0

eta:
nbins: 100
min: -3.0
max: 3.0

phi:
nbins: 100
min: -4.0
max: 4.0

q:
nbins: 100
min: -2.0
max: 2.0

m:
nbins: 100
min: 0.0
max: 0.15

exclude:
- event_id
- particle_id
- particle_type
- process
- vertex_primary
- vertex_secondary
- particle
- generation
- sub_particle
Loading

0 comments on commit 60000bd

Please sign in to comment.