Skip to content

Commit 4a5735c

Browse files
committed
Initial Commit
0 parents  commit 4a5735c

22 files changed

+542
-0
lines changed

.JuliaFormatter.toml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Use SciML style: https://github.com/SciML/SciMLStyle
2+
style = "sciml"
3+
4+
# Python style alignment. See https://github.com/domluna/JuliaFormatter.jl/pull/732.
5+
yas_style_nesting = true
6+
7+
# Align struct fields for better readability of large struct definitions
8+
align_struct_field = true
9+
10+
# Allow Dict definitions to be aligned like arrays. See https://github.com/domluna/JuliaFormatter.jl/pull/676
11+
variable_call_indent = ["Dict"]

.codecov.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# xref: https://docs.codecov.io/docs/codecovyml-reference
2+
3+
# Disable annotations (annoying!)
4+
github_checks:
5+
annotations: false

.github/dependabot.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
2+
version: 2
3+
updates:
4+
- package-ecosystem: "github-actions"
5+
directory: "/" # Location of package manifests
6+
schedule:
7+
interval: "monthly"

.github/workflows/CompatHelper.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: CompatHelper
2+
on:
3+
schedule:
4+
- cron: 0 0 * * *
5+
workflow_dispatch:
6+
permissions:
7+
contents: write
8+
pull-requests: write
9+
jobs:
10+
CompatHelper:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Check if Julia is already available in the PATH
14+
id: julia_in_path
15+
run: which julia
16+
continue-on-error: true
17+
- name: Install Julia, but only if it is not already available in the PATH
18+
uses: julia-actions/setup-julia@v2
19+
with:
20+
version: '1'
21+
arch: ${{ runner.arch }}
22+
if: steps.julia_in_path.outcome != 'success'
23+
- name: "Add the General registry via Git"
24+
run: |
25+
import Pkg
26+
ENV["JULIA_PKG_SERVER"] = ""
27+
Pkg.Registry.add("General")
28+
shell: julia --color=yes {0}
29+
- name: "Install CompatHelper"
30+
run: |
31+
import Pkg
32+
name = "CompatHelper"
33+
uuid = "aa819f21-2bde-4658-8897-bab36330d9b7"
34+
version = "3"
35+
Pkg.add(; name, uuid, version)
36+
shell: julia --color=yes {0}
37+
- name: "Run CompatHelper"
38+
run: |
39+
import CompatHelper
40+
CompatHelper.main(; subdirs=["", "test", "docs"])
41+
shell: julia --color=yes {0}
42+
env:
43+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
44+
COMPATHELPER_PRIV: ${{ secrets.DOCUMENTER_KEY }}
45+
# COMPATHELPER_PRIV: ${{ secrets.COMPATHELPER_PRIV }}

.github/workflows/Documenter.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Documentation
2+
3+
on:
4+
push:
5+
branches:
6+
- 'main'
7+
tags: '*'
8+
paths-ignore:
9+
- '.github/workflows/ci.yml'
10+
- '.github/workflows/CompatHelper.yml'
11+
- '.github/workflows/TagBot.yml'
12+
pull_request:
13+
paths-ignore:
14+
- '.github/workflows/ci.yml'
15+
- '.github/workflows/CompatHelper.yml'
16+
- '.github/workflows/TagBot.yml'
17+
workflow_dispatch:
18+
19+
concurrency:
20+
# Skip intermediate builds: always.
21+
# Cancel intermediate builds: only if it is a pull request build.
22+
group: ${{ github.workflow }}-${{ github.ref }}
23+
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
24+
25+
jobs:
26+
build-docs:
27+
name: Build and Deploy Documentation
28+
runs-on: ubuntu-latest
29+
steps:
30+
- name: Check out project
31+
uses: actions/checkout@v4
32+
- name: Set up Julia
33+
uses: julia-actions/setup-julia@v2
34+
with:
35+
version: '1'
36+
show-versioninfo: true
37+
- uses: julia-actions/cache@v1
38+
- name: Build package
39+
uses: julia-actions/julia-buildpkg@v1
40+
- name: Install dependencies
41+
run: julia --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate()'
42+
- name: Build and deploy
43+
env:
44+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
45+
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} # For authentication with SSH deploy key
46+
run: julia --project=docs --color=yes docs/make.jl

.github/workflows/FormatCheck.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Format Check
2+
3+
on:
4+
push:
5+
branches:
6+
- 'main'
7+
tags: '*'
8+
pull_request:
9+
10+
jobs:
11+
check-format:
12+
name: Check format with JuliaFormatter.jl
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Check out project
16+
uses: actions/checkout@v4
17+
- name: Set up Julia
18+
uses: julia-actions/setup-julia@v2
19+
with:
20+
version: '1'
21+
- run: julia -e 'using InteractiveUtils; versioninfo(verbose=true)'
22+
- uses: julia-actions/cache@v1
23+
- name: Install JuliaFormatter and format
24+
# This will use the latest version by default but you can set the version like so:
25+
#
26+
# julia -e 'using Pkg; Pkg.add(PackageSpec(name = "JuliaFormatter", version = "0.13.0"))'
27+
run: |
28+
julia -e 'using Pkg; Pkg.add(PackageSpec(name = "JuliaFormatter", version="1.0.45"))'
29+
julia -e 'using JuliaFormatter; format(".")'
30+
- name: Format check
31+
run: |
32+
julia -e '
33+
out = Cmd(`git diff --name-only`) |> read |> String
34+
if out == ""
35+
exit(0)
36+
else
37+
@error "Some files have not been formatted !!!"
38+
write(stdout, out)
39+
exit(1)
40+
end'

