Skip to content

Commit

Permalink
Merge branch 'release/v2.2.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
ygeunkim committed Feb 6, 2025
2 parents 32ee857 + 4d93f1a commit c81790e
Show file tree
Hide file tree
Showing 213 changed files with 17,545 additions and 22,535 deletions.
4 changes: 3 additions & 1 deletion .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,6 @@
^cran-comments\.md$
^CRAN-SUBMISSION$
^revdep$
^python$
^python$
inst/doxygen
^logo$
20 changes: 13 additions & 7 deletions .github/ISSUE_TEMPLATE/issue_template.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,20 @@
---
name: Bug report or feature request
name: Issue
about: Describe a bug you've seen or make a case for a new feature
---

Please briefly describe your problem and what output you expect. If you have a question, please don't use this form. Instead, ask on <https://stackoverflow.com/> or <https://community.rstudio.com/>.
## Type

Please include a minimal reproducible example (AKA a reprex). If you've never heard of a [reprex](http://reprex.tidyverse.org/) before, start by reading <https://www.tidyverse.org/help/#reprex>.
- [ ] Bug report: write "[bug]" at the first of the title.
- [ ] Feature request: write "[feature]" at the first of the title.
- [ ] Documentation: write "[document]" at the first of the title.
- [ ] Others

Brief description of the problem
## Languages
<!-- Check every element related to your issue. -->

```r
# insert reprex here
```
- [ ] C++: Header files in `inst/include` directory
- [ ] R: R package files (including C++ codes in `src` directory).
- [ ] Python: Files in `python` directory.

## Description
25 changes: 25 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
name: Pull request
about: Fix a bug, add a new feature, etc
---

## Prerequisites

- [ ] Ensure that this pull request targets the **develop** branch.
- [ ] Aware that C++ header files are shared by both R and Python.
- [ ] If the PR adds a new feature, write "[feature]" in the title. If it is a fix, write "[bugfix]".

## Type

- [ ] Bug fix: write "[bugfix]" at the first of the title.
- [ ] New feature: write "[feature]" at the first of the title.
- [ ] Documentation: write "[document]" at the first of the title.
- [ ] Others

## Languages

- [ ] C++: Header files in `inst/include` directory
- [ ] R: R package files (including C++ codes in `src` directory).
- [ ] Python: Files in `python` directory.

## Description
39 changes: 8 additions & 31 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
branches: [main, master, 'hotfix/*', 'release/*', develop]
branches: [main, master, 'hotfix/*', 'release/*', develop, 'feature/*-withci']
pull_request:
branches: [main, master, 'hotfix/*', 'release/*', develop]

Expand All @@ -21,14 +21,16 @@ jobs:
- {os: macOS-latest, r: 'release'}

- {os: windows-latest, r: 'release'}
- {os: windows-latest, r: 'oldrel-4'}
# rtools40's older compiler: R-4.0.0 to to R-4.1.3
- {os: windows-latest, r: '4.1'}

