Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @novica
6 changes: 6 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
59 changes: 59 additions & 0 deletions .github/workflows/R-CMD-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: R CMD Check

on:
pull_request:
paths-ignore:
- "*.md"
- ".github/**"
- "*.json "
- "*.toml "
workflow_dispatch:

permissions: read-all

concurrency:
group: ${{ github.workflow }}-${{ github.ref_name }}
cancel-in-progress: true

jobs:
R-CMD-check:
runs-on: ${{ matrix.config.os }}

name: ${{ matrix.config.os }} (${{ matrix.config.r }})

strategy:
fail-fast: false
matrix:
config:
- { os: macos-latest, r: "release" }
- { os: windows-latest, r: "release" }
- { os: ubuntu-latest, r: "devel", http-user-agent: "release" }
- { os: ubuntu-latest, r: "release" }
- { os: ubuntu-latest, r: "oldrel-1" }

env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_KEEP_PKG_SOURCE: yes

steps:
- uses: actions/checkout@v7

- uses: r-lib/actions/setup-pandoc@v2

- uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.config.r }}
http-user-agent: ${{ matrix.config.http-user-agent }}
use-public-rspm: true

- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::rcmdcheck
needs: check

- uses: r-lib/actions/check-r-package@v2
with:
error-on: '"error"'
upload-snapshots: true
build_args: 'c("--no-build-vignettes")'
args: 'c("--no-manual", "--as-cran")'
31 changes: 31 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: CI

on:
pull_request:
branches: [master]
paths:
- "R/**"
- "inst/**"

concurrency:
group: ${{ github.workflow }}-${{ github.ref_name }}
cancel-in-progress: true

permissions:
contents: read

jobs:
ci:
runs-on: ubuntu-latest
steps:
- name: Install
uses: posit-dev/setup-air@v1

- name: Check
run: air format . --check

- name: Setup jarl
uses: etiennebacher/setup-jarl@v0.1.1

- name: Run jarl lint
run: jarl check .
73 changes: 73 additions & 0 deletions .github/workflows/pkgdown.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: Build pkgdown site

on:
push:
branches:
- master
paths-ignore:
- "*.md"
- ".github/**"
- "*.json "
- "*.toml "
release:
types:
- published

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: "pages"
cancel-in-progress: true

jobs:
pkgdown:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v7

- uses: r-lib/actions/setup-pandoc@v2

- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true

- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::pkgdown, local::.
needs: website

- name: Build release site
run: pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE)
shell: Rscript {0}
env:
PKGDOWN_DEV_MODE: release

- name: Build dev site
run: pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE)
shell: Rscript {0}
env:
PKGDOWN_DEV_MODE: devel

- name: Upload artifact
uses: actions/upload-pages-artifact@v5
with:
path: "./docs/"

deploy:
runs-on: ubuntu-latest
needs: pkgdown
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Setup Pages
uses: actions/configure-pages@v6

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v5
75 changes: 75 additions & 0 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
name: Release Please

on:
push:
branches:
- master

jobs:
release-please:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write

steps:
- uses: googleapis/release-please-action@v5
id: release
with:
config-file: release-please-config.json
manifest-file: .release-please-manifest.json

- uses: actions/checkout@v7
if: ${{ steps.release.outputs.pr }}
with:
fetch-depth: 0
token: ${{ secrets.GITHUB_TOKEN }}

- name: Update NEWS.md from CHANGELOG.md
if: ${{ steps.release.outputs.pr }}
env:
PR_JSON: ${{ steps.release.outputs.pr }}
run: |
PR_BRANCH=$(echo "$PR_JSON" | jq -r '.headBranchName')
git fetch origin "$PR_BRANCH"
git checkout "$PR_BRANCH"

python3 - <<'EOF'
import re, sys
from pathlib import Path

pkg = Path("DESCRIPTION").read_text()
pkg = re.search(r"^Package:\s*(\S+)", pkg, re.MULTILINE).group(1)

