-
Notifications
You must be signed in to change notification settings - Fork 173
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 clean-sphinx
- Loading branch information
Showing
36 changed files
with
2,267 additions
and
340 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 |
---|---|---|
@@ -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"); | ||
} | ||
} |
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,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 |
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
File renamed without changes.
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,62 @@ | ||
# | ||
# This file is autogenerated by pip-compile with Python 3.12 | ||
# by the following command: | ||
# | ||
# pip-compile CI/fpe_masks/requirements.in | ||
# | ||
aiohappyeyeballs==2.4.3 | ||
# via aiohttp | ||
aiohttp==3.11.6 | ||
# via -r CI/fpe_masks/requirements.in | ||
aiosignal==1.3.1 | ||
# via aiohttp | ||
attrs==24.2.0 | ||
# via aiohttp | ||
cffi==1.17.1 | ||
# via cryptography | ||
click==8.1.7 | ||
# via typer | ||
cryptography==43.0.3 | ||
# via pyjwt | ||
frozenlist==1.5.0 | ||
# via | ||
# aiohttp | ||
# aiosignal | ||
gidgethub==5.3.0 | ||
# via -r CI/fpe_masks/requirements.in | ||
idna==3.10 | ||
# via yarl | ||
markdown-it-py==3.0.0 | ||
# via rich | ||
mdurl==0.1.2 | ||
# via markdown-it-py | ||
multidict==6.1.0 | ||
# via | ||
# aiohttp | ||
# yarl | ||
propcache==0.2.0 | ||
# via | ||
# aiohttp | ||
# yarl | ||
pycparser==2.22 | ||
# via cffi | ||
pygments==2.18.0 | ||
# via rich | ||
pyjwt[crypto]==2.10.0 | ||
# via | ||
# gidgethub | ||
# pyjwt | ||
rich==13.9.4 | ||
# via | ||
# -r CI/fpe_masks/requirements.in | ||
# typer | ||
shellingham==1.5.4 | ||
# via typer | ||
typer==0.13.1 | ||
# via -r CI/fpe_masks/requirements.in | ||
typing-extensions==4.12.2 | ||
# via typer | ||
uritemplate==4.1.1 | ||
# via gidgethub | ||
yarl==1.17.2 | ||
# via aiohttp |
This file was deleted.
Oops, something went wrong.
49 changes: 49 additions & 0 deletions
49
Core/include/Acts/EventData/detail/TrackParametersUtils.hpp
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,49 @@ | ||
// This file is part of the ACTS project. | ||
// | ||
// Copyright (C) 2016 CERN for the benefit of the ACTS project | ||
// | ||
// This Source Code Form is subject to the terms of the Mozilla Public | ||
// License, v. 2.0. If a copy of the MPL was not distributed with this | ||
// file, You can obtain one at https://mozilla.org/MPL/2.0/. | ||
|
||
#pragma once | ||
|
||
#include "Acts/EventData/GenericBoundTrackParameters.hpp" | ||
#include "Acts/EventData/TrackParametersConcept.hpp" | ||
|
||
namespace Acts::detail { | ||
|
||
/// @brief Shorthand for Bound or Free track parameters | ||
template <class parameters_t> | ||
concept isBoundOrFreeTrackParams = | ||
Acts::FreeTrackParametersConcept<parameters_t> || | ||
Acts::BoundTrackParametersConcept<parameters_t>; | ||
|
||
/// @brief Shorthand for GenericBoundTrackParameters | ||
template <class parameters_t> | ||
concept isGenericBoundTrackParams = | ||
std::same_as<parameters_t, Acts::GenericBoundTrackParameters< | ||
typename parameters_t::ParticleHypothesis>>; | ||
|
||
/// @brief Concept that restricts the type of the | ||
/// accumulation grid cell | ||
template <typename grid_t> | ||
concept TrackParamsGrid = requires { | ||
typename grid_t::value_type::first_type; | ||
typename grid_t::value_type::second_type; | ||
|
||
requires isBoundOrFreeTrackParams< | ||
typename grid_t::value_type::first_type::element_type>; | ||
requires isBoundOrFreeTrackParams< | ||
typename grid_t::value_type::second_type::element_type>; | ||
|
||
requires requires(typename grid_t::value_type val) { | ||
{ | ||
val.first | ||
} -> std::same_as< | ||
std::shared_ptr<typename decltype(val.first)::element_type>&>; | ||
{ val.second } -> std::same_as<decltype(val.first)&>; | ||
}; | ||
}; | ||
|
||
} // namespace Acts::detail |
Oops, something went wrong.