Skip to content

Commit cdf1046

Browse files
Nosfericankleinschmidtdmbatespalday
authored
Draft of using GH Actions (#258)
* Use GH Actions: Replaces Travis and AppVeyor * Test only with current release * Two tiers support * Documenter compatibility Co-authored-by: Dave Kleinschmidt <[email protected]> Co-authored-by: Douglas Bates <[email protected]> Co-authored-by: Phillip Alday <[email protected]>
1 parent cb171da commit cdf1046

File tree

12 files changed

+246
-191
lines changed

12 files changed

+246
-191
lines changed

.github/workflows/Tier1.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Tier1
2+
on:
3+
push:
4+
branches:
5+
- master
6+
paths-ignore:
7+
- 'LICENSE.md'
8+
- 'README.md'
9+
pull_request:
10+
branches:
11+
- master
12+
paths-ignore:
13+
- 'LICENSE.md'
14+
- 'README.md'
15+
release:
16+
types:
17+
- created
18+
jobs:
19+
ci:
20+
runs-on: ${{ matrix.os }}
21+
strategy:
22+
matrix:
23+
julia-version: [1.3]
24+
julia-arch: [x64]
25+
os: [ubuntu-18.04, macos-10.15, windows-2019]
26+
steps:
27+
- uses: actions/checkout@v2
28+
- uses: julia-actions/setup-julia@v1
29+
with:
30+
version: ${{ matrix.julia-version }}
31+
- uses: julia-actions/[email protected]
32+
- uses: julia-actions/[email protected]
33+
env:
34+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
35+
- uses: julia-actions/[email protected]
36+
if: startsWith(matrix.os, 'Ubuntu')
37+
env:
38+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
39+
- uses: julia-actions/julia-docdeploy@releases/v1
40+
if: startsWith(matrix.os, 'Ubuntu')
41+
env:
42+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
43+
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}

.github/workflows/Tier2.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Tier2
2+
on:
3+
push:
4+
branches:
5+
- master
6+
paths-ignore:
7+
- 'LICENSE.md'
8+
- 'README.md'
9+
pull_request:
10+
branches:
11+
- master
12+
paths-ignore:
13+
- 'LICENSE.md'
14+
- 'README.md'
15+
release:
16+
types:
17+
- created
18+
jobs:
19+
ci:
20+
runs-on: ${{ matrix.os }}
21+
strategy:
22+
fail-fast: false
23+
matrix:
24+
julia-version: [1.3, 1.4.0-rc1]
25+
julia-arch: [x64, x86]
26+
os: [ubuntu-18.04, macos-10.15, windows-2019]
27+
exclude:
28+
- julia-version: 1.3
29+
julia-arch: x64
30+
- os: macos-10.15
31+
julia-arch: x86
32+
steps:
33+
- uses: actions/checkout@v2
34+
- uses: julia-actions/setup-julia@v1
35+
with:
36+
version: ${{ matrix.julia-version }}
37+
- uses: julia-actions/[email protected]
38+
- uses: julia-actions/[email protected]
39+
env:
40+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.travis.yml

Lines changed: 0 additions & 23 deletions
This file was deleted.

README.md

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
|**Documentation**|**Citation**|**Build Status**|**Code Coverage**|
44
|:-:|:-:|:-:|:-:|
5-
|[![][docs-stable-img]][docs-stable-url] [![][docs-latest-img]][docs-latest-url] | [![][doi-img]][doi-url] | [![][travis-img]][travis-url] [![][appveyor-img]][appveyor-url] [![PkgEval][pkgeval-img]][pkgeval-url] | [![][codecov-img]][codecov-url]|
5+
|[![][docs-stable-img]][docs-stable-url] [![][docs-latest-img]][docs-latest-url] | [![][doi-img]][doi-url] | [![T1-url][T1-img]][pkgeval-url] [![T2-url][T2-img]][pkgeval-url] [![PkgEval][pkgeval-img]][pkgeval-url] | [![][codecov-img]][codecov-url]|
66

77
[doi-img]: https://zenodo.org/badge/9106942.svg
88
[doi-url]: https://zenodo.org/badge/latestdoi/9106942
@@ -13,15 +13,15 @@
1313
[docs-stable-img]: https://img.shields.io/badge/docs-stable-blue.svg
1414
[docs-stable-url]: https://juliastats.github.io/MixedModels.jl/stable
1515

