Skip to content

Commit

Permalink
Release to main (#108)
Browse files Browse the repository at this point in the history
Update version to 0.3.0; Remove changelog.md as it's no longer needed
with TagBot

Do not squash
  • Loading branch information
AntonReinhard authored Oct 29, 2024
2 parents 69053b6 + 1a037d5 commit 78d5037
Show file tree
Hide file tree
Showing 20 changed files with 458 additions and 112 deletions.
1 change: 0 additions & 1 deletion .JuliaFormatter.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
style = "blue"

18 changes: 13 additions & 5 deletions .github/workflows/BuildDeployDoc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Build and Deploy Documentation
on:
push:
branches:
- master
- main
- dev
tags: "*"
pull_request:
Expand All @@ -18,11 +18,19 @@ jobs:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v1
with:
version: "1.10"
- name: Install dependencies
version: '1.10'
- name: clone integration test tools
run: |
julia --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate()'
git clone --depth 1 -b dev https://github.com/QEDjl-project/QuantumElectrodynamics.jl.git /tmp/integration_test_tools/
- name: set dev dependencies
run: |
$(julia --project=. /tmp/integration_test_tools/.ci/integTestGen/src/get_project_name_version_path.jl)
echo "CI_DEV_PKG_NAME -> $CI_DEV_PKG_NAME"
echo "CI_DEV_PKG_VERSION -> $CI_DEV_PKG_VERSION"
echo "CI_DEV_PKG_PATH -> $CI_DEV_PKG_PATH"
julia --project=docs/ /tmp/integration_test_tools/.ci/SetupDevEnv/src/SetupDevEnv.jl
julia --project=docs/ -e 'import Pkg; Pkg.instantiate()'
- name: Build and deploy
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # If authenticating with GitHub Actions token
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: julia --project=docs/ docs/make.jl
6 changes: 0 additions & 6 deletions .github/workflows/CompatHelper.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,6 @@ jobs:
ENV["JULIA_PKG_SERVER"] = ""
Pkg.Registry.add("General")
shell: julia --color=yes {0}
- name: "Add QED.jl custom registry"
run: |
import Pkg
ENV["JULIA_PKG_SERVER"] = ""
Pkg.Registry.add(Pkg.RegistrySpec(url="https://github.com/QEDjl-project/registry.git"))
shell: julia --color=yes {0}
- name: "Install CompatHelper"
run: |
import Pkg
Expand Down
31 changes: 31 additions & 0 deletions .github/workflows/TagBot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: TagBot
on:
issue_comment:
types:
- created
workflow_dispatch:
inputs:
lookback:
default: "3"
permissions:
actions: read
checks: read
contents: write
deployments: read
issues: read
discussions: read
packages: read
pages: read
pull-requests: read
repository-projects: read
security-events: read
statuses: read
jobs:
TagBot:
if: github.event_name == 'workflow_dispatch' || github.actor == 'JuliaTagBot'
runs-on: ubuntu-latest
steps:
- uses: JuliaRegistries/TagBot@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
ssh: ${{ secrets.TAGBOT_PRIV }}
2 changes: 1 addition & 1 deletion .github/workflows/formatter.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
- name: install Julia
uses: julia-actions/setup-julia@v1
with:
version: 1.10
version: "1.10"
- name: Install Julia requirements
run: julia --project=${GITHUB_WORKSPACE}/.formatting -e 'import Pkg; Pkg.instantiate()'
- name: Check code style
Expand Down
44 changes: 24 additions & 20 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,21 @@ stages:
- run_integration_test
- verify-unit-test-deps

.untit_test_template:
.unit_test_template:
stage: unit-test
script:
- apt update && apt install -y git
- git clone --depth 1 -b dev https://github.com/QEDjl-project/QED.jl.git /QEDjl
- git clone --depth 1 -b dev https://github.com/QEDjl-project/QuantumElectrodynamics.jl.git /tmp/integration_test_tools/
- $(julia --project=. /tmp/integration_test_tools/.ci/integTestGen/src/get_project_name_version_path.jl)
- echo "CI_DEV_PKG_NAME -> $CI_DEV_PKG_NAME"
- echo "CI_DEV_PKG_VERSION -> $CI_DEV_PKG_VERSION"
- echo "CI_DEV_PKG_PATH -> $CI_DEV_PKG_PATH"
- >
if [[ $CI_COMMIT_BRANCH == "main" || $CI_COMMIT_REF_NAME == "main" || $CI_COMMIT_BRANCH == "dev" || $CI_COMMIT_REF_NAME == "dev" ]]; then
# set name of the commit message from CI_COMMIT_MESSAGE to NO_MESSAGE, that the script does not read accidentally custom packages from the commit message of a merge commit
julia --project=. /QEDjl/.ci/SetupDevEnv/src/SetupDevEnv.jl ${CI_PROJECT_DIR}/Project.toml NO_MESSAGE
julia --project=. /tmp/integration_test_tools/.ci/SetupDevEnv/src/SetupDevEnv.jl ${CI_PROJECT_DIR}/Project.toml NO_MESSAGE
else
julia --project=. /QEDjl/.ci/SetupDevEnv/src/SetupDevEnv.jl ${CI_PROJECT_DIR}/Project.toml
julia --project=. /tmp/integration_test_tools/.ci/SetupDevEnv/src/SetupDevEnv.jl ${CI_PROJECT_DIR}/Project.toml
fi
- julia --project=. -e 'import Pkg; Pkg.instantiate()'
- julia --project=. -e 'import Pkg; Pkg.test(; coverage = true)'
Expand All @@ -23,57 +27,57 @@ stages:
- cpuonly

unit_tests_releases:
extends: .untit_test_template
extends: .unit_test_template
parallel:
matrix:
- JULIA_VERSION: ["1.6", "1.7", "1.8", "1.9", "1.10", "rc"]
- JULIA_VERSION: ["1.10", "1.11", "rc"]
image: julia:$JULIA_VERSION

unit_tests_nightly:
extends: .untit_test_template
extends: .unit_test_template
# use the same baseimage like the official julia images
image: debian:bookworm-slim
variables:
# path where julia tar bal should be downloaded
JULIA_DONWLOAD: /julia/download
JULIA_DOWNLOAD: /julia/download
# path where julia should be extracted
JULIA_EXTRACT: /julia/extract
before_script:
- apt update && apt install -y wget
- mkdir -p $JULIA_DONWLOAD
- mkdir -p $JULIA_DOWNLOAD
- mkdir -p $JULIA_EXTRACT
- >
if [[ $CI_RUNNER_EXECUTABLE_ARCH == "linux/arm64" ]]; then
wget https://julialangnightlies-s3.julialang.org/bin/linux/aarch64/julia-latest-linux-aarch64.tar.gz -O $JULIA_DONWLOAD/julia-nightly.tar.gz
wget https://julialangnightlies-s3.julialang.org/bin/linux/aarch64/julia-latest-linux-aarch64.tar.gz -O $JULIA_DOWNLOAD/julia-nightly.tar.gz
elif [[ $CI_RUNNER_EXECUTABLE_ARCH == "linux/amd64" ]]; then
wget https://julialangnightlies-s3.julialang.org/bin/linux/x86_64/julia-latest-linux-x86_64.tar.gz -O $JULIA_DONWLOAD/julia-nightly.tar.gz
wget https://julialangnightlies-s3.julialang.org/bin/linux/x86_64/julia-latest-linux-x86_64.tar.gz -O $JULIA_DOWNLOAD/julia-nightly.tar.gz
else
echo "unknown runner architecture -> $CI_RUNNER_EXECUTABLE_ARCH"
exit 1
fi
- tar -xf $JULIA_DONWLOAD/julia-nightly.tar.gz -C $JULIA_EXTRACT
- tar -xf $JULIA_DOWNLOAD/julia-nightly.tar.gz -C $JULIA_EXTRACT
# we need to search for the julia base folder name, because the second part of the name is the git commit hash
# e.g. julia-b0c6781676f
- JULIA_EXTRACT_FOLDER=${JULIA_EXTRACT}/$(ls $JULIA_EXTRACT | grep -m1 julia)
# copy everything to /usr to make julia public available
# mv is not possible, because it cannot merge folder
- cp -r $JULIA_EXTRACT_FOLDER/* /usr
allow_failure: true
tags:
- cpuonly

generate_integration_tests:
image: julia:1.10
stage: generate_integration_test
script:
# extract package name
- export CI_DEPENDENCY_NAME=$(cat $CI_PROJECT_DIR/Project.toml | grep name | awk '{ print $3 }' | tr -d '"')
- echo "CI_DEPENDENCY_NAME -> $CI_DEPENDENCY_NAME"
- apt update && apt install -y git
- git clone --depth 1 -b dev https://github.com/QEDjl-project/QED.jl.git /QEDjl
- git clone --depth 1 -b dev https://github.com/QEDjl-project/QuantumElectrodynamics.jl.git /QEDjl
- $(julia --project /QEDjl/.ci/integTestGen/src/get_project_name_version_path.jl)
- echo "CI_DEV_PKG_NAME -> $CI_DEV_PKG_NAME"
- echo "CI_DEV_PKG_VERSION -> $CI_DEV_PKG_VERSION"
- echo "CI_DEV_PKG_PATH -> $CI_DEV_PKG_PATH"
- cd /QEDjl/.ci/integTestGen/
# use local registry of the QED project
- julia --project=. -e 'import Pkg; Pkg.Registry.add(Pkg.RegistrySpec(url="https://github.com/QEDjl-project/registry.git"));'
# needs to add General registry again, if local registry was added
- julia --project=. -e 'import Pkg; Pkg.Registry.add(Pkg.RegistrySpec(url="https://github.com/JuliaRegistries/General"));'
- julia --project=. -e 'import Pkg; Pkg.instantiate()'
# paths of artifacts are relative to CI_PROJECT_DIR
- >
Expand Down Expand Up @@ -105,7 +109,7 @@ verify-unit-test-deps_julia1.10:
stage: verify-unit-test-deps
script:
- apt update && apt install -y git
- git clone --depth 1 -b dev https://github.com/QEDjl-project/QED.jl.git /QEDjl
- git clone --depth 1 -b dev https://github.com/QEDjl-project/QuantumElectrodynamics.jl.git /QEDjl
- >
if [[ $CI_COMMIT_BRANCH == "main" || $CI_COMMIT_REF_NAME == "main" || $CI_COMMIT_BRANCH == "dev" || $CI_COMMIT_REF_NAME == "dev" ]]; then
# does not check for custom package URLs on the main and dev branch
Expand Down
61 changes: 0 additions & 61 deletions CHANGELOG.md

This file was deleted.

8 changes: 4 additions & 4 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ authors = [
"Tom Jungnickel",
"Anton Reinhard",
]
version = "0.2.0"
version = "0.3.0"

[deps]
QEDbase = "10e22c08-3ccb-4172-bfcf-7d7aa3d04d93"
Expand All @@ -16,11 +16,11 @@ QuadGK = "1fd47b50-473d-5c70-9696-f719f8f3bcdc"
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"

[compat]
QEDbase = "0.2.2"
QEDcore = "0.1"
QEDbase = "0.3"
QEDcore = "0.2"
QuadGK = "2"
StaticArrays = "1"
julia = "1.6"
julia = "1.10"

[extras]
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ julia> Pkg.add("QEDprocesses")
or you use the Pkg prompt by hitting `]` within the Julia REPL and then type

```julia
(@v1.9) pkg> add QEDprocesses
(@v1.10) pkg> add QEDprocesses
```

To install the locally downloaded package on Windows, change to the parent directory and type within the Pkg prompt

```julia
(@v1.9) pkg> add ./QEDprocesses.jl
(@v1.10) pkg> add ./QEDprocesses.jl
```

## Building the documentation locally
Expand Down
9 changes: 6 additions & 3 deletions src/QEDprocesses.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,12 @@ module QEDprocesses
export ALPHA,
ALPHA_SQUARE, ELEMENTARY_CHARGE, ELEMENTARY_CHARGE_SQUARE, ELECTRONMASS, ONE_OVER_FOURPI

# propagator
export propagator

# specific compute models
export PerturbativeQED

# specific scattering processes
export Compton, omega_prime
export ScatteringProcess, isphysical

using QEDbase
using QEDcore
Expand All @@ -23,6 +21,11 @@ include("utils.jl")

include("models/models.jl")

# generic qed process
include("processes/generic_process/utility.jl")
include("processes/generic_process/process.jl")
include("processes/generic_process/perturbative/cross_section.jl")

# one photon compton
include("processes/one_photon_compton/process.jl")
include("processes/one_photon_compton/perturbative/kinematics.jl")
Expand Down
14 changes: 14 additions & 0 deletions src/models/perturbative_qed.jl
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,17 @@ function Base.show(io::IO, ::PerturbativeQED)
print(io, "perturbative QED")
return nothing
end

"""
isphysical(proc::AbstractProcessDefinition, model::PerturbativeQED)
A utility function that returns whether a given `AbstractProcessDefinition` conserves the number and charge of fermions and has at least 2 participating particles.
"""
function isphysical(proc::AbstractProcessDefinition, ::PerturbativeQED)
return (
number_particles(proc, Incoming(), Electron()) +
number_particles(proc, Outgoing(), Positron()) ==
number_particles(proc, Incoming(), Positron()) +
number_particles(proc, Outgoing(), Electron())
) && number_particles(proc, Incoming()) + number_particles(proc, Outgoing()) >= 2
end
20 changes: 20 additions & 0 deletions src/processes/generic_process/perturbative/cross_section.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# None of these functions are currently implemented.
# They will be implemented using the QEDFeynmanDiagrams project when that is released.

#=
function QEDbase._incident_flux(psp::InPhaseSpacePoint{<:ScatteringProcess,PerturbativeQED}) end
function QEDbase._matrix_element_squared(psp::PhaseSpacePoint{<:ScatteringProcess,PerturbativeQED})
proc = process(psp)
# by using FeynmanDiagramGenerator.jl
return proc.matrix_element_squared(psp)
end
function QEDbase._averaging_norm(proc::<:ScatteringProcess) end
function QEDbase._is_in_phasespace(psp::PhaseSpacePoint{<:ScatteringProcess,PerturbativeQED}) end
function QEDbase._phase_space_factor(
psp::PhaseSpacePoint{<:ScatteringProcess,PerturbativeQED,CustomPhasespaceDefinition}
) end
=#
Loading

0 comments on commit 78d5037

Please sign in to comment.