From 5fb47cdda39b8da9fa6563a1d4f5a79c4bc93c91 Mon Sep 17 00:00:00 2001 From: AntonReinhard Date: Fri, 5 Jul 2024 17:44:38 +0200 Subject: [PATCH 1/2] Add reexport to export QEDbase symbols --- .github/workflows/formatter.yaml | 1 - Project.toml | 1 + src/QEDcore.jl | 4 +++- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/formatter.yaml b/.github/workflows/formatter.yaml index ee378c2..3a98451 100644 --- a/.github/workflows/formatter.yaml +++ b/.github/workflows/formatter.yaml @@ -14,4 +14,3 @@ jobs: run: julia --project=${GITHUB_WORKSPACE}/.formatting -e 'import Pkg; Pkg.instantiate()' - name: Check code style run: julia --project=${GITHUB_WORKSPACE}/.formatting ${GITHUB_WORKSPACE}/.formatting/format_all.jl - diff --git a/Project.toml b/Project.toml index b58d851..1ab25b8 100644 --- a/Project.toml +++ b/Project.toml @@ -7,6 +7,7 @@ version = "0.0.1-DEV" DocStringExtensions = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae" LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" QEDbase = "10e22c08-3ccb-4172-bfcf-7d7aa3d04d93" +Reexport = "189a3867-3050-52da-a836-e630ba90ab69" SafeTestsets = "1bc83da4-3b8d-516f-aca4-4fe02f6d838f" SimpleTraits = "699a6c99-e7fa-54fc-8d76-47d257e15c1d" SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" diff --git a/src/QEDcore.jl b/src/QEDcore.jl index 8776223..af51154 100644 --- a/src/QEDcore.jl +++ b/src/QEDcore.jl @@ -35,11 +35,13 @@ export PhasespaceDefinition export ParticleStateful, PhaseSpacePoint, InPhaseSpacePoint, OutPhaseSpacePoint export spin, polarization, momenta, getindex -using QEDbase +using Reexport using DocStringExtensions using StaticArrays using SimpleTraits +@reexport using QEDbase + include("algebraic_objects/dirac_tensors/types.jl") include("algebraic_objects/dirac_tensors/multiplication.jl") From e451cd17cf9411c6ddc56655886896d10f5a53fd Mon Sep 17 00:00:00 2001 From: AntonReinhard Date: Fri, 5 Jul 2024 17:45:49 +0200 Subject: [PATCH 2/2] Remove superfluous using QEDbase statements --- src/phase_spaces/types.jl | 4 ++-- test/algebraic_objects/dirac_tensor.jl | 1 - test/algebraic_objects/four_momentum.jl | 1 - test/algebraic_objects/gamma_matrices.jl | 1 - test/algebraic_objects/lorentz_vector.jl | 1 - test/interfaces/process.jl | 1 - test/particles/propagators.jl | 1 - test/particles/spinors.jl | 1 - test/particles/states.jl | 1 - test/particles/types.jl | 1 - test/phase_spaces.jl | 1 - test/test_implementation/TestImplementation.jl | 1 - 12 files changed, 2 insertions(+), 13 deletions(-) diff --git a/src/phase_spaces/types.jl b/src/phase_spaces/types.jl index a333c6f..6707ac2 100644 --- a/src/phase_spaces/types.jl +++ b/src/phase_spaces/types.jl @@ -41,7 +41,7 @@ Representation of a particle with a state. It has four fields: Overloads for `is_fermion`, `is_boson`, `is_particle`, `is_anti_particle`, `is_incoming`, `is_outgoing`, `mass`, and `charge` are provided, delegating the call to the correct field and thus implementing the `AbstractParticle` interface. ```jldoctest -julia> using QEDcore; using QEDbase +julia> using QEDcore julia> ParticleStateful(Incoming(), Electron(), SFourMomentum(1, 0, 0, 0)) ParticleStateful: incoming electron @@ -76,7 +76,7 @@ Representation of a point in the phase space of a process. Contains the process The legality of the combination of the given process and the incoming and outgoing particles is checked on construction. If the numbers of particles mismatch, the types of particles mismatch (note that order is important), or incoming particles have an `Outgoing` direction, an error is thrown. ```jldoctest -julia> using QEDcore; using QEDbase; using QEDprocesses +julia> using QEDcore; using QEDprocesses julia> PhaseSpacePoint( Compton(), diff --git a/test/algebraic_objects/dirac_tensor.jl b/test/algebraic_objects/dirac_tensor.jl index cdc4d2e..97af989 100644 --- a/test/algebraic_objects/dirac_tensor.jl +++ b/test/algebraic_objects/dirac_tensor.jl @@ -1,5 +1,4 @@ using QEDcore -using QEDbase using StaticArrays unary_methods = [-, +] diff --git a/test/algebraic_objects/four_momentum.jl b/test/algebraic_objects/four_momentum.jl index 47db533..033fe5e 100644 --- a/test/algebraic_objects/four_momentum.jl +++ b/test/algebraic_objects/four_momentum.jl @@ -1,5 +1,4 @@ using QEDcore -using QEDbase using Random const ATOL = 1e-15 diff --git a/test/algebraic_objects/gamma_matrices.jl b/test/algebraic_objects/gamma_matrices.jl index 1c837c7..00d16b1 100644 --- a/test/algebraic_objects/gamma_matrices.jl +++ b/test/algebraic_objects/gamma_matrices.jl @@ -1,5 +1,4 @@ using QEDcore -using QEDbase using LinearAlgebra using Random using SparseArrays diff --git a/test/algebraic_objects/lorentz_vector.jl b/test/algebraic_objects/lorentz_vector.jl index 135f21b..acd8e24 100644 --- a/test/algebraic_objects/lorentz_vector.jl +++ b/test/algebraic_objects/lorentz_vector.jl @@ -1,5 +1,4 @@ using QEDcore -using QEDbase using StaticArrays unary_methods = [-, +] diff --git a/test/interfaces/process.jl b/test/interfaces/process.jl index e4e067f..672c272 100644 --- a/test/interfaces/process.jl +++ b/test/interfaces/process.jl @@ -1,5 +1,4 @@ using Random -using QEDbase using QEDcore RNG = MersenneTwister(137137) diff --git a/test/particles/propagators.jl b/test/particles/propagators.jl index 771502e..8000ac2 100644 --- a/test/particles/propagators.jl +++ b/test/particles/propagators.jl @@ -1,5 +1,4 @@ using Random -using QEDbase using QEDcore RNG = MersenneTwister(137137) diff --git a/test/particles/spinors.jl b/test/particles/spinors.jl index abe097a..7d424c7 100644 --- a/test/particles/spinors.jl +++ b/test/particles/spinors.jl @@ -1,4 +1,3 @@ -using QEDbase using QEDcore using Random diff --git a/test/particles/states.jl b/test/particles/states.jl index bb7ad31..36dd488 100644 --- a/test/particles/states.jl +++ b/test/particles/states.jl @@ -1,4 +1,3 @@ -using QEDbase using QEDcore using StaticArrays using Random diff --git a/test/particles/types.jl b/test/particles/types.jl index 6832d6a..6844a11 100644 --- a/test/particles/types.jl +++ b/test/particles/types.jl @@ -1,4 +1,3 @@ -using QEDbase using QEDcore using StaticArrays using Random diff --git a/test/phase_spaces.jl b/test/phase_spaces.jl index 6ef7a06..00db741 100644 --- a/test/phase_spaces.jl +++ b/test/phase_spaces.jl @@ -1,6 +1,5 @@ using Random using StaticArrays -using QEDbase using QEDcore include("test_implementation/TestImplementation.jl") diff --git a/test/test_implementation/TestImplementation.jl b/test/test_implementation/TestImplementation.jl index 5197738..4aea106 100644 --- a/test/test_implementation/TestImplementation.jl +++ b/test/test_implementation/TestImplementation.jl @@ -26,7 +26,6 @@ export TestProcess, TestProcess_FAIL export TestPhasespaceDef, TestPhasespaceDef_FAIL using Random -using QEDbase using QEDcore using StaticArrays