-
Notifications
You must be signed in to change notification settings - Fork 168
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into add-stereo-angle
- Loading branch information
Showing
449 changed files
with
12,171 additions
and
5,329 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|
@@ -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 | ||
|
@@ -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 | ||
|
@@ -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: | ||
|
@@ -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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,4 +10,3 @@ checks: | |
threshold: 3 | ||
IntegralCheck: | ||
threshold: 3 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Oops, something went wrong.