Skip to content

Commit

Permalink
Release v0.6.0 (#117)
Browse files Browse the repository at this point in the history
* Test refactoring (#95)
* BG/NBD nocov and staticcov (#49)
* GGompertz/NBD nocov and staticcov (#92)
* Reduce tests on CI (#104)
* Test dyncov unconditional expectation, LL, and CET intermediate results (#105, #110)
* Dyncov CET for k==1 (#106)
* Refactor clvtime correctness tests (#107)
* Pnbd PAlive numerically more stable using LL (#103)
* Feature add new models to walkthrough (#109)
* Prepare Release v0.6 (#102)

Co-authored-by: Patrik Schilter <[email protected]>
Co-authored-by: Niels Kübler <[email protected]>
Co-authored-by: Patrick Bachmann <[email protected]>
  • Loading branch information
3 people authored Jun 25, 2020
1 parent 0396ef5 commit 2ffe72f
Show file tree
Hide file tree
Showing 168 changed files with 10,460 additions and 2,909 deletions.
13 changes: 12 additions & 1 deletion .github/workflows/Coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,16 @@ jobs:

- name: Test coverage
# run: covr::codecov() # uploads to codecov.io
run: covr::package_coverage(type = "tests", quiet = FALSE)
run: |
# If on a release branch (name starts with 'release'),
# run all tests, including lengthy ones marked with skip_on_ci/skip_on_covr()
if(grepl(pattern = "^release", x = Sys.getenv("GITHUB_HEAD_REF"))){
Sys.setenv(R_COVR="")
print("On release branch: Run all coverage tests (setting R_COVR='')")
}else{
print("Not on release branch: Dont run all tests (skip_on_covr())")
}
covr::package_coverage(type = "tests", quiet = FALSE)
shell: Rscript {0}
8 changes: 7 additions & 1 deletion .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
name: R-CMD-check
on: push
on:
push:
branches:
- '*'
- '!master' # run on every branch except master

# CMD checks on win, mac, ubuntu
jobs:
R-CMD-check:
Expand Down Expand Up @@ -47,6 +52,7 @@ jobs:
sysreqs=$(Rscript -e "cat(sysreqs::sysreq_commands('DESCRIPTION'))")
sudo -s eval "$sysreqs"
sudo apt-get install -y qpdf # qpdf needed on ubuntu
sudo apt-get install texlive-xetex # for tinytex
- name: Install tinytex for linux (to build vignettes)
if: runner.os == 'Linux'
Expand Down
21 changes: 20 additions & 1 deletion .github/workflows/Tests.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
name: testthat-tests
on: pull_request # default to types [opened, synchronize, reopened]
# Run tests for every PR and when commiting (push) to development or to the release branch
# pull_request: defaults to types [opened, synchronize, reopened]
on:
pull_request:
branches:
- '*'
push:
branches:
- 'release**'
- 'development'
jobs:
tests-ubuntu-16-04-R-release:
runs-on: ubuntu-16.04
Expand Down Expand Up @@ -31,6 +40,16 @@ jobs:
run: |
library(testthat)
library(devtools)
# If on a release branch (name starts with 'release'),
# run all tests, including lengthy ones marked with skip_on_ci()
if(grepl(pattern = "^release", x = Sys.getenv("GITHUB_HEAD_REF"))){
Sys.setenv(CI="")
print("On release branch: Run all tests")
}else{
print("Not on release branch: Dont run all tests (skip_on_ci())")
}
reporter <- RstudioReporter$new() # has to be defined outside capture.output to still print
capture.output(devtools::test(reporter = reporter, stop_on_failure=TRUE, stop_on_warning=TRUE))
shell: Rscript {0}
2 changes: 1 addition & 1 deletion CLVTools.Rproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ StripTrailingWhitespace: Yes
BuildType: Package
PackageUseDevtools: Yes
PackageInstallArgs: --no-multiarch --with-keep.source
PackageCheckArgs: --no-tests --as-cran
PackageCheckArgs: --no-tests --as-cran --no-vignettes --no-build-vignettes --ignore-vignettes
PackageRoxygenize: rd,collate,namespace
28 changes: 19 additions & 9 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: CLVTools
Title: Tools for Customer Lifetime Value Estimation
Version: 0.5.0
Date: 2020-05-05
Version: 0.6.0
Date: 2020-06-22
Authors@R: c(
person(given="Patrick", family="Bachmann", email = "[email protected]", role = c("cre","aut")),
person(given="Jeffrey", family="Naef", email = "[email protected]",role = "aut"),
Expand All @@ -15,9 +15,11 @@ Description: Probabilistic latent customer attrition models (also known as "buy-
predict future purchase behavior of customers. This package includes fast and accurate implementations of various
probabilistic latent customer attrition models for non-contractual settings (e.g., retail business) with and
without time-invariant and time-varying covariates. Currently, the package includes the Pareto/NBD model
(Pareto/Negative-Binomial-Distribution) for the purchase and the attrition processes as well as the Gamma/Gamma model
for the spending process. For reference to the Pareto/NBD model, see Schmittlein DC, Morrison DG, Colombo R (1987) <doi:10.1287/mnsc.33.1.1>.
For reference to the Gamma/Gamma model, see Fader PS, Hardie BG, Lee K (2005) <doi:10.1509/jmkr.2005.42.4.415>.
(Pareto/Negative-Binomial-Distribution), the BG/NBD mode (Beta-Gamma/Negative-Binomial-Distribution) and the GGom/NBD
(Gamma-Gompertz/Negative-Binomial-Distribution) for the purchase and the attrition processes as well as the Gamma/Gamma model
for the spending process. For reference to the Pareto/NBD model, see Schmittlein DC, Morrison DG, Colombo R (1987) <doi:10.1287/mnsc.33.1.1>,
for the BG/NBD model, see Fader PS, Hardie BG, Lee K (2005) <doi:10.1287/mksc.1040.0098> and for the GGom/NBD model see Bemmaor AC, Glady N (2012)
<doi:10.1287/mnsc.1110.1461>. For reference to the Gamma/Gamma model, see Fader PS, Hardie BG, Lee K (2005) <doi:10.1509/jmkr.2005.42.4.415>.
Imports:
data.table (>= 1.12.0),
foreach (>= 1.5.0),
Expand All @@ -26,14 +28,14 @@ Imports:
Matrix (>= 1.2-17),
MASS,
optimx (>= 2019-12.02),
Rcpp (>= 0.12.12),
stats,
utils
Suggests:
BTYD,
covr,
doFuture,
doParallel,
future,
knitr,
rmarkdown,
testthat
Expand All @@ -42,7 +44,7 @@ URL: https://github.com/bachmannpatrick/CLVTools
BugReports: https://github.com/bachmannpatrick/CLVTools/issues
NeedsCompilation: yes
SystemRequirements: C++11
LinkingTo: Rcpp, RcppArmadillo (>= 0.9.500.2.0), RcppGSL (>= 0.3.7)
LinkingTo: Rcpp(>= 0.12.12), RcppArmadillo (>= 0.9.500.2.0), RcppGSL (>= 0.3.7)
LazyLoad: yes
Encoding: UTF-8
Collate:
Expand All @@ -51,12 +53,20 @@ Collate:
'all_generics.R'
'class_clv_time.R'
'class_clv_data.R'
'class_clv_data_staticcovariates.R'
'class_clv_data_dynamiccovariates.R'
'class_clv_model.R'
'class_clv_fitted.R'
'class_clv_model_bgnbd.R'
'class_clv_bgnbd.R'
'class_clv_fitted_staticcov.R'
'class_clv_data_staticcovariates.R'
'class_clv_model_bgnbd_staticcov.R'
'class_clv_bgnbd_staticcov.R'
'class_clv_data_dynamiccovariates.R'
'class_clv_fitted_dynamiccov.R'
'class_clv_model_ggomnbd_nocov.R'
'class_clv_ggomnbd.R'
'class_clv_model_ggomnbd_staticcov.R'
'class_clv_ggomnbd_staticcov.R'
'class_clv_model_pnbd.R'
'class_clv_model_pnbd_staticcov.R'
'class_clv_model_pnbd_dynamiccov.R'
Expand Down
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ importFrom(stats,AIC)
importFrom(stats,BIC)
importFrom(stats,coef)
importFrom(stats,fitted)
importFrom(stats,integrate)
importFrom(stats,logLik)
importFrom(stats,model.frame)
importFrom(stats,model.matrix)
Expand Down
8 changes: 8 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
# CLVTools 0.6.0

### NEW FEATURES
* Beta-Geometric/NBD (BG/NBD) model to predict repeat transactions without and with static covariates
* Gamma-Gompertz (GGompertz) model to predict repeat transactions without and with static covariates
* Predictions are now possible for all periods >= 0 whereas before a minimum of 2 periods was required


# CLVTools 0.5.0
* Initial release of the CLVTools package

Expand Down
Loading

0 comments on commit 2ffe72f

Please sign in to comment.