-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Releases version 0.1.0 to main
- Loading branch information
Showing
25 changed files
with
1,069 additions
and
180 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
style = "blue" |
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,2 @@ | ||
[deps] | ||
JuliaFormatter = "98e50ef6-434e-11e9-1051-2b60c6c9e899" |
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,12 @@ | ||
using JuliaFormatter | ||
|
||
# we asume the format_all.jl script is located in QEDfields.jl/.formatting | ||
project_path = Base.Filesystem.joinpath(Base.Filesystem.dirname(Base.source_path()), "..") | ||
|
||
not_formatted = format(project_path; verbose=true) | ||
if not_formatted | ||
@info "Formatting verified." | ||
else | ||
@warn "Formatting verification failed: Some files are not properly formatted!" | ||
end | ||
exit(not_formatted ? 0 : 1) |
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,32 @@ | ||
name: Build and Deploy Documentation | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
- dev | ||
tags: "*" | ||
pull_request: | ||
|
||
jobs: | ||
build: | ||
permissions: | ||
contents: write | ||
statuses: write | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: julia-actions/setup-julia@v1 | ||
with: | ||
version: "1.10" | ||
- name: Add custom registry | ||
run: | | ||
julia --project=docs/ -e 'import Pkg; Pkg.Registry.add(Pkg.RegistrySpec(url="https://github.com/QEDjl-project/registry.git"));' | ||
julia --project=docs/ -e 'import Pkg; Pkg.Registry.add(Pkg.RegistrySpec(url="https://github.com/JuliaRegistries/General"));' | ||
- name: Install dependencies | ||
run: | | ||
julia --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate()' | ||
- name: Build and deploy | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # If authenticating with GitHub Actions token | ||
run: julia --project=docs/ docs/make.jl |
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,16 @@ | ||
name: formatter | ||
on: [pull_request] | ||
jobs: | ||
formatter: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: checkout repo | ||
uses: actions/checkout@v4 | ||
- name: install Julia | ||
uses: julia-actions/setup-julia@v1 | ||
with: | ||
version: 1.10 | ||
- name: Install Julia requirements | ||
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 |
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 |
---|---|---|
@@ -1 +1,7 @@ | ||
/docs/build/ | ||
docs/build/ | ||
|
||
# File generated by Pkg, the package manager, based on a corresponding Project.toml | ||
# It records a fixed state of all packages used by the project. As such, it should not be | ||
# committed for packages, but should be committed for applications that require a static | ||
# environment. | ||
Manifest.toml |
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,120 @@ | ||
stages: | ||
- unit-test | ||
- generate_integration_test | ||
- run_integration_test | ||
- verify-unit-test-deps | ||
|
||
.untit_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 | ||
- julia --project=. -e 'import Pkg; Pkg.Registry.add(Pkg.RegistrySpec(url="https://github.com/QEDjl-project/registry.git"));' | ||
- julia --project=. -e 'import Pkg; Pkg.Registry.add(Pkg.RegistrySpec(url="https://github.com/JuliaRegistries/General"));' | ||
- > | ||
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 | ||
else | ||
julia --project=. /QEDjl/.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)' | ||
interruptible: true | ||
tags: | ||
- cpuonly | ||
|
||
unit_tests_releases: | ||
extends: .untit_test_template | ||
parallel: | ||
matrix: | ||
- JULIA_VERSION: ["1.6", "1.7", "1.8", "1.9", "1.10", "rc"] | ||
image: julia:$JULIA_VERSION | ||
|
||
unit_tests_nightly: | ||
extends: .untit_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 | ||
# 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_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 | ||
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 | ||
else | ||
echo "unknown runner architecture -> $CI_RUNNER_EXECUTABLE_ARCH" | ||
exit 1 | ||
fi | ||
- tar -xf $JULIA_DONWLOAD/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 | ||
|
||
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 | ||
- 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 | ||
- > | ||
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=. src/integTestGen.jl NO_MESSAGE > $CI_PROJECT_DIR/integrationjobs.yaml | ||
else | ||
julia --project=. src/integTestGen.jl > $CI_PROJECT_DIR/integrationjobs.yaml | ||
fi | ||
- cat $CI_PROJECT_DIR/integrationjobs.yaml | ||
artifacts: | ||
paths: | ||
- integrationjobs.yaml | ||
expire_in: 1 week | ||
interruptible: true | ||
tags: | ||
- cpuonly | ||
|
||
run_integration_tests: | ||
stage: run_integration_test | ||
trigger: | ||
include: | ||
- artifact: integrationjobs.yaml | ||
job: generate_integration_tests | ||
strategy: depend | ||
|
||
verify-unit-test-deps_julia1.10: | ||
image: julia:1.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 | ||
- > | ||
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 | ||
echo "no custom package URL check necessary" | ||
else | ||
julia /QEDjl/.ci/verify_env.jl | ||
fi | ||
interruptible: true | ||
tags: | ||
- cpuonly |
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,29 @@ | ||
# Changelog | ||
|
||
## Version 0.1.0 | ||
|
||
**Initial Release** | ||
|
||
### New features | ||
|
||
- [#14](https://github.com/QEDjl-project/QEDfields.jl/pull/14): Add interface for pulsed plane-wave fields (`AbstractBackgroundField`) | ||
- [#24](https://github.com/QEDjl-project/QEDfields.jl/pull/24): Add Cos Square Pulse background field implementation | ||
|
||
### Maintenance | ||
|
||
- [#3](https://github.com/QEDjl-project/QEDfields.jl/pull/3): Add unit testing | ||
- [#5](https://github.com/QEDjl-project/QEDfields.jl/pull/5): Add integration tests | ||
- [#8](https://github.com/QEDjl-project/QEDfields.jl/pull/8): Add install instructions | ||
- [#11](https://github.com/QEDjl-project/QEDfields.jl/pull/11): Add JuliaFormatter | ||
- [#12](https://github.com/QEDjl-project/QEDfields.jl/pull/12): Remove Manifest.toml | ||
- [#13](https://github.com/QEDjl-project/QEDfields.jl/pull/13): Move CI formatting job to github actions | ||
- [#15](https://github.com/QEDjl-project/QEDfields.jl/pull/15): Add documentation build and deploy jobs to CI | ||
- [#17](https://github.com/QEDjl-project/QEDfields.jl/pull/17): Run unit tests with additional Julia versions | ||
- [#18](https://github.com/QEDjl-project/QEDfields.jl/pull/18): Fix compat helper | ||
- [#19](https://github.com/QEDjl-project/QEDfields.jl/pull/19): Run compat helper only on upstream repository | ||
- [#26](https://github.com/QEDjl-project/QEDfields.jl/pull/26): Refactor cos square pulse implementation | ||
- [#29](https://github.com/QEDjl-project/QEDfields.jl/pull/29): QED.jl refactoring | ||
- [#30](https://github.com/QEDjl-project/QEDfields.jl/pull/30): Use QEDcore.jl implementations over QEDbase | ||
- [#34](https://github.com/QEDjl-project/QEDfields.jl/pull/34): Refactoring cleanup | ||
- [#36](https://github.com/QEDjl-project/QEDfields.jl/pull/36): Add Julia 1.10 and rc to CI testing versions | ||
- [#39](https://github.com/QEDjl-project/QEDfields.jl/pull/39): Cleanup work for 0.1.0 release |
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,7 +1,32 @@ | ||
name = "QEDfields" | ||
uuid = "ac3a6c97-e859-4b9f-96bb-63d2a216042c" | ||
authors = ["Uwe Hernandez Acosta <[email protected]>", "Simeon Ehrig", "Klaus Steiniger", "Tom Jungnickel", "Anton Reinhard"] | ||
authors = [ | ||
"Uwe Hernandez Acosta <[email protected]>", | ||
"Simeon Ehrig", | ||
"Klaus Steiniger", | ||
"Tom Jungnickel", | ||
"Anton Reinhard", | ||
] | ||
version = "0.1.0" | ||
|
||
[deps] | ||
IntervalSets = "8197267c-284f-5f27-9208-e0e47529a953" | ||
QEDbase = "10e22c08-3ccb-4172-bfcf-7d7aa3d04d93" | ||
QEDcore = "35dc0263-cb5f-4c33-a114-1d7f54ab753e" | ||
QuadGK = "1fd47b50-473d-5c70-9696-f719f8f3bcdc" | ||
|
||
[compat] | ||
julia = "1.9" | ||
QEDbase = "0.2.2" | ||
QEDcore = "0.1" | ||
IntervalSets = "0.7" | ||
QuadGK = "2" | ||
julia = "1.6" | ||
|
||
[extras] | ||
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" | ||
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" | ||
SafeTestsets = "1bc83da4-3b8d-516f-aca4-4fe02f6d838f" | ||
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" | ||
|
||
[targets] | ||
test = ["Pkg", "Random", "SafeTestsets", "Test"] |
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 |
---|---|---|
@@ -1,3 +1,39 @@ | ||
# QEDfields | ||
|
||
[![Doc Stable](https://img.shields.io/badge/docs-stable-blue.svg)](https://qedjl-project.github.io/QEDfields.jl/main) | ||
[![Doc Dev](https://img.shields.io/badge/docs-dev-blue.svg)](https://qedjl-project.github.io/QEDfields.jl/dev) | ||
[![Code Style: Blue](https://img.shields.io/badge/code%20style-blue-4495d1.svg)](https://github.com/invenia/BlueStyle) | ||
|
||
## Installation | ||
|
||
To install the current stable version of `QEDfields.jl` you may use the standard julia package manager within the julia REPL | ||
|
||
```julia | ||
julia> using Pkg | ||
julia> Pkg.add("QEDfields") | ||
``` | ||
|
||
or you use the Pkg prompt by hitting `]` within the Julia REPL and then type | ||
|
||
```julia | ||
(@v1.10) pkg> add QEDfields | ||
``` | ||
|
||
To install the locally downloaded package on Windows, change to the parent directory and type within the Pkg prompt | ||
|
||
```julia | ||
(@v1.10) pkg> add ./QEDfields.jl | ||
``` | ||
|
||
# Development | ||
|
||
## Formatting | ||
|
||
We use [JuliaFormatter.jl](https://domluna.github.io/JuliaFormatter.jl/dev/) and the [Blue style](https://github.com/invenia/BlueStyle) to format our code. The correct form of the code is checked by a CI job. To format the code manually, run the following commands: | ||
|
||
```bash | ||
# install dependencies | ||
julia --project=.formatting -e 'import Pkg; Pkg.instantiate()' | ||
# format all documents | ||
julia --project=.formatting .formatting/format_all.jl | ||
``` |
Oops, something went wrong.