Skip to content

Commit

Permalink
Merge branch 'main' into UpdatesForAthenaOnMain
Browse files Browse the repository at this point in the history
  • Loading branch information
Rosie-Hasan authored Dec 11, 2024
2 parents b33faca + 595f2e6 commit 35c79c3
Show file tree
Hide file tree
Showing 865 changed files with 16,340 additions and 9,080 deletions.
83 changes: 4 additions & 79 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,51 +38,6 @@ jobs:
- name: Run pre-commit
run: pre-commit run --all-files --show-diff-on-failure

license:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Check
run: >
sudo apt-get install -y git
&& CI/check_license.py . --exclude "*thirdparty/*"
include_guards:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Check
run: >
CI/check_include_guards.py . --fail-global --exclude "*thirdparty/*"
pragma_once:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Check
run: >
CI/check_pragma_once.sh
type_t:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Check
run: >
CI/check_type_t.py . --exclude "thirdparty/*"
boost_test_macro:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Check
run: >
CI/check_boost_test_macro.sh
smearing_config:
runs-on: ubuntu-latest
steps:
Expand All @@ -93,39 +48,7 @@ jobs:
- name: Check
run: >
CI/check_smearing_config.py .
cmake_options:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Check
run: >
docs/parse_cmake_options.py CMakeLists.txt --write docs/getting_started.md --verify
spelling:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install codespell
run: >
pip install codespell==2.2.5
- name: Check
run: >
CI/check_spelling
math_macros:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Check
run: >
CI/check_math_macros.py . --exclude "thirdparty/*"
missing_includes:
runs-on: ubuntu-latest
steps:
Expand All @@ -136,6 +59,7 @@ jobs:
- name: Check
run: >
CI/missing_include_check.sh
fpe_masks:
runs-on: ubuntu-latest
steps:
Expand All @@ -145,10 +69,11 @@ jobs:
python-version: '3.12'
- name: Install dependencies
run: >
pip install -r CI/requirements_fpe_masks.txt
pip install -r CI/fpe_masks/requirements.txt
- name: Check
run: >
CI/check_fpe_masks.py --token ${{ secrets.GITHUB_TOKEN }}
unused_files:
runs-on: ubuntu-latest
steps:
Expand Down
58 changes: 58 additions & 0 deletions .github/workflows/milestone.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Check PR milestone

on:
pull_request_target:
types: [milestoned, demilestoned, opened, reopened]
branches:
- main

jobs:
check_milestone:
if: ${{ github.event.issue.pull_request || github.event.pull_request }}

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: "Check for milestone on PR"
uses: actions/github-script@v7
with:
script: |
let milestone = context.payload.pull_request.milestone;
if(context.payload.action === 'opened' || context.payload.action === 'reopened') {
if(milestone !== null) {
core.notice(`Milestone is ${milestone.title}`);
} else {
const milestones = await github.rest.issues.listMilestones({
owner: context.repo.owner,
repo: context.repo.repo,
state: "open"
});
for (const default_milestone of milestones.data) {
if (default_milestone.title === "next") {
core.notice(`No milestone set, setting default milestone: ${default_milestone.title}`);
await github.rest.issues.update({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
milestone: default_milestone.number
});
return;
}
}
core.warning("Could not find default milestone named 'next'");
}
}
else {
if(milestone !== null) {
core.notice(`Milestone is ${milestone.title}`);
} else {
core.setFailed("No milestone: Please add a version milestone");
}
}
76 changes: 76 additions & 0 deletions .github/workflows/update-pip-requirements.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
name: Update Pip Requirements

on:
workflow_dispatch: # Allow running on-demand
schedule:
# Runs every Sunday at 1:23 UTC
- cron: '23 1 * * 0'

jobs:
update-pip-requirements:
# This action checks all monitored (specified in `folder_list` below) requirements.in
# files and generates a new requirements.txt file with pip-compile. If any
# requirements changed, a PR is created with the changes.
runs-on: ubuntu-latest
env:
# This branch will receive updates each time the workflow runs
# It doesn't matter if it's deleted when merged, it'll be re-created
BRANCH_NAME: auto-dependency-upgrades
steps:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.12

- name: Install pip-tools
run: pip install pip-tools

- name: Compile all requirements.txt
run: |
# Update this list after adding/removing requirements-files
folder_list=(
CI/clang_tidy
CI/fpe_masks
docs
Examples/Python/tests
Examples/Scripts
)
for folder in "${folder_list[@]}"; do
pip-compile "${folder}/requirements.in" > "${folder}/requirements.txt"
done
- name: Detect changes
id: changes
run:
# This output boolean tells us if the dependencies have actually changed
echo "count=$(git status --porcelain=v1 2>/dev/null | wc -l)" >> $GITHUB_OUTPUT

