Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert files to proper Julia Package format #3

Merged
merged 7 commits into from
Dec 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
version: 2
updates:
# Maintain dependencies for GitHub Actions
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
64 changes: 64 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: CI
on:
push:
branches:
- main
tags: ['*']
pull_request:
concurrency:
# Skip intermediate builds: always.
# Cancel intermediate builds: only if it is a pull request build.
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
jobs:
test:
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
version:
- "1"
- "1.9"
# - "nightly"
os:
- ubuntu-latest
# - macos-latest
# - windows-latest
arch:
- x86
- x64
steps:
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@v1
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
- uses: julia-actions/cache@v1
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-runtest@v1
- uses: julia-actions/julia-processcoverage@v1
- uses: codecov/codecov-action@v2
with:
files: lcov.info
docs:
name: Documentation
runs-on: ubuntu-latest
permissions:
contents: write
statuses: write
steps:
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@v1
with:
version: '1'
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-docdeploy@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- run: |
julia --project=docs -e '
using Documenter: DocMeta, doctest
using DormandPrince
DocMeta.setdocmeta!(DormandPrince, :DocTestSetup, :(using DormandPrince); recursive=true)
doctest(DormandPrince)'
16 changes: 16 additions & 0 deletions .github/workflows/CompatHelper.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: CompatHelper
on:
schedule:
- cron: 0 0 * * *
workflow_dispatch:
jobs:
CompatHelper:
runs-on: ubuntu-latest
steps:
- name: Pkg.add("CompatHelper")
run: julia -e 'using Pkg; Pkg.add("CompatHelper")'
- name: CompatHelper.main()
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COMPATHELPER_PRIV: ${{ secrets.DOCUMENTER_KEY }}
run: julia -e 'using CompatHelper; CompatHelper.main()'
44 changes: 44 additions & 0 deletions .github/workflows/TagBot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: TagBot
on:
issue_comment:
types:
- created
workflow_dispatch:
jobs:
TagBot:
if: github.event_name == 'workflow_dispatch' || github.actor == '{{{TRIGGER}}}'
runs-on: ubuntu-latest
steps:
- uses: JuliaRegistries/TagBot@v1
with:
token: {{{TOKEN}}}
{{#SSH}}
ssh: {{{SSH}}}
{{/SSH}}
{{#SSH_PASSWORD}}
ssh_password: {{{SSH_PASSWORD}}}
{{/SSH_PASSWORD}}
{{#CHANGELOG}}
changelog: {{{CHANGELOG}}}
{{/CHANGELOG}}
{{#CHANGELOG_IGNORE}}
changelog_ignore: {{{CHANGELOG_IGNORE}}}
{{/CHANGELOG_IGNORE}}
{{#GPG}}
gpg: {{{GPG}}}
{{/GPG}}
{{#GPG_PASSWORD}}
gpg_password: {{{GPG_PASSWORD}}}
{{/GPG_PASSWORD}}
{{#REGISTRY}}
registry: {{{REGISTRY}}}
{{/REGISTRY}}
{{#BRANCHES}}
branches: {{{BRANCHES}}}
{{/BRANCHES}}
{{#DISPATCH}}
dispatch: {{{DISPATCH}}}
{{/DISPATCH}}
{{#DISPATCH_DELAY}}
dispatch_delay: {{{DISPATCH_DELAY}}}
{{/DISPATCH_DELAY}}
13 changes: 10 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
.vscode/
.CondaPkg/
/.vscode
**/**/**.cov

/Manifest.toml
/docs/build/
/docs/Manifest.toml
/docs/src/assets/main.css
/docs/src/assets/indigo.css

.DS_Store
Manifest.toml
.CondaPkg
13 changes: 13 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Copyright 2023 John Long

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
13 changes: 8 additions & 5 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
name = "DormandPrince"
uuid = "5e45e72d-22b8-4dd0-9c8b-f96714864bcd"
authors = ["John Long<[email protected]>",]
version = "0.1.0"

[deps]
BenchmarkTools = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf"
Bloqade = "bd27d05e-4ce1-5e79-84dd-c5d7d508bbe1"
DifferentialEquations = "0c46a032-eb83-5123-abaf-570d42b7fbaa"
JET = "c3a54625-cd67-489e-a8e7-0a5a0ff4e31b"
OrdinaryDiffEq = "1dea7af3-3e70-54e6-95c3-0bf5283fa5ed"

[compat]
julia = "1.9"
25 changes: 25 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# DormandPrince

Julia-native implementation of the Dormand-Prince 5th order solver

## Installation

<p>
DormandPrince is a &nbsp;
<a href="https://julialang.org">
<img src="https://raw.githubusercontent.com/JuliaLang/julia-logo-graphics/master/images/julia.ico" width="16em">
Julia Language
</a>
&nbsp; package. To install DormandPrince,
please <a href="https://docs.julialang.org/en/v1/manual/getting-started/">open
Julia's interactive session (known as REPL)</a> and press <kbd>]</kbd>
key in the REPL to use the package mode, then type the following command
</p>

```julia
pkg> add DormandPrince
```

## License

Apache License 2.0
3 changes: 3 additions & 0 deletions benchmarks/Project.toml
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove this file.

Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[deps]
BenchmarkTools = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf"
DifferentialEquations = "0c46a032-eb83-5123-abaf-570d42b7fbaa"
31 changes: 0 additions & 31 deletions benchmarks/dp5_profile_calls.jl

This file was deleted.

26 changes: 0 additions & 26 deletions benchmarks/ordinarydiffeq_profile_calls.jl

This file was deleted.

19 changes: 19 additions & 0 deletions benchmarks/rabi-diffeq.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
using DifferentialEquations
using BenchmarkTools


function f(du, u, p, t)
g(t) = 2.2*2π*sin(2π*t)

du[1] = -1im * g(t)/2 * u[2]
du[2] = -1im * g(t)/2 * u[1]
end

u0 = ComplexF64[1.0, 0.0]
tspan = (0.0, 2π)
prob = ODEProblem(f, u0, tspan)
# get precompilation out of the way
sol = solve(prob, DP5(), reltol=1e-10, abstol=1e-10)

# terminate benchmark after maximum of 5 minutes
@benchmark solve(prob, DP5(), reltol=1e-10, abstol=1e-10) samples=10000 evals=5 seconds=300
19 changes: 19 additions & 0 deletions benchmarks/rabi-dormand-prince.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
using BenchmarkTools
using DormandPrince:DP5Solver, dopri5

function fcn(x, y, f)
g(x) = 2.2*2π*sin(2π*x)

f[1] = -1im * g(x)/2 * y[2]
f[2] = -1im * g(x)/2 * y[1]
end

solver = DP5Solver(
fcn,
0.0,
ComplexF64[1.0, 0.0]
)

dopri5(solver, 2π)

@benchmark dopri5(clean_solver, 2π) setup=(clean_solver = DP5Solver(fcn, 0.0, ComplexF64[1.0, 0.0])) samples=10000 evals=5 seconds=500
19 changes: 0 additions & 19 deletions benchmarks/single_atom_bloqade.jl

This file was deleted.

43 changes: 0 additions & 43 deletions benchmarks/single_atom_dp5.jl

This file was deleted.

12 changes: 0 additions & 12 deletions benchmarks/struct_profiler.jl

This file was deleted.

Loading
Loading