changelog = Path("CHANGELOG.md").read_text()

# Extract the latest entry (first ## [...] block)
m = re.search(
r"^## \[([^\]]+)\][^\n]*\n(.*?)(?=^## \[|\Z)",
changelog, re.MULTILINE | re.DOTALL
)
if not m:
sys.exit(0)

version, body = m.group(1), m.group(2).strip()

# ### Section → ## Section
body = re.sub(r"^### ", "## ", body, flags=re.MULTILINE)

new_entry = f"# {pkg} {version}\n\n{body}\n"

news = Path("NEWS.md")
existing = news.read_text() if news.exists() else ""

if f"# {pkg} {version}" in existing:
sys.exit(0)

news.write_text(new_entry + "\n" + existing)
EOF

git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add NEWS.md
git diff --staged --quiet || \
git commit -m "style: update NEWS.md from CHANGELOG.md"
git push origin "$PR_BRANCH"
58 changes: 58 additions & 0 deletions .github/workflows/test-coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Test Coverage

on:
push:
branches:
- master
paths-ignore:
- "*.md"
- ".github/**"
- "*.json "
- "*.toml "

permissions: read-all

jobs:
test-coverage:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}

steps:
- uses: actions/checkout@v7

- uses: r-lib/actions/setup-r@v2

- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::covr, any::xml2
needs: coverage

- name: Test coverage
run: |
cov <- covr::package_coverage(
quiet = FALSE,
clean = FALSE,
install_path = file.path(normalizePath(Sys.getenv("RUNNER_TEMP"), winslash = "/"), "package")
)
print(cov)
covr::to_cobertura(cov)
shell: Rscript {0}

- name: Show testthat output
if: always()
run: |
find '${{ runner.temp }}/package' -name 'testthat.Rout*' -exec cat '{}' \; || true
shell: bash

- name: Upload test results
if: failure()
uses: actions/upload-artifact@v7
with:
name: coverage-test-failures
path: ${{ runner.temp }}/package

- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v7
with:
token: ${{ secrets.CODECOV_TOKEN }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ README.Rmd
CRAN-RELEASE
.Rproj.user
Support
docs
3 changes: 3 additions & 0 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
".": "1.2.5"
}
10 changes: 0 additions & 10 deletions .travis.yml

This file was deleted.

Empty file added CHANGELOG.md
Empty file.
9 changes: 5 additions & 4 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
Package: ParBayesianOptimization
Title: Parallel Bayesian Optimization of Hyperparameters
Version: 1.2.5
Authors@R: person("Samuel", "Wilson", email = "samwilson303@gmail.com", role = c("aut", "cre"))
Authors@R: c(
person("Novica", "Nakov", email = "nnovica@gmail.com", role = "cre"),
person("Samuel", "Wilson", email = "samwilson303@gmail.com", role = "aut"))
Description: Fast, flexible framework for implementing Bayesian optimization of model
hyperparameters according to the methods described in Snoek et al. <arXiv:1206.2944>.
The package allows the user to run scoring function in parallel, save intermediary
Expand All @@ -11,9 +13,8 @@ URL: https://github.com/AnotherSamWilson/ParBayesianOptimization
BugReports: https://github.com/AnotherSamWilson/ParBayesianOptimization/issues
Depends: R (>= 3.4)
Imports: data.table (>= 1.11.8), DiceKriging, stats, foreach, dbscan, lhs, crayon, ggplot2, ggpubr (>= 0.2.4)
Suggests: knitr, rmarkdown, xgboost, doParallel, testthat
Suggests: knitr, xgboost, doParallel, testthat, quarto
License: GPL-2
Encoding: UTF-8
RoxygenNote: 7.2.1
VignetteBuilder: knitr
Maintainer: Samuel Wilson <samwilson303@gmail.com>
VignetteBuilder: quarto
Loading