Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
gogonzo committed Dec 24, 2023
1 parent 59d4d0c commit 24bea73
Show file tree
Hide file tree
Showing 14 changed files with 820 additions and 629 deletions.
1 change: 1 addition & 0 deletions .github/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.html
20 changes: 20 additions & 0 deletions .github/workflows/check-other.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# commits can contain win, rhub or deploy text for specific actions
name: Check-win-builder
on: push
jobs:

win-builder-checks:
runs-on: ubuntu-18.04
container: rocker/tidyverse:latest
if: "!contains(github.event.commits[0].message, '[skip other]')"
steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Send package to win-builder
shell: Rscript {0}
run: |
if (!require("devtools")) install.packages('devtools', repos = 'http://cran.rstudio.com')
devtools::check_win_devel()
devtools::check_win_oldrelease()
devtools::check_win_release()
96 changes: 96 additions & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
# commits can contain win, rhub or deploy text for specific actions
name: Check
on: push
jobs:
check-r-verse-latest:
runs-on: ubuntu-18.04
container: rocker/verse:latest
steps:
- name: Checkout repository
uses: actions/checkout@main

- name: Install dependencies
shell: Rscript {0}
run: |
remotes::install_deps(dependencies = TRUE)
- name: Check 🔍
shell: Rscript {0}
run: |
devtools::check(cran = TRUE, vignettes = TRUE)
check-r-verse-devel:
runs-on: ubuntu-18.04
container: rocker/verse:devel
steps:
- name: Checkout repository
uses: actions/checkout@main

- name: Install dependencies
shell: Rscript {0}
run: |
remotes::install_deps(dependencies = TRUE)
- name: Check 🔍
shell: Rscript {0}
run: |
devtools::check(cran = TRUE, vignettes = TRUE)
check-r-devel-san:
runs-on: ubuntu-18.04
container: rocker/r-devel-san
steps:
- name: Checkout repository 🛎
uses: actions/checkout@v2

- name: Install dependencies
shell: Rscript {0}
run: |
install.packages(c("Rcpp", "knitr", "rmarkdown", "tinytest", "rcmdcheck"))
- name: Check 🔍
shell: Rscript {0}
run: |
rcmdcheck::rcmdcheck(
args = c("--as-cran", "--ignore-vignettes"),
build_args = "--no-build-vignettes",
error_on = "warning"
)
check-r-devel-ubsan-clang:
runs-on: ubuntu-18.04
container: rocker/r-devel-ubsan-clang
steps:
- name: Checkout repository 🛎
uses: actions/checkout@v2

- name: Install dependencies
shell: Rscript {0}
run: |
install.packages(c("Rcpp", "knitr", "rmarkdown", "tinytest", "rcmdcheck"))
- name: Check 🔍
shell: Rscript {0}
run: |
rcmdcheck::rcmdcheck(
args = c("--as-cran", "--ignore-vignettes"),
build_args = "--no-build-vignettes",
error_on = "warning"
)
check-r-verse-3-6:
runs-on: ubuntu-18.04
container: rocker/verse:3.6.3
steps:
- name: Checkout repository 🛎
uses: actions/checkout@v2

- name: Install dependencies
shell: Rscript {0}
run: |
remotes::install_deps(dependencies = TRUE)
- name: Check 🔍
shell: Rscript {0}
run: |
devtools::check(cran = TRUE, vignettes = TRUE)
59 changes: 59 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Main

on:
push:
tags:
- "v*.*.*"
jobs:
pkgdown:
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.GH_TOKEN }}
steps:
- uses: actions/checkout@v2

- 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 site
run: pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE)
shell: Rscript {0}

- name: Deploy Docs 🚀
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GH_TOKEN }}
publish_dir: docs

release:
name: Create Release
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Prepare release vars
run: |
echo "PKGNAME=$(sed -n 's/Package: *\([^ ]*\)/\1/p' DESCRIPTION)" >> $GITHUB_ENV
echo "PKGVERS=$(sed -n 's/Version: *\([^ ]*\)/\1/p' DESCRIPTION)" >> $GITHUB_ENV
echo "$(sed -n '2,/^$/p' NEWS.md)" > news.txt
- name: Release
uses: softprops/action-gh-release@v1
with:
tag_name: "v${{ env.PKGVERS }}"
name: "${{ env.PKGNAME }} ${{ env.PKGVERS }}"
body_path: news.txt
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} # This token is provided by Actions, you do not need to create your own token
28 changes: 0 additions & 28 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: sport
Type: Package
Title: Sequential Pairwise Online Rating Techniques
Version: 0.2.0
Version: 0.2.1
Depends: R (>= 3.0)
Authors@R: person("Dawid",
"Kałędkowski",
Expand Down
8 changes: 8 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
sport v0.2.1 (Release date: 2024-01-01)
==============

Changes:

* Fix CRAN issues


sport v0.2.0 (Release date: 2019-01-07)
==============

Expand Down
1 change: 0 additions & 1 deletion src/Makevars
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
CXX_STD = CXX11
PKG_CPPFLAGS = -I../inst/include
4 changes: 1 addition & 3 deletions src/Makevars.win
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
PKG_CPPFLAGS = -I../inst/include
CXX_STD = CXX11
CXX11FLAGS += -std=c++1y
PKG_CPPFLAGS = -I../inst/include
5 changes: 5 additions & 0 deletions src/RcppExports.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@

using namespace Rcpp;

#ifdef RCPP_USE_GLOBAL_ROSTREAM
Rcpp::Rostream<true>& Rcpp::Rcout = Rcpp::Rcpp_cout_get();
Rcpp::Rostream<false>& Rcpp::Rcerr = Rcpp::Rcpp_cerr_get();
#endif

// glicko
List glicko(IntegerVector unique_id, IntegerVector id, IntegerVector rank, StringVector team, StringVector player, NumericVector r, NumericVector rd, NumericVector sigma, NumericVector share, NumericVector lambda, NumericVector weight, double init_r, double init_rd, double init_sigma, double kappa, double tau);
RcppExport SEXP _sport_glicko(SEXP unique_idSEXP, SEXP idSEXP, SEXP rankSEXP, SEXP teamSEXP, SEXP playerSEXP, SEXP rSEXP, SEXP rdSEXP, SEXP sigmaSEXP, SEXP shareSEXP, SEXP lambdaSEXP, SEXP weightSEXP, SEXP init_rSEXP, SEXP init_rdSEXP, SEXP init_sigmaSEXP, SEXP kappaSEXP, SEXP tauSEXP) {
Expand Down
Loading

0 comments on commit 24bea73

Please sign in to comment.