- {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'}
- {os: ubuntu-latest, r: 'release'}
- {os: ubuntu-latest, r: 'oldrel-1'}
- {os: ubuntu-latest, r: 'oldrel-2'}
- {os: ubuntu-latest, r: 'oldrel-3'}
- {os: ubuntu-latest, r: '3.6'}
# add oldrel-4 in Spring 2025
# - {os: ubuntu-latest, r: 'oldrel-4'}

env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -44,35 +46,10 @@ jobs:
r-version: ${{ matrix.config.r }}
http-user-agent: ${{ matrix.config.http-user-agent }}
use-public-rspm: true

- name: Determine evaluate package version on Windows
if: runner.os == 'Windows'
run: |
if ($Env:MATRIX_CONFIG_R -lt "4.0.0") {
echo "[email protected]" >> $Env:GITHUB_ENV
} else {
echo "EVALUATE_PKG=evaluate" >> $Env:GITHUB_ENV
}
shell: pwsh

- name: Determine evaluate package version on non-Windows
if: runner.os != 'Windows'
run: |
if [ "${{ matrix.config.r }}" \< "4.0.0" ]; then
echo "[email protected]" >> $GITHUB_ENV
else
echo "EVALUATE_PKG=evaluate" >> $GITHUB_ENV
fi
shell: bash


- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::rcmdcheck, ${{ env.EVALUATE_PKG }}
# extra-packages: >
# any::rcmdcheck,
# knitr=?ignore-before-r=4.0.0,
# rmarkdown=?ignore-before-r=4.0.0,
# testthat=?ignore-before-r=4.0.0
extra-packages: any::rcmdcheck
needs: check

# do not build vignettes in github actions check and ignore warnings
Expand All @@ -84,7 +61,7 @@ jobs:
error-on: '"warning"'
check-dir: '"check"'
upload-snapshots: false
upload-results: false
upload-results: 'never'

- name: Run check for CRAN
uses: r-lib/actions/check-r-package@v2
Expand Down
47 changes: 47 additions & 0 deletions .github/workflows/doxygen.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Render doxygen to github page repo
on:
push:
branches: [main, master, develop]
pull_request:
branches: [main, master]
workflow_dispatch:

name: doxygen

jobs:
doxygen:
runs-on: ubuntu-latest
# Only restrict concurrency for non-PR jobs
concurrency:
group: pkgdown-${{ github.event_name != 'pull_request' || github.run_id }}
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
permissions:
contents: write
steps:
- uses: actions/checkout@v4

- name: Install Doxygen
run: sudo apt-get install -y doxygen graphviz

- name: Extract version number from DESCRIPTION
run: |
VERSION=$(grep '^Version:' DESCRIPTION | cut -d ' ' -f 2)
sed -i "s|BVHAR_VERSION|${VERSION}|" inst/doxygen/Doxyfile
- name: Render doxygen
run: doxygen inst/doxygen/Doxyfile

- name: Create .nojekyll
run: sudo touch inst/doxygen/html/.nojekyll

- name: Deploy to GitHub pages 🚀
if: github.event_name != 'pull_request'
uses: JamesIves/[email protected]
with:
token: ${{ secrets.YGEUNKIM_PAGE_PAT }}
repository-name: ygeunkim/ygeunkim.github.io
clean: false
branch: master
folder: inst/doxygen/html
target-folder: package/bvhar/cpp
2 changes: 1 addition & 1 deletion .github/workflows/py-conda-check.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
on:
push:
branches: [main, master, 'hotfix/*', 'release/*', develop, 'feature/py-*']
branches: [main, master, 'hotfix/*', 'release/*', develop, 'feature/py-*', 'feature/*-withci']
pull_request:
branches: [main, master, 'hotfix/*', 'release/*', develop]

Expand Down
84 changes: 49 additions & 35 deletions .github/workflows/py-github-check.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
on:
push:
branches: [main, master, 'hotfix/*', 'release/*', develop, 'feature/py-*']
branches: [main, master, 'hotfix/*', 'release/*', develop]
pull_request:
branches: [main, master, 'hotfix/*', 'release/*', develop]

Expand Down Expand Up @@ -32,22 +32,28 @@ jobs:
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y libboost-all-dev libeigen3-dev
sudo apt-get install -y libboost-all-dev libeigen3-dev libfmt-dev libspdlog-dev
echo $(sudo apt list --installed)
echo "EIGEN_INCLUDE_DIR=/usr/include/eigen3" >> $GITHUB_ENV
echo "BOOST_INCLUDE_DIR=/usr/include/boost" >> $GITHUB_ENV
echo "SPDLOG_INCLUDE_DIR=/usr/include/spdlog" >> $GITHUB_ENV
echo "FMT_INCLUDE_DIR=/usr/include/fmt" >> $GITHUB_ENV
- name: Set system dependencies on macOS
if: runner.os == 'macOS'
run: |
brew update
brew install llvm libomp boost eigen
brew install llvm libomp boost eigen fmt spdlog
EIGEN_LOC=$(brew --prefix eigen)
BOOST_LOC=$(brew --prefix boost)
SPDLOG_LOC=$(brew --prefix spdlog)
FMT_LOC=$(brew --prefix fmt)
LLVM_LOC=$(brew --prefix llvm)
OMP_LOC=$(brew --prefix libomp)
echo "EIGEN_INCLUDE_DIR=$EIGEN_LOC/include/eigen3" >> $GITHUB_ENV
echo "BOOST_INCLUDE_DIR=$BOOST_LOC/include" >> $GITHUB_ENV
echo "SPDLOG_INCLUDE_DIR=$SPDLOG_LOC/include" >> $GITHUB_ENV
echo "FMT_INCLUDE_DIR=$FMT_LOC/include" >> $GITHUB_ENV
echo "LLVM_LOC=$LLVM_LOC" >> $GITHUB_ENV
echo "OMP_LOC=$OMP_LOC" >> $GITHUB_ENV
echo "CC=$LLVM_LOC/bin/clang" >> $GITHUB_ENV
Expand All @@ -58,53 +64,61 @@ jobs:
- name: Set system dependencies on Windows
if: runner.os == 'Windows'
run: |
choco install eigen -y --no-progress
choco install boost-msvc-14.3 -y --no-progress
$eigenPath = (
Get-ChildItem -Path "C:\ProgramData\chocolatey\lib\eigen" -Recurse -Filter "Eigen" |
Select-Object -First 1
).Parent.FullName
if ($eigenPath) {
echo "eigen is installed in $eigenPath"
} else {
Write-Error "Wrong eigen path"
exit 1
}
$boostPath = $null
$boostCand = @("C:\local", "C:\ProgramData\chocolatey\lib")
foreach ($cand in $boostCand) {
$isPath = (
Get-ChildItem -Path $cand -Directory |
Where-Object { $_.Name -match "boost" } |
Sort-Object LastWriteTime -Descending |
Select-Object -First 1
).FullName
if ($isPath) {
$boostPath = $isPath
break
$vcpkgRoot = $Env:VCPKG_INSTALLATION_ROOT
vcpkg install eigen3 | Out-Null
vcpkg install boost | Out-Null
vcpkg install fmt | Out-Null
vcpkg install spdlog | Out-Null
$installPath = $null
$tripletCand = @(
"$vcpkgRoot\installed\x64-windows",
"$vcpkgRoot\installed\x86-windows",
"$vcpkgRoot\installed\arm64-windows"
)
foreach ($cand in $tripletCand) {
Write-Host "Checking triplet path: $cand"
if (Test-Path "$cand\include") {
$installPath = "$cand"
Write-Host "Valid installation: $installPath"
break
}
}
if ($boostPath) {
echo "boost is installed in $boostPath"
} else {
Write-Error "Wrong boost path"
if (-not $installPath) {
Write-Error "No valid installation path"
exit 1
}
echo "EIGEN_INCLUDE_DIR=$eigenPath" >> $Env:GITHUB_ENV
echo "BOOST_INCLUDE_DIR=$boostPath" >> $Env:GITHUB_ENV
$libPath = @{
"eigen" = "$installPath\include\eigen3"
"boost" = "$installPath\include"
"spdlog" = "$installPath\include"
"fmt" = "$installPath\include"
}
foreach ($lib in $libPath.Keys) {
if (Test-Path $libPath[$lib]) {
Write-Host "$lib is installed in $($libPath[$lib])"
echo "$($lib.ToUpper())_INCLUDE_DIR=$($libPath[$lib])" >> $Env:GITHUB_ENV
} else {
Write-Error "Wrong $lib path: $($libPath[$lib])"
exit 1
}
}
- name: Verify Eigen and boost on non-Windows
- name: Verify C++ libraries on non-Windows
if: runner.os != 'Windows'
run: |
ls ${{ env.EIGEN_INCLUDE_DIR }}
ls ${{ env.BOOST_INCLUDE_DIR }}
ls ${{ env.SPDLOG_INCLUDE_DIR }}
ls ${{ env.FMT_INCLUDE_DIR }}
mkdir temp-dir
- name: Verify Eigen and boost on Windows
- name: Verify C++ libraries on Windows
if: runner.os == 'Windows'
run: |
dir ${{ env.EIGEN_INCLUDE_DIR }}
dir ${{ env.BOOST_INCLUDE_DIR }}
dir ${{ env.SPDLOG_INCLUDE_DIR }}
dir ${{ env.FMT_INCLUDE_DIR }}
New-Item -ItemType Directory -Force -Path temp-dir
- name: Install package from github
Expand Down
Loading

0 comments on commit c81790e

Please sign in to comment.