Skip to content

Commit a2efa51

Browse files
oschulzVasylHafych
andcommitted
Import PartitionedParallelSampling code from BAT.jl
Co-authored-by: Vasyl Hafych <vasilgafich@gmail.com>
1 parent a61bb6e commit a2efa51

26 files changed

Lines changed: 3046 additions & 0 deletions

.codecov.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# comment: false

.github/workflows/CompatHelper.yml

Lines changed: 32 additions & 0 deletions
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

Lines changed: 15 additions & 0 deletions
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

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
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+
- name: update_manifest
63+
run: julia --project=. -E 'import Pkg; Pkg.update()'
64+
- uses: julia-actions/julia-buildpkg@latest
65+
env:
66+
PYTHON: 'Conda'
67+
- uses: julia-actions/julia-runtest@latest
68+
with:
69+
coverage: ${{ matrix.version == '1' && matrix.os == 'ubuntu-latest' && matrix.arch == 'x64' }}
70+
- uses: julia-actions/julia-processcoverage@v1
71+
if: matrix.version == '1' && matrix.os == 'ubuntu-latest' && matrix.arch == 'x64'
72+
- uses: codecov/codecov-action@v1
73+
if: matrix.version == '1' && matrix.os == 'ubuntu-latest' && matrix.arch == 'x64'
74+
with:
75+
file: lcov.info
76+
docs:
77+
name: Documentation
78+
runs-on: ubuntu-latest
79+
steps:
80+
- uses: actions/checkout@v2
81+
- uses: julia-actions/setup-julia@latest
82+
with:
83+
version: '1'
84+
- name: Cache artifacts
85+
uses: actions/cache@v2
86+
env:
87+
cache-name: cache-artifacts
88+
with:
89+
path: ~/.julia/artifacts
90+
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/docs/Project.toml') }}
91+
restore-keys: |
92+
${{ runner.os }}-test-${{ env.cache-name }}-
93+
${{ runner.os }}-test-
94+
${{ runner.os }}-
95+
- name: update_manifest
96+
run: julia --project=. -E 'import Pkg; Pkg.update()'
97+
- uses: julia-actions/julia-buildpkg@latest
98+
env:
99+
PYTHON: 'Conda'
100+
- uses: julia-actions/julia-docdeploy@latest
101+
env:
102+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
103+
# Needed due to https://github.com/JuliaDocs/Documenter.jl/issues/1177
104+
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}
105+
GKSwstype: 'nul'

.gitignore

Lines changed: 7 additions & 0 deletions
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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
@article{Hafych:2008.03098,
2+
author = {Hafych, Vasyl and Eller, Philipp and Caldwell, Allen and Schulz, Oliver},
3+
title = {Parallelizing MCMC Sampling via Space Partitioning},
4+
year = {2018},
5+
month = {8},
6+
archiveprefix = {arXiv},
7+
eprint = {2008.03098},
8+
primaryclass = {stat.CO},
9+
}

LICENSE.md

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

0 commit comments

Comments
 (0)