16-
[travis-img]: https://travis-ci.org/JuliaStats/MixedModels.jl.svg?branch=master
17-
[travis-url]: https://travis-ci.org/JuliaStats/MixedModels.jl
18-
19-
[appveyor-img]: https://ci.appveyor.com/api/projects/status/github/JuliaStats/MixedModels.jl?svg=true
20-
[appveyor-url]: https://ci.appveyor.com/project/JuliaStats/mixedmodels-jl
21-
2216
[codecov-img]: https://codecov.io/github/JuliaStats/MixedModels.jl/badge.svg?branch=master
2317
[codecov-url]: https://codecov.io/github/JuliaStats/MixedModels.jl?branch=master
2418

19+
[T1-img]: https://github.com/JuliaStats/MixedModels.jl/workflows/Tier1/badge.svg
20+
[T1-url]: https://github.com/JuliaStats/MixedModels.jl/actions?workflow=Tier1
21+
22+
[T2-img]: https://github.com/JuliaStats/MixedModels.jl/workflows/Tier2/badge.svg
23+
[T2-url]: https://github.com/JuliaStats/MixedModels.jl/actions?workflow=Tier2
24+
2525
[pkgeval-img]: https://juliaci.github.io/NanosoldierReports/pkgeval_badges/M/MixedModels.svg
2626
[pkgeval-url]: https://juliaci.github.io/NanosoldierReports/pkgeval_badges/report.html
2727

@@ -45,6 +45,21 @@ In a `LinearMixedModel` the conditional mean, 𝛍 = 𝔼[𝓨|𝓑 = 𝐛], is
4545
In a `GeneralizedLinearMixedModel`, the conditional mean, 𝔼[𝓨|𝓑 = 𝐛], is related to the linear predictor via a _link function_.
4646
Typical distribution forms are _Bernoulli_ for binary data or _Poisson_ for count data.
4747

48+
## Currently Supported Platforms
49+
50+
|OS|OS Version|Arch|Julia|Tier|
51+
|:-:|:-:|:-:|:-:|:-:|
52+
|Linux|Ubuntu 18.04|x64|v1.3|1|
53+
|macOS|Catalina 10.15|x64|v1.3|1|
54+
|Windows|Server 2019|x64|v1.3|1|
55+
|Linux|Ubuntu 18.04|x86|v1.3|2|
56+
|Windows|Server 2019|x84|v1.3|2|
57+
|Linux|Ubuntu 18.04|x64|v1.4|2|
58+
|macOS|Catalina 10.15|x64|v1.4|2|
59+
|Windows|Server 2019|x64|v1.4|2|
60+
|Linux|Ubuntu 18.04|x86|v1.4|2|
61+
|Windows|Server 2019|x84|v1.4|2|
62+
4863
## Version 2.0.0
4964

5065
Version 2.0.0 contains some user-visible changes and many changes in the underlying code.

appveyor.yml

Lines changed: 0 additions & 33 deletions
This file was deleted.

docs/Project.toml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,11 @@ StatsBase = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91"
1010
Weave = "44d3d7a6-8a23-5bf8-98c5-b353f8df5ec9"
1111

1212
[compat]
13-
Documenter = "~0.20"
13+
DataFrames = "0.20.0"
14+
Documenter = "0.24"
15+
FreqTables = "0.3"
16+
Gadfly = "1"
17+
PooledArrays = "0.5"
18+
RData = "0.7"
19+
StatsBase = "0.32"
20+
Weave = "0.9"

