Skip to content

Commit

Permalink
Sort out test and docs deps (#205)
Browse files Browse the repository at this point in the history
* Tidy up test deps

* Tidy up docs deps

* Bump Documenter dep

* Typo
  • Loading branch information
willtebbutt authored Jul 22, 2021
1 parent e254d90 commit 37b4697
Show file tree
Hide file tree
Showing 12 changed files with 44 additions and 34 deletions.
4 changes: 2 additions & 2 deletions docs/Project.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[deps]
AbstractGPs = "99985d1d-32ba-4be9-9821-2ec096f28918"
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
Stheno = "8188c328-b5d6-583d-959b-9690869a5511"

[compat]
Documenter = "0.26"
Documenter = "0.27"
julia = "1.6"
5 changes: 3 additions & 2 deletions docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,14 @@ isempty(processes) || success(processes) || error("some examples were not run su


### Build documentation

using Pkg
Pkg.develop(path=joinpath(@__DIR__, ".."))
using Documenter, Stheno

DocMeta.setdocmeta!(
Stheno,
:DocTestSetup,
:(using AbstractGPs, Stheno, Random, LinearAlgebra);
:(using Stheno.AbstractGPs, Stheno, Random, LinearAlgebra);
recursive=true,
)

Expand Down
7 changes: 2 additions & 5 deletions test/Project.toml
Original file line number Diff line number Diff line change
@@ -1,19 +1,16 @@
[deps]
AbstractGPs = "99985d1d-32ba-4be9-9821-2ec096f28918"
BlockArrays = "8e7c35d0-a365-5155-bbbb-fb81a777f24e"
Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f"
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
FiniteDifferences = "26cc04aa-876d-5657-8c51-4c34ba976000"
Flux = "587475ba-b771-5e3f-ad9e-33799f191a9c"
KernelFunctions = "ec8451be-7e33-11e9-00cf-bbf324bd1392"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
Stheno = "8188c328-b5d6-583d-959b-9690869a5511"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
TimerOutputs = "a759f4b9-e2f1-59dc-863e-4aeb61b1ea8f"
Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f"

[compat]
Documenter = "0.25, 0.26, 0.27"
FiniteDifferences = "0.12"
Flux = "0.12"
TimerOutputs = "0.5"
3 changes: 0 additions & 3 deletions test/abstract_gp.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
using Stheno: FiniteGP, block_diagonal
using Distributions: MvNormal

_rng() = MersenneTwister(123456)

function generate_noise_matrix(rng::AbstractRNG, N::Int)
Expand Down
2 changes: 0 additions & 2 deletions test/composite/cross.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
using Stheno: BlockData, cross

@timedtestset "cross" begin
@timedtestset "Correctness tests" begin
rng, P, Q, gpc = MersenneTwister(123456), 2, 3, GPC()
Expand Down
2 changes: 0 additions & 2 deletions test/composite/test_util.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
using Stheno: FiniteGP

"""
check_consistency(rng::AbstractRNG, θ, f, x::AV, y::AV, A, z::AV)
Expand Down
2 changes: 0 additions & 2 deletions test/gp/gp.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
using Stheno: GPC

@timedtestset "gp" begin

# Ensure that basic functionality works as expected.
Expand Down
44 changes: 37 additions & 7 deletions test/runtests.jl
Original file line number Diff line number Diff line change
@@ -1,17 +1,47 @@
using AbstractGPs
using BlockArrays
using Stheno

# Dependencies that are also used in Stheno that are not in the standard library.
# This is a hack to prevent CompatHelper from trying to maintain a version number for these
# packages in both Stheno and test.
using Stheno.AbstractGPs
using Stheno.BlockArrays
using Stheno.KernelFunctions
using Stheno.Zygote

# Dependencies that are test-specific.
using Documenter
using FiniteDifferences
using LinearAlgebra
using KernelFunctions
using Random
using Statistics
using Stheno
using Test
using TimerOutputs
using Zygote

using Stheno: mean, cov, var, GPC, AV
using Stheno:
mean,
cov,
var,
GPC,
AV,
FiniteGP,
block_diagonal,
AbstractGP,
BlockData,
blocks,
cross,
ColVecs,
Xt_invA_Y,
Xt_invA_X,
diag_At_A,
diag_At_B,
diag_Xt_invA_X,
diag_Xt_invA_Y,
block_diagonal,
BlockDiagonal,
blocksizes

using Stheno.AbstractGPs.Distributions: MvNormal
using FiniteDifferences: j′vp

const to = TimerOutput()

Expand Down Expand Up @@ -65,7 +95,7 @@ include("test_util.jl")
DocMeta.setdocmeta!(
Stheno,
:DocTestSetup,
:(using AbstractGPs, Stheno, Random, Documenter, LinearAlgebra);
:(using Stheno.AbstractGPs, Stheno, Random, Documenter, LinearAlgebra);
recursive=true,
)
doctest(Stheno)
Expand Down
3 changes: 0 additions & 3 deletions test/test_util.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
using Stheno: AbstractGP, BlockData, blocks
using FiniteDifferences: j′vp

const _rtol = 1e-10
const _atol = 1e-10

Expand Down
2 changes: 0 additions & 2 deletions test/util/abstract_data_set.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
using Stheno: ColVecs, BlockData

@timedtestset "abstract_data_set" begin
rng, N, D = MersenneTwister(123456), 10, 2
x, X = randn(rng, N), randn(rng, D, N)
Expand Down
2 changes: 0 additions & 2 deletions test/util/block_arrays/diagonal.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
using Stheno: block_diagonal, BlockDiagonal, blocksizes

function general_BlockDiagonal_tests(rng, blocks)
d = block_diagonal(blocks)
Ps, Qs = size.(blocks, 1), size.(blocks, 2)
Expand Down
2 changes: 0 additions & 2 deletions test/util/covariance_matrices.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
using Stheno: Xt_invA_Y, Xt_invA_X, diag_At_A, diag_At_B, diag_Xt_invA_X, diag_Xt_invA_Y

@timedtestset "cholesky" begin
# Set up some matrices and factorisations.
rng, N, N′, P, Q = MersenneTwister(123456), 5, 3, 6, 2
Expand Down

0 comments on commit 37b4697

Please sign in to comment.