asbm 0.1.4.dev3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- asbm-0.1.4.dev3/.github/dependabot.yml +10 -0
- asbm-0.1.4.dev3/.github/release.yml +5 -0
- asbm-0.1.4.dev3/.github/workflows/check-julia.yml +48 -0
- asbm-0.1.4.dev3/.github/workflows/check-r.yml +49 -0
- asbm-0.1.4.dev3/.github/workflows/release.yml +78 -0
- asbm-0.1.4.dev3/.gitignore +78 -0
- asbm-0.1.4.dev3/.readthedocs.yaml +16 -0
- asbm-0.1.4.dev3/CMakeLists.txt +62 -0
- asbm-0.1.4.dev3/LICENSE +19 -0
- asbm-0.1.4.dev3/MAINTAINING.md +367 -0
- asbm-0.1.4.dev3/PKG-INFO +173 -0
- asbm-0.1.4.dev3/README.md +140 -0
- asbm-0.1.4.dev3/SUMMARY.md +196 -0
- asbm-0.1.4.dev3/bindings/README.md +31 -0
- asbm-0.1.4.dev3/bindings/julia/.gitignore +7 -0
- asbm-0.1.4.dev3/bindings/julia/CMakeLists.txt +27 -0
- asbm-0.1.4.dev3/bindings/julia/Project.toml +16 -0
- asbm-0.1.4.dev3/bindings/julia/deps/build.jl +14 -0
- asbm-0.1.4.dev3/bindings/julia/src/ASBM.jl +122 -0
- asbm-0.1.4.dev3/bindings/julia/src/c_shim.jl +68 -0
- asbm-0.1.4.dev3/bindings/julia/src/libasbm_julia.cpp +263 -0
- asbm-0.1.4.dev3/bindings/julia/test/runtests.jl +80 -0
- asbm-0.1.4.dev3/bindings/python/bindings.cpp +583 -0
- asbm-0.1.4.dev3/bindings/r/.gitignore +11 -0
- asbm-0.1.4.dev3/bindings/r/DESCRIPTION +25 -0
- asbm-0.1.4.dev3/bindings/r/LICENSE +2 -0
- asbm-0.1.4.dev3/bindings/r/NAMESPACE +13 -0
- asbm-0.1.4.dev3/bindings/r/R/RcppExports.R +7 -0
- asbm-0.1.4.dev3/bindings/r/R/asbm.R +157 -0
- asbm-0.1.4.dev3/bindings/r/cleanup +8 -0
- asbm-0.1.4.dev3/bindings/r/configure +19 -0
- asbm-0.1.4.dev3/bindings/r/configure.win +17 -0
- asbm-0.1.4.dev3/bindings/r/src/MCMC_bookkeeping.cpp +435 -0
- asbm-0.1.4.dev3/bindings/r/src/MCMC_core.cpp +514 -0
- asbm-0.1.4.dev3/bindings/r/src/MCMC_core.h +160 -0
- asbm-0.1.4.dev3/bindings/r/src/MCMC_proposals.cpp +700 -0
- asbm-0.1.4.dev3/bindings/r/src/Makevars +2 -0
- asbm-0.1.4.dev3/bindings/r/src/Makevars.win +2 -0
- asbm-0.1.4.dev3/bindings/r/src/RcppExports.cpp +44 -0
- asbm-0.1.4.dev3/bindings/r/src/asbm_core.h +35 -0
- asbm-0.1.4.dev3/bindings/r/src/fit_result.cpp +277 -0
- asbm-0.1.4.dev3/bindings/r/src/fit_result.h +71 -0
- asbm-0.1.4.dev3/bindings/r/src/globals.h +36 -0
- asbm-0.1.4.dev3/bindings/r/src/helpers.cpp +392 -0
- asbm-0.1.4.dev3/bindings/r/src/helpers.h +90 -0
- asbm-0.1.4.dev3/bindings/r/src/wrapper.cpp +268 -0
- asbm-0.1.4.dev3/bindings/r/tests/testthat/test-fit.R +56 -0
- asbm-0.1.4.dev3/bindings/r/tests/testthat.R +4 -0
- asbm-0.1.4.dev3/docs/conf.py +69 -0
- asbm-0.1.4.dev3/docs/examples/quickstart.md +6 -0
- asbm-0.1.4.dev3/docs/index.md +15 -0
- asbm-0.1.4.dev3/docs/modules.md +19 -0
- asbm-0.1.4.dev3/examples/data/business_depts.gml +39732 -0
- asbm-0.1.4.dev3/examples/data/dolphins.gml +1110 -0
- asbm-0.1.4.dev3/examples/data/friends.gml +11819 -0
- asbm-0.1.4.dev3/examples/data/polbooks.gml +2839 -0
- asbm-0.1.4.dev3/examples/data/polbooks_comparison.png +0 -0
- asbm-0.1.4.dev3/examples/data/polbooks_hybrid_ASBM.gml +2396 -0
- asbm-0.1.4.dev3/examples/data/polbooks_planted_partition.gml +2396 -0
- asbm-0.1.4.dev3/examples/data/polbooks_traditional_SBM.gml +2396 -0
- asbm-0.1.4.dev3/examples/data/test3.gml +29 -0
- asbm-0.1.4.dev3/examples/julia/example.jl +43 -0
- asbm-0.1.4.dev3/examples/python/README.md +23 -0
- asbm-0.1.4.dev3/examples/python/example.py +64 -0
- asbm-0.1.4.dev3/examples/python/polbooks_hybrid_ASBM.gml +2396 -0
- asbm-0.1.4.dev3/examples/python/polbooks_planted_partition.gml +2396 -0
- asbm-0.1.4.dev3/examples/python/polbooks_traditional_SBM.gml +2396 -0
- asbm-0.1.4.dev3/examples/python/q_trajectory.png +0 -0
- asbm-0.1.4.dev3/examples/r/example.R +39 -0
- asbm-0.1.4.dev3/pyproject.toml +182 -0
- asbm-0.1.4.dev3/python/asbm/src/asbm/__init__.py +18 -0
- asbm-0.1.4.dev3/python/asbm/src/asbm/_version.py +24 -0
- asbm-0.1.4.dev3/python/asbm/src/asbm/core.py +166 -0
- asbm-0.1.4.dev3/python/asbm/src/asbm/input_output.py +316 -0
- asbm-0.1.4.dev3/python/asbm/src/asbm/py.typed +0 -0
- asbm-0.1.4.dev3/src/MCMC_bookkeeping.cpp +435 -0
- asbm-0.1.4.dev3/src/MCMC_core.cpp +514 -0
- asbm-0.1.4.dev3/src/MCMC_core.h +160 -0
- asbm-0.1.4.dev3/src/MCMC_proposals.cpp +700 -0
- asbm-0.1.4.dev3/src/asbm_core.h +35 -0
- asbm-0.1.4.dev3/src/fit_result.cpp +277 -0
- asbm-0.1.4.dev3/src/fit_result.h +71 -0
- asbm-0.1.4.dev3/src/globals.h +36 -0
- asbm-0.1.4.dev3/src/helpers.cpp +392 -0
- asbm-0.1.4.dev3/src/helpers.h +90 -0
- asbm-0.1.4.dev3/tests/catch2/catch_user_config.hpp +1 -0
- asbm-0.1.4.dev3/tests/data/inputs/test3.gml +28 -0
- asbm-0.1.4.dev3/tests/data/inputs/test3_point_eval2.csv +8 -0
- asbm-0.1.4.dev3/tests/data/inputs/test3_point_eval3.csv +8 -0
- asbm-0.1.4.dev3/tests/data/inputs/test3_point_eval4.csv +8 -0
- asbm-0.1.4.dev3/tests/data/outputs/empty4_traditional_DCSBM_coincidence.csv +4 -0
- asbm-0.1.4.dev3/tests/data/outputs/test3_general_ASBM_coincidence.csv +3 -0
- asbm-0.1.4.dev3/tests/data/outputs/test3_general_canonical_coincidence.csv +3 -0
- asbm-0.1.4.dev3/tests/data/outputs/test3_general_unified_coincidence.csv +3 -0
- asbm-0.1.4.dev3/tests/data/outputs/test3_hybrid_ASBM_coincidence.csv +3 -0
- asbm-0.1.4.dev3/tests/data/outputs/test3_microcanonical_DCSBM_coincidence.csv +3 -0
- asbm-0.1.4.dev3/tests/data/outputs/test3_microcanonical_SBM_coincidence.csv +3 -0
- asbm-0.1.4.dev3/tests/data/outputs/test3_planted_partition_coincidence.csv +3 -0
- asbm-0.1.4.dev3/tests/data/outputs/test3_point_eval2_components.csv +2 -0
- asbm-0.1.4.dev3/tests/data/outputs/test3_point_eval2_q1_components.csv +2 -0
- asbm-0.1.4.dev3/tests/data/outputs/test3_point_eval3_components.csv +2 -0
- asbm-0.1.4.dev3/tests/data/outputs/test3_point_eval4_components.csv +2 -0
- asbm-0.1.4.dev3/tests/data/outputs/test3_simple_ASBM_alpha10_coincidence.csv +3 -0
- asbm-0.1.4.dev3/tests/data/outputs/test3_simple_ASBM_coincidence.csv +3 -0
- asbm-0.1.4.dev3/tests/data/outputs/test3_simple_ASBM_dc_coincidence.csv +3 -0
- asbm-0.1.4.dev3/tests/data/outputs/test3_traditional_DCSBM_coincidence.csv +3 -0
- asbm-0.1.4.dev3/tests/data/outputs/test3_traditional_GDCSBM_coincidence.csv +3 -0
- asbm-0.1.4.dev3/tests/data/outputs/test3_traditional_SBM_coincidence.csv +3 -0
- asbm-0.1.4.dev3/tests/mcmc_core_test.cpp +182 -0
- asbm-0.1.4.dev3/tests/python/conftest.py +10 -0
- asbm-0.1.4.dev3/tests/python/test_api.py +693 -0
- asbm-0.1.4.dev3/tests/python/test_integration_small.py +85 -0
- asbm-0.1.4.dev3/tests/python/test_package.py +6 -0
- asbm-0.1.4.dev3/tests/python/test_prior_check.py +164 -0
- asbm-0.1.4.dev3/tests/python/test_run_inference.py +49 -0
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
name: check-julia
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
paths:
|
|
6
|
+
- 'bindings/julia/**'
|
|
7
|
+
- 'src/**'
|
|
8
|
+
- '.github/workflows/check-julia.yml'
|
|
9
|
+
pull_request:
|
|
10
|
+
paths:
|
|
11
|
+
- 'bindings/julia/**'
|
|
12
|
+
- 'src/**'
|
|
13
|
+
- '.github/workflows/check-julia.yml'
|
|
14
|
+
|
|
15
|
+
jobs:
|
|
16
|
+
julia-test:
|
|
17
|
+
runs-on: ${{ matrix.os }}
|
|
18
|
+
strategy:
|
|
19
|
+
fail-fast: false
|
|
20
|
+
matrix:
|
|
21
|
+
os: [ubuntu-latest, macos-14, windows-latest]
|
|
22
|
+
julia-version: ['1.10']
|
|
23
|
+
|
|
24
|
+
steps:
|
|
25
|
+
- uses: actions/checkout@v6
|
|
26
|
+
|
|
27
|
+
- uses: julia-actions/setup-julia@v3
|
|
28
|
+
with:
|
|
29
|
+
version: ${{ matrix.julia-version }}
|
|
30
|
+
|
|
31
|
+
- name: Build native library
|
|
32
|
+
shell: bash
|
|
33
|
+
run: |
|
|
34
|
+
cmake -B bindings/julia/deps/cmake_build \
|
|
35
|
+
-S bindings/julia \
|
|
36
|
+
-DCMAKE_BUILD_TYPE=Release
|
|
37
|
+
cmake --build bindings/julia/deps/cmake_build --config Release
|
|
38
|
+
cmake --install bindings/julia/deps/cmake_build \
|
|
39
|
+
--prefix bindings/julia/deps \
|
|
40
|
+
--config Release \
|
|
41
|
+
--component julia_binding
|
|
42
|
+
|
|
43
|
+
- name: Instantiate Julia dependencies
|
|
44
|
+
run: julia --project=bindings/julia -e "using Pkg; Pkg.instantiate()"
|
|
45
|
+
|
|
46
|
+
- uses: julia-actions/julia-runtest@v1
|
|
47
|
+
with:
|
|
48
|
+
project: bindings/julia
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
name: check-r
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
paths:
|
|
6
|
+
- bindings/r/**
|
|
7
|
+
- src/**
|
|
8
|
+
- .github/workflows/check-r.yml
|
|
9
|
+
pull_request:
|
|
10
|
+
paths:
|
|
11
|
+
- bindings/r/**
|
|
12
|
+
- src/**
|
|
13
|
+
- .github/workflows/check-r.yml
|
|
14
|
+
|
|
15
|
+
concurrency:
|
|
16
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
|
17
|
+
cancel-in-progress: true
|
|
18
|
+
|
|
19
|
+
env:
|
|
20
|
+
FORCE_COLOR: 3
|
|
21
|
+
|
|
22
|
+
jobs:
|
|
23
|
+
R-CMD-check:
|
|
24
|
+
name: Check on ${{ matrix.os }}
|
|
25
|
+
runs-on: ${{ matrix.os }}
|
|
26
|
+
strategy:
|
|
27
|
+
fail-fast: false
|
|
28
|
+
matrix:
|
|
29
|
+
os: [ubuntu-latest, macos-14, windows-latest]
|
|
30
|
+
|
|
31
|
+
steps:
|
|
32
|
+
- uses: actions/checkout@v6
|
|
33
|
+
|
|
34
|
+
- uses: r-lib/actions/setup-r@v2
|
|
35
|
+
with:
|
|
36
|
+
use-public-rspm: true
|
|
37
|
+
|
|
38
|
+
- uses: r-lib/actions/setup-r-dependencies@v2
|
|
39
|
+
with:
|
|
40
|
+
working-directory: bindings/r
|
|
41
|
+
extra-packages: |
|
|
42
|
+
any::rcmdcheck
|
|
43
|
+
any::igraph
|
|
44
|
+
|
|
45
|
+
- uses: r-lib/actions/check-r-package@v2
|
|
46
|
+
with:
|
|
47
|
+
working-directory: bindings/r
|
|
48
|
+
args: 'c("--no-manual", "--as-cran")'
|
|
49
|
+
error-on: '"error"'
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
name: release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_dispatch:
|
|
5
|
+
release:
|
|
6
|
+
types:
|
|
7
|
+
- published
|
|
8
|
+
pull_request:
|
|
9
|
+
paths:
|
|
10
|
+
- .github/workflows/release.yml
|
|
11
|
+
|
|
12
|
+
concurrency:
|
|
13
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
|
14
|
+
cancel-in-progress: true
|
|
15
|
+
|
|
16
|
+
env:
|
|
17
|
+
FORCE_COLOR: 3
|
|
18
|
+
|
|
19
|
+
jobs:
|
|
20
|
+
make_sdist:
|
|
21
|
+
name: Make SDist
|
|
22
|
+
runs-on: ubuntu-latest
|
|
23
|
+
steps:
|
|
24
|
+
- uses: actions/checkout@v6
|
|
25
|
+
with:
|
|
26
|
+
fetch-depth: 0
|
|
27
|
+
|
|
28
|
+
- name: Build SDist
|
|
29
|
+
run: pipx run build --sdist
|
|
30
|
+
|
|
31
|
+
- uses: actions/upload-artifact@v7
|
|
32
|
+
with:
|
|
33
|
+
name: cibw-sdist
|
|
34
|
+
path: dist/*.tar.gz
|
|
35
|
+
|
|
36
|
+
build_wheels:
|
|
37
|
+
name: Wheel on ${{ matrix.os }}
|
|
38
|
+
runs-on: ${{ matrix.os }}
|
|
39
|
+
strategy:
|
|
40
|
+
fail-fast: false
|
|
41
|
+
matrix:
|
|
42
|
+
os: [macos-14, ubuntu-latest, windows-latest]
|
|
43
|
+
|
|
44
|
+
steps:
|
|
45
|
+
- uses: actions/checkout@v6
|
|
46
|
+
with:
|
|
47
|
+
fetch-depth: 0
|
|
48
|
+
|
|
49
|
+
- name: Install cibuildwheel
|
|
50
|
+
run: python -m pip install cibuildwheel==2.20
|
|
51
|
+
|
|
52
|
+
- name: Build wheels
|
|
53
|
+
env:
|
|
54
|
+
CIBW_ARCHS_WINDOWS: AMD64
|
|
55
|
+
run: cibuildwheel --output-dir wheelhouse
|
|
56
|
+
|
|
57
|
+
- uses: actions/upload-artifact@v7
|
|
58
|
+
with:
|
|
59
|
+
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
|
|
60
|
+
path: wheelhouse/*.whl
|
|
61
|
+
|
|
62
|
+
upload_all:
|
|
63
|
+
needs: [build_wheels, make_sdist]
|
|
64
|
+
environment: pypi
|
|
65
|
+
permissions:
|
|
66
|
+
id-token: write
|
|
67
|
+
contents: read
|
|
68
|
+
runs-on: ubuntu-latest
|
|
69
|
+
steps:
|
|
70
|
+
- uses: actions/download-artifact@v8
|
|
71
|
+
with:
|
|
72
|
+
pattern: cibw-*
|
|
73
|
+
path: dist
|
|
74
|
+
merge-multiple: true
|
|
75
|
+
|
|
76
|
+
- uses: pypa/gh-action-pypi-publish@release/v1
|
|
77
|
+
with:
|
|
78
|
+
verbose: true
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
# Build directories
|
|
2
|
+
/build/
|
|
3
|
+
/build/*
|
|
4
|
+
|
|
5
|
+
# CMake build files
|
|
6
|
+
/CMakeFiles/
|
|
7
|
+
/CMakeCache.txt
|
|
8
|
+
/cmake_install.cmake
|
|
9
|
+
/Makefile
|
|
10
|
+
|
|
11
|
+
# Catch2 / external subbuilds
|
|
12
|
+
/build/_deps/
|
|
13
|
+
|
|
14
|
+
# Compiled objects and libraries
|
|
15
|
+
*.o
|
|
16
|
+
*.obj
|
|
17
|
+
*.a
|
|
18
|
+
*.lib
|
|
19
|
+
*.so
|
|
20
|
+
*.dylib
|
|
21
|
+
*.dll
|
|
22
|
+
|
|
23
|
+
# Python artifacts
|
|
24
|
+
__pycache__/
|
|
25
|
+
*.py[cod]
|
|
26
|
+
*.pyo
|
|
27
|
+
*.pyd
|
|
28
|
+
*.pyi
|
|
29
|
+
*.pyc
|
|
30
|
+
|
|
31
|
+
# Virtual environments
|
|
32
|
+
/.venv/
|
|
33
|
+
venv/
|
|
34
|
+
env/
|
|
35
|
+
venvs/
|
|
36
|
+
|
|
37
|
+
# pip / build outputs
|
|
38
|
+
/dist/
|
|
39
|
+
/build/
|
|
40
|
+
*.egg-info/
|
|
41
|
+
pip-wheel-metadata/
|
|
42
|
+
|
|
43
|
+
# pytest cache
|
|
44
|
+
.pytest_cache/
|
|
45
|
+
|
|
46
|
+
# coverage
|
|
47
|
+
.coverage
|
|
48
|
+
coverage.xml
|
|
49
|
+
|
|
50
|
+
# IDE/editor
|
|
51
|
+
.vscode/
|
|
52
|
+
.idea/
|
|
53
|
+
*.sublime-project
|
|
54
|
+
*.sublime-workspace
|
|
55
|
+
|
|
56
|
+
# macOS
|
|
57
|
+
.DS_Store
|
|
58
|
+
|
|
59
|
+
# logs
|
|
60
|
+
.log
|
|
61
|
+
|
|
62
|
+
# temporary files
|
|
63
|
+
*.tmp
|
|
64
|
+
*.swp
|
|
65
|
+
|
|
66
|
+
# packaging metadata
|
|
67
|
+
*.egg
|
|
68
|
+
|
|
69
|
+
# Python compiled extension produced by CMake during local builds (placed into python/asbm/src/asbm)
|
|
70
|
+
python/asbm/src/asbm/*.so
|
|
71
|
+
python/asbm/src/asbm/*.pyd
|
|
72
|
+
|
|
73
|
+
# Version file generated by setuptools_scm — never commit, always regenerated from git tags
|
|
74
|
+
python/asbm/src/asbm/_version.py
|
|
75
|
+
|
|
76
|
+
# test and build artifacts
|
|
77
|
+
build/cpp/
|
|
78
|
+
build/tests/
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Read the Docs configuration file
|
|
2
|
+
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
|
|
3
|
+
|
|
4
|
+
version: 2
|
|
5
|
+
|
|
6
|
+
build:
|
|
7
|
+
os: ubuntu-24.04
|
|
8
|
+
tools:
|
|
9
|
+
python: "3.12"
|
|
10
|
+
commands:
|
|
11
|
+
- asdf plugin add uv
|
|
12
|
+
- asdf install uv latest
|
|
13
|
+
- asdf global uv latest
|
|
14
|
+
- uv sync --group docs
|
|
15
|
+
- uv run python -m sphinx -T -b html -d docs/_build/doctrees -D language=en
|
|
16
|
+
docs $READTHEDOCS_OUTPUT/html
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
cmake_minimum_required(VERSION 3.15...3.26)
|
|
2
|
+
project(${SKBUILD_PROJECT_NAME} LANGUAGES CXX)
|
|
3
|
+
|
|
4
|
+
option(BUILD_TESTING "Build Catch2-based native tests" OFF)
|
|
5
|
+
|
|
6
|
+
set(PYBIND11_FINDPYTHON ON)
|
|
7
|
+
find_package(pybind11 CONFIG REQUIRED)
|
|
8
|
+
|
|
9
|
+
# Build a reusable core library so other language bindings can reuse it
|
|
10
|
+
add_library(asbm_core STATIC
|
|
11
|
+
src/MCMC_core.cpp
|
|
12
|
+
src/MCMC_proposals.cpp
|
|
13
|
+
src/MCMC_bookkeeping.cpp
|
|
14
|
+
src/helpers.cpp
|
|
15
|
+
src/fit_result.cpp)
|
|
16
|
+
target_include_directories(asbm_core PUBLIC ${CMAKE_SOURCE_DIR}/src)
|
|
17
|
+
set_target_properties(asbm_core PROPERTIES POSITION_INDEPENDENT_CODE ON)
|
|
18
|
+
target_compile_definitions(asbm_core PRIVATE MCMC_CORE_NO_PYBIND $<$<CXX_COMPILER_ID:MSVC>:_USE_MATH_DEFINES>)
|
|
19
|
+
target_compile_features(asbm_core PUBLIC cxx_std_17)
|
|
20
|
+
|
|
21
|
+
# Python bindings: build a small pybind11 module that links to the core
|
|
22
|
+
pybind11_add_module(_asbm MODULE bindings/python/bindings.cpp)
|
|
23
|
+
target_link_libraries(_asbm PRIVATE asbm_core)
|
|
24
|
+
target_include_directories(_asbm PRIVATE ${CMAKE_SOURCE_DIR}/src)
|
|
25
|
+
target_compile_features(_asbm PRIVATE cxx_std_17)
|
|
26
|
+
set_target_properties(
|
|
27
|
+
_asbm PROPERTIES LIBRARY_OUTPUT_DIRECTORY
|
|
28
|
+
${CMAKE_SOURCE_DIR}/python/asbm/src/asbm)
|
|
29
|
+
install(TARGETS _asbm LIBRARY DESTINATION ${SKBUILD_PROJECT_NAME})
|
|
30
|
+
|
|
31
|
+
if(BUILD_TESTING)
|
|
32
|
+
enable_testing()
|
|
33
|
+
|
|
34
|
+
find_package(Catch2 3 QUIET)
|
|
35
|
+
if(NOT Catch2_FOUND)
|
|
36
|
+
include(FetchContent)
|
|
37
|
+
FetchContent_Declare(
|
|
38
|
+
Catch2
|
|
39
|
+
GIT_REPOSITORY https://github.com/catchorg/Catch2.git
|
|
40
|
+
GIT_TAG v3.7.1
|
|
41
|
+
GIT_SHALLOW TRUE
|
|
42
|
+
)
|
|
43
|
+
FetchContent_MakeAvailable(Catch2)
|
|
44
|
+
list(APPEND CMAKE_MODULE_PATH "${catch2_SOURCE_DIR}/extras")
|
|
45
|
+
endif()
|
|
46
|
+
|
|
47
|
+
add_executable(mcmc_core_test
|
|
48
|
+
tests/mcmc_core_test.cpp
|
|
49
|
+
src/MCMC_core.cpp
|
|
50
|
+
src/MCMC_proposals.cpp
|
|
51
|
+
src/MCMC_bookkeeping.cpp
|
|
52
|
+
src/helpers.cpp
|
|
53
|
+
)
|
|
54
|
+
target_compile_definitions(mcmc_core_test PRIVATE MCMC_CORE_NO_PYBIND)
|
|
55
|
+
target_include_directories(mcmc_core_test PRIVATE tests src)
|
|
56
|
+
target_compile_features(mcmc_core_test PRIVATE cxx_std_17)
|
|
57
|
+
target_compile_options(mcmc_core_test PRIVATE -Wall -Wextra)
|
|
58
|
+
target_link_libraries(mcmc_core_test PRIVATE Catch2::Catch2WithMain)
|
|
59
|
+
|
|
60
|
+
include(CTest)
|
|
61
|
+
add_test(NAME mcmc_core_test COMMAND mcmc_core_test)
|
|
62
|
+
endif()
|
asbm-0.1.4.dev3/LICENSE
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
Copyright 2025 Maximilian Jerdee
|
|
2
|
+
|
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
4
|
+
this software and associated documentation files (the "Software"), to deal in
|
|
5
|
+
the Software without restriction, including without limitation the rights to
|
|
6
|
+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
7
|
+
of the Software, and to permit persons to whom the Software is furnished to do
|
|
8
|
+
so, subject to the following conditions:
|
|
9
|
+
|
|
10
|
+
The above copyright notice and this permission notice shall be included in all
|
|
11
|
+
copies or substantial portions of the Software.
|
|
12
|
+
|
|
13
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
14
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
15
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
16
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
17
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
18
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
19
|
+
SOFTWARE.
|