docs/jmd/GaussHermite.jmd

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ More formally, a `k`th order rule is exact when `f` is a `k-1` order polynomial.
3030
In the [*Golub-Welsch algorithm*](https://en.wikipedia.org/wiki/Gaussian_quadrature#The_Golub-Welsch_algorithm) the abscissae for a particular Gaussian quadrature rule are determined as the eigenvalues of a symmetric tri-diagonal matrix and the weights are derived from the squares of the first row of the matrix of eigenvectors.
3131
For a `k`th order normalized Gauss-Hermite rule the tridiagonal matrix has zeros on the diagonal and the square roots of `1:k-1` on the super- and sub-diagonal, e.g.
3232
```{julia;term=true}
33-
using LinearAlgebra, Gadfly
33+
using DataFrames, LinearAlgebra, Gadfly
3434
sym3 = SymTridiagonal(zeros(3), sqrt.(1:2))
3535
ev = eigen(sym3);
3636
show(ev.values)
@@ -91,24 +91,20 @@ Several covariates were recorded including the woman's age (centered at the mean
9191
The version of the data used here is that used in review of multilevel modeling software conducted by the Center for Multilevel Modelling, currently at University of Bristol (http://www.bristol.ac.uk/cmm/learning/mmsoftware/data-rev.html).
9292
These data are available as the `Contraception` data frame in the test data for the `MixedModels` package.
9393
```{julia;term=true}
94-
using DataFrames, PooledArrays, RData
95-
const dat = Dict(Symbol(k)=>v for (k,v) in
96-
load(joinpath(dirname(pathof(MixedModels)), "..", "test", "dat.rda")));
97-
contra = dat[:Contraception];
98-
contra.urbdist = PooledArray(string.(contra.urb, contra.d));
94+
contra = MixedModels.dataset(:contra)
9995
describe(contra)
10096
```
10197

10298
A smoothed scatterplot of contraception use versus age
10399
```{julia;echo=false;fig_cap="Scatterplot smooth of contraception use versus age"}
104-
plot(contra, x=:a, y=:use, Geom.smooth, Guide.xlabel("Centered age (yr)"),
100+
plot(contra, x=:age, y=:use, Geom.smooth, Guide.xlabel("Centered age (yr)"),
105101
Guide.ylabel("Contraception use"))
106102
```
107103
shows that the proportion of women using artificial contraception is approximately quadratic in age.
108104

109105
A model with fixed-effects for age, age squared, number of live children and urban location and with random effects for district, is fit as
110106
```{julia;term=true}
111-
const form1 = @formula use ~ 1 + a + abs2(a) + l + urb + (1|d);
107+
const form1 = @formula use ~ 1 + age + abs2(age) + livch + urban + (1|dist);
112108
m1 = fit!(GeneralizedLinearMixedModel(form1, contra,
113109
Bernoulli()), fast=true)
114110
```
@@ -136,7 +132,7 @@ One thing to notice is that, even on the deviance scale, the contributions of di
136132
This is primarily due to different sample sizes in the different districts.
137133
```{julia;term=true}
138134
using FreqTables
139-
freqtable(contra, :d)'
135+
freqtable(contra, :dist)'
140136
```
141137

142138
Because the first district has one of the largest sample sizes and the third district has the smallest sample size, these two will be used for illustration.

docs/jmd/bootstrap.jmd

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,12 @@ For example, a simple linear mixed-effects model for the `Dyestuff` data in the
2525
package for [`R`](https://www.r-project.org) is fit by
2626

2727
```{julia;term=true}
28-
using DataFrames, Gadfly, MixedModels, Random, RData
29-
datf = joinpath(dirname(pathof(MixedModels)), "..", "test", "dat.rda");
30-
const dat = Dict(Symbol(k)=>v for (k,v) in load(datf));
28+
using DataFrames, Gadfly, MixedModels, Random
3129
```
3230

3331
```{julia;term=true}
34-
ds = rename!(dat[:Dyestuff], [:Batch, :Yield]) # the Dyestuff data
35-
m1 = fit(MixedModel, @formula(Yield ~ 1 + (1 | Batch)), ds)
32+
dyestuff = MixedModels.dataset(:dyestuff)
33+
m1 = fit(MixedModel, @formula(yield ~ 1 + (1 | batch)), dyestuff)
3634
```
3735

3836
To bootstrap the model parameters, first initialize a random number generator
@@ -88,10 +86,15 @@ However, it is not as straightforward to detect singularity in vector-valued ran
8886

8987
For example, if we bootstrap a model fit to the `sleepstudy` data
9088
```{julia;term=true}
91-
m2 = fit(MixedModel, @formula(Y ~ 1+U+(1+U|G)), dat[:sleepstudy])
89+
sleepstudy = MixedModels.dataset(:sleepstudy)
90+
m2 = fit(
91+
MixedModel,
92+
@formula(reaction ~ 1+days+(1+days|subj)),
93+
sleepstudy,
94+
)
9295
```
9396
```{julia;term=true}
94-
samp2 = parametricbootstrap(rng, 10_000, m2);
97+
samp2 = parametricbootstrap(rng, 10_000, m2, use_threads=true);
9598
```
9699
the singularity can be exhibited as a standard deviation of zero or as a correlation of $\pm1$.
97100
The `σρs` property of the sample is a vector of named tuples

0 commit comments

Comments
 (0)