.github/workflows/SpellCheck.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: Spell Check
2+
3+
on: [pull_request, workflow_dispatch]
4+
5+
jobs:
6+
typos-check:
7+
name: Spell Check with Typos
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Checkout Actions Repository
11+
uses: actions/checkout@v4
12+
- name: Check spelling
13+
uses: crate-ci/[email protected]

.github/workflows/TagBot.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: TagBot
2+
on:
3+
issue_comment:
4+
types:
5+
- created
6+
workflow_dispatch:
7+
inputs:
8+
lookback:
9+
default: 3
10+
permissions:
11+
actions: read
12+
checks: read
13+
contents: write
14+
deployments: read
15+
issues: read
16+
discussions: read
17+
packages: read
18+
pages: read
19+
pull-requests: read
20+
repository-projects: read
21+
security-events: read
22+
statuses: read
23+
jobs:
24+
TagBot:
25+
if: github.event_name == 'workflow_dispatch' || github.actor == 'JuliaTagBot'
26+
runs-on: ubuntu-latest
27+
steps:
28+
- uses: JuliaRegistries/TagBot@v1
29+
with:
30+
token: ${{ secrets.GITHUB_TOKEN }}
31+
ssh: ${{ secrets.DOCUMENTER_KEY }}

.github/workflows/ci.yml

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
tags: ['*']
8+
paths-ignore:
9+
- 'CITATION.bib'
10+
- 'LICENSE.md'
11+
- 'README.md'
12+
- '.zenodo.json'
13+
- '.github/workflows/CompatHelper.yml'
14+
- '.github/workflows/SpellCheck.yml'
15+
- '.github/workflows/TagBot.yml'
16+
- 'docs/**'
17+
pull_request:
18+
paths-ignore:
19+
- 'CITATION.bib'
20+
- 'LICENSE.md'
21+
- 'README.md'
22+
- '.zenodo.json'
23+
- '.github/workflows/CompatHelper.yml'
24+
- '.github/workflows/SpellCheck.yml'
25+
- '.github/workflows/TagBot.yml'
26+
- 'docs/**'
27+
workflow_dispatch:
28+
29+
concurrency:
30+
# Skip intermediate builds: always.
31+
# Cancel intermediate builds: only if it is a pull request build.
32+
group: ${{ github.workflow }}-${{ github.ref }}
33+
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
34+
35+
jobs:
36+
build:
37+
name: Run Tests (Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }})
38+
runs-on: ubuntu-latest
39+
strategy:
40+
# Don't cancel all running jobs when one job fails
41+
fail-fast: false
42+
matrix:
43+
version:
44+
- '1.9'
45+
- '1'
46+
os:
47+
- ubuntu-latest
48+
arch:
49+
- x64
50+
include:
51+
# Also run tests on Windows and macOS-ARM, but only with the latest Julia version
52+
- version: '1'
53+
os: windows-latest
54+
arch: x64
55+
- version: '1'
56+
os: macos-14
57+
arch: arm64
58+
59+
steps:
60+
- name: Check out project
61+
uses: actions/checkout@v4
62+
- name: Set up Julia
63+
uses: julia-actions/setup-julia@v2
64+
with:
65+
version: ${{ matrix.version }}
66+
- run: julia -e 'using InteractiveUtils; versioninfo(verbose=true)'
67+
- uses: julia-actions/cache@v1
68+
- name: Build package
69+
uses: julia-actions/julia-buildpkg@v1
70+
- name: Run tests
71+
uses: julia-actions/julia-runtest@v1
72+
with:
73+
annotate: true
74+
# Only run coverage in one Job (Ubuntu and latest Julia version)
75+
coverage: ${{ matrix.os == 'ubuntu-latest' && matrix.version == '1' }}
76+
- name: Process coverage results
77+
# Only run coverage in one Job (Ubuntu and latest Julia version)
78+
if: matrix.os == 'ubuntu-latest' && matrix.version == '1'
79+
uses: julia-actions/julia-processcoverage@v1
80+
with:
81+
directories: src,test
82+
- name: Upload coverage report to Codecov
83+
# Only run coverage in one Job (Ubuntu and latest Julia version)
84+
if: matrix.os == 'ubuntu-latest' && matrix.version == '1'
85+
uses: codecov/codecov-action@v4
86+
with:
87+
files: lcov.info
88+
fail_ci_if_error: true
89+
flags: unit
90+
env:
91+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

.gitignore

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
Manifest.toml
2+
docs/build
3+
docs/src/index.md
4+
docs/src/authors.md
5+
docs/src/license.md
6+
public/
7+
coverage/
8+
coverage_report/
9+
*.jl.*.cov
10+
.vscode/
11+
run
12+
13+
.DS_Store
14+
15+
LocalPreferences.toml

0 commit comments

Comments
 (0)