- name: Commit & push changes
# Only push if changes exist
if: steps.changes.outputs.count > 0
run: |
git config user.name github-actions
git config user.email [email protected]
git add .
git commit -m "Weekly Update: Regenerate requirements.txt"
git push -f origin ${{ github.ref_name }}:$BRANCH_NAME
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Open pull request if needed
if: steps.changes.outputs.count > 0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Only open a PR if the branch is not attached to an existing one
run: |
PR=$(gh pr list --head $BRANCH_NAME --json number -q '.[0].number')
if [ -z $PR ]; then
gh pr create \
--head $BRANCH_NAME \
--title "chore: automated python requirements upgrades" \
--body "Full log: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
else
echo "Pull request already exists, won't create a new one."
fi
90 changes: 58 additions & 32 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -142,33 +142,49 @@ build_exatrkx:
- cmake --build build -- -j6
- ccache -s

# test_exatrkx_unittests:
# stage: test
# needs:
# - build_exatrkx
# image: ghcr.io/acts-project/ubuntu2204_exatrkx:63
# tags:
# - docker-gpu-nvidia
# script:
# - ctest --test-dir build -R ExaTrkX
#
# test_exatrkx_python:
# stage: test
# needs:
# - build_exatrkx
# image: ghcr.io/acts-project/ubuntu2204_exatrkx:63
# tags:
# - docker-gpu-nvidia
# script:
# - apt-get update -y
# - apt-get install -y python3 libxxhash0
# - source build/this_acts_withdeps.sh
# - git clone $CLONE_URL src
# - cd src
# - git checkout $HEAD_SHA
# - pip3 install -r Examples/Python/tests/requirements.txt
# - nvidia-smi
# - pytest -rFsv -k test_exatrkx
test_exatrkx_unittests:
stage: test
needs:
- build_exatrkx
image: ghcr.io/acts-project/ubuntu2204_exatrkx:63
variables:
DEPENDENCY_URL: https://acts.web.cern.ch/ACTS/ci/ubuntu-22.04/deps.$DEPENDENCY_TAG.tar.zst
tags:
- docker-gpu-nvidia
script:

- apt-get update -y
- git clone $CLONE_URL src
- cd src
- git checkout $HEAD_SHA
- source CI/dependencies.sh
- cd ..
- ctest --test-dir build -R ExaTrkX

test_exatrkx_python:
stage: test
needs:
- build_exatrkx
image: ghcr.io/acts-project/ubuntu2204_exatrkx:63
variables:
DEPENDENCY_URL: https://acts.web.cern.ch/ACTS/ci/ubuntu-22.04/deps.$DEPENDENCY_TAG.tar.zst
tags:
- docker-gpu-nvidia
script:
- apt-get update -y
- git clone $CLONE_URL src
- cd src
- git checkout $HEAD_SHA
- nvidia-smi
- source CI/dependencies.sh
- source ../build/this_acts_withdeps.sh
- python3 -m pip install -r Examples/Python/tests/requirements.txt
- echo $PYTHONPATH
- which python3
- python3 --version
- python3 -c "import acts"
- pytest -rFsv -k torch --collect-only
- pytest -rFsv -k gpu-torch # For now only test torch GPU pipeline

build_linux_ubuntu:
stage: build
Expand Down Expand Up @@ -382,11 +398,7 @@ linux_ubuntu_2204_clang:
# Figure out LCG platform name based on version number and OS
- >
if [ "$OS" = "alma9" ]; then
if [ "$LCG_VERSION" -ge "104" ]; then
export LCG_PLATFORM="el9"
else
export LCG_PLATFORM="centos9"
fi
export LCG_PLATFORM="el9"
else
export LCG_PLATFORM="$OS"
fi
Expand Down Expand Up @@ -431,3 +443,17 @@ lcg_105:
COMPILER:
- gcc13
- clang16

lcg_106a:
extends: .lcg_base_job

variables:
LCG_VERSION: "106a"

parallel:
matrix:
- OS: [alma9]
COMPILER:
- gcc13
- gcc14
- clang16
5 changes: 3 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ repos:
- id: codespell
args: [
"-S", "*.ipynb,*.onnx,_build,*.svg",
"-I", "./CI/codespell_ignore.txt"
"-I", "./CI/codespell_ignore.txt",
"-w"
]
exclude: ^CI/.*$

Expand Down Expand Up @@ -92,7 +93,7 @@ repos:
- id: leftover_conflict_markers
name: Leftover conflict markers
language: system
entry: git diff --staged --check
entry: git --no-pager diff --staged --check

- repo: local
hooks:
Expand Down
3 changes: 2 additions & 1 deletion .zenodo.json
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,8 @@
},
{
"affiliation": "UC Berkeley",
"name": "Carlo Varni"
"name": "Carlo Varni",
"orcid": "0000-0001-6733-4310"
}
],
"access_right": "open",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,9 @@ TrackAlignmentState trackAlignmentState(
measdim) = measCovariance;

// (b) Get and fill the bound parameters to measurement projection matrix
const ActsDynamicMatrix H = state.effectiveProjector();
const ActsDynamicMatrix H =
state.projectorSubspaceHelper().fullProjector().topLeftCorner(
measdim, eBoundSize);
alignState.projectionMatrix.block(iMeasurement, iParams, measdim,
eBoundSize) = H;
// (c) Get and fill the residual
Expand Down
Loading

0 comments on commit 35c79c3

Please sign in to comment.