Skip to content

Commit fadcc56

Browse files
oschulzRCS-77VasylHafychsthayashi
committed
Import AHMI code from BAT.jl
Co-authored-by: Rafael Schick <[email protected]> Co-authored-by: Vasyl Hafych <[email protected]> Co-authored-by: Scott Hayashi <[email protected]>
1 parent c2d59bc commit fadcc56

35 files changed

+4074
-0
lines changed

.codecov.yml

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# comment: false

.github/workflows/CompatHelper.yml

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: CompatHelper
2+
on:
3+
schedule:
4+
- cron: 0 0 * * *
5+
workflow_dispatch:
6+
jobs:
7+
CompatHelper:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: "Add the General registry via Git"
11+
run: |
12+
import Pkg
13+
ENV["JULIA_PKG_SERVER"] = ""
14+
Pkg.Registry.add("General")
15+
shell: julia --color=yes {0}
16+
- name: "Install CompatHelper"
17+
run: |
18+
import Pkg
19+
name = "CompatHelper"
20+
uuid = "aa819f21-2bde-4658-8897-bab36330d9b7"
21+
version = "3"
22+
Pkg.add(; name, uuid, version)
23+
shell: julia --color=yes {0}
24+
- name: "Run CompatHelper"
25+
run: |
26+
import CompatHelper
27+
CompatHelper.main()
28+
shell: julia --color=yes {0}
29+
env:
30+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
31+
COMPATHELPER_PRIV: ${{ secrets.DOCUMENTER_KEY }}
32+
# COMPATHELPER_PRIV: ${{ secrets.COMPATHELPER_PRIV }}

.github/workflows/TagBot.yml

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: TagBot
2+
on:
3+
issue_comment:
4+
types:
5+
- created
6+
workflow_dispatch:
7+
jobs:
8+
TagBot:
9+
if: github.event_name == 'workflow_dispatch' || github.actor == 'JuliaTagBot'
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: JuliaRegistries/TagBot@v1
13+
with:
14+
token: ${{ secrets.GITHUB_TOKEN }}
15+
ssh: ${{ secrets.DOCUMENTER_KEY }}

.github/workflows/ci.yml

+101
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- dev
8+
- 'releases/**'
9+
tags: '*'
10+
pull_request:
11+
release:
12+
13+
concurrency:
14+
# Skip intermediate builds: always.
15+
# Cancel intermediate builds: only if it is a pull request build.
16+
group: ${{ github.workflow }}-${{ github.ref }}
17+
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
18+
19+
jobs:
20+
test:
21+
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
22+
runs-on: ${{ matrix.os }}
23+
continue-on-error: ${{ matrix.version == 'nightly' }}
24+
strategy:
25+
fail-fast: false
26+
matrix:
27+
version:
28+
- '1.6'
29+
- '1'
30+
# - 'nightly'
31+
os:
32+
- ubuntu-latest
33+
arch:
34+
- x64
35+
include:
36+
- version: 1
37+
os: ubuntu-latest
38+
arch: x86
39+
- version: 1
40+
os: macOS-latest
41+
arch: x64
42+
- version: 1
43+
os: windows-latest
44+
arch: x64
45+
steps:
46+
- uses: actions/checkout@v2
47+
- uses: julia-actions/setup-julia@latest
48+
with:
49+
version: ${{ matrix.version }}
50+
arch: ${{ matrix.arch }}
51+
- name: Cache artifacts
52+
uses: actions/cache@v2
53+
env:
54+
cache-name: cache-artifacts
55+
with:
56+
path: ~/.julia/artifacts
57+
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
58+
restore-keys: |
59+
${{ runner.os }}-test-${{ env.cache-name }}-
60+
${{ runner.os }}-test-
61+
${{ runner.os }}-
62+
- uses: julia-actions/julia-buildpkg@latest
63+
env:
64+
PYTHON: 'Conda'
65+
- uses: julia-actions/julia-runtest@latest
66+
with:
67+
coverage: ${{ matrix.version == '1' && matrix.os == 'ubuntu-latest' && matrix.arch == 'x64' }}
68+
- uses: julia-actions/julia-processcoverage@v1
69+
if: matrix.version == '1' && matrix.os == 'ubuntu-latest' && matrix.arch == 'x64'
70+
- uses: codecov/codecov-action@v1
71+
if: matrix.version == '1' && matrix.os == 'ubuntu-latest' && matrix.arch == 'x64'
72+
with:
73+
file: lcov.info
74+
docs:
75+
name: Documentation
76+
runs-on: ubuntu-latest
77+
steps:
78+
- uses: actions/checkout@v2
79+
- uses: julia-actions/setup-julia@latest
80+
with:
81+
version: '1'
82+
- name: Cache artifacts
83+
uses: actions/cache@v2
84+
env:
85+
cache-name: cache-artifacts
86+
with:
87+
path: ~/.julia/artifacts
88+
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/docs/Project.toml') }}
89+
restore-keys: |
90+
${{ runner.os }}-test-${{ env.cache-name }}-
91+
${{ runner.os }}-test-
92+
${{ runner.os }}-
93+
- uses: julia-actions/julia-buildpkg@latest
94+
env:
95+
PYTHON: 'Conda'
96+
- uses: julia-actions/julia-docdeploy@latest
97+
env:
98+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
99+
# Needed due to https://github.com/JuliaDocs/Documenter.jl/issues/1177
100+
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}
101+
GKSwstype: 'nul'

.gitignore

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
.DS_Store
2+
*.jl.cov
3+
*.jl.*.cov
4+
*.jl.mem
5+
.ipynb_checkpoints
6+
.vscode
7+
test/Manifest.toml

CITATION.bib

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
@article{Caldwell:2020AHMI,
2+
author = {Caldwell, Allen and Eller, Philipp and Hafych, Vasyl and Schick, Rafael and Schulz, Oliver and Szalay, Marco},
3+
journal = {International Journal of Modern Physics A},
4+
title = {Integration with an adaptive harmonic mean algorithm},
5+
year = {2020},
6+
number = {24},
7+
pages = {2050142},
8+
volume = {35},
9+
doi = {10.1142/S0217751X20501420},
10+
publisher = {World Scientific},
11+
}

LICENSE.md

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
The AHMI.jl package is licensed under the MIT "Expat" License:
2+
3+
> Copyright (c) 2018-2022:
4+
> Vasyl Hafych <[email protected]>,
5+
> Rafael Schick <[email protected]>,
6+
> Oliver Schulz <[email protected]>,
7+
> and contributors
8+
>
9+
> Permission is hereby granted, free of charge, to any person obtaining a copy
10+
> of this software and associated documentation files (the "Software"), to deal
11+
> in the Software without restriction, including without limitation the rights
12+
> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13+
> copies of the Software, and to permit persons to whom the Software is
14+
> furnished to do so, subject to the following conditions:
15+
>
16+
> The above copyright notice and this permission notice shall be included in all
17+
> copies or substantial portions of the Software.
18+
>
19+
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20+
> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21+
> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22+
> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23+
> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24+
> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
25+
> SOFTWARE.
26+
>

Project.toml

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name = "AHMI"
2+
uuid = "c5d2b564-8713-4ef5-a2ca-05a0d64fcc84"
3+
version = "0.1.0"
4+
5+
[deps]
6+
ArraysOfArrays = "65a8f2f4-9b39-5baf-92e2-a9cc46fdf018"
7+
BAT = "c0cd4b16-88b7-57fa-983b-ab80aecada7e"
8+
DocStringExtensions = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae"
9+
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
10+
Measurements = "eff96d63-e80a-5855-80a2-b1b0885c5ab7"
11+
ParallelProcessingTools = "8e8a01fc-6193-5ca1-a2f1-20776dae4199"
12+
Parameters = "d96e819e-fc66-5662-9728-84c9c7592b0a"
13+
ProgressMeter = "92933f4c-e287-5a05-a399-4b506db050ca"
14+
QuadGK = "1fd47b50-473d-5c70-9696-f719f8f3bcdc"
15+
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
16+
RecipesBase = "3cdcf5f2-1ef4-517c-9805-6587b60abb01"
17+
Requires = "ae029012-a4dd-5104-9daa-d747884805df"
18+
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
19+
StatsBase = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91"
20+
ValueShapes = "136a8f8c-c49b-4edb-8b98-f3d64d48be8f"
21+
22+
[compat]
23+
BAT = "3"
24+
julia = "1.6"

README.md

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# AHMI.jl
2+
3+
[![Documentation for stable version](https://img.shields.io/badge/docs-stable-blue.svg)](https://BAT.github.io/AHMI.jl/stable)
4+
[![Documentation for development version](https://img.shields.io/badge/docs-dev-blue.svg)](https://BAT.github.io/AHMI.jl/dev)
5+
[![License](http://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat)](LICENSE.md)
6+
[![Build Status](https://github.com/BAT/AHMI.jl/workflows/CI/badge.svg?branch=main)](https://github.com/BAT/AHMI.jl/actions?query=workflow%3ACI)
7+
[![Codecov](https://codecov.io/gh/BAT/AHMI.jl/branch/main/graph/badge.svg)](https://codecov.io/gh/BAT/AHMI.jl)
8+
9+
This package implements the [Adaptive Harmonic Mean Algorithm (AHMI)](http://doi.org/10.1142/S0217751X20501420).
10+
11+
## Documentation
12+
13+
* [Documentation for stable version](https://BAT.github.io/AHMI.jl/stable)
14+
* [Documentation for development version](https://BAT.github.io/AHMI.jl/dev)

docs/.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
build/
2+
site/

0 commit comments

Comments
 (0)