Skip to content

Commit df1f49f

Browse files
Merge pull request #8 from samuelbelko/remove-dep-and-fix-docs
Remove dependencies and improve docs
2 parents 135a11d + 18bab89 commit df1f49f

File tree

4 files changed

+16
-20
lines changed

4 files changed

+16
-20
lines changed

Project.toml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,7 @@ uuid = "89f642e6-4179-4274-8202-c11f4bd9a72c"
33
authors = ["Samuel Belko <samuelbelko@protonmail.com> and contributors"]
44
version = "1.0.0"
55

6-
[deps]
7-
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
8-
StatsBase = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91"
9-
106
[compat]
11-
Statistics = "1"
12-
StatsBase = "0.34"
137
julia = "1.10"
148

159
[extras]

docs/make.jl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
using Documenter, SurrogatesBase
22

3+
DocMeta.setdocmeta!(SurrogatesBase,
4+
:DocTestSetup,
5+
:(using SurrogatesBase))
6+
37
cp("./docs/Manifest.toml", "./docs/src/assets/Manifest.toml", force = true)
48
cp("./docs/Project.toml", "./docs/src/assets/Project.toml", force = true)
59

@@ -14,7 +18,7 @@ ENV["GKSwstype"] = "100"
1418
makedocs(modules = [SurrogatesBase],
1519
sitename = "SurrogatesBase.jl",
1620
clean = true,
17-
doctest = false,
21+
doctest = true,
1822
linkcheck = true,
1923
format = Documenter.HTML(assets = ["assets/favicon.ico"],
2024
canonical = "https://docs.sciml.ai/SurrogatesBase/stable/"),

docs/src/interface.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,7 @@ The following methods might be supported:
7575

7676
- `mean(finite_posterior(s,xs))` returns a `Vector` of posterior means at `xs`
7777
- `var(finite_posterior(s,xs))` returns a `Vector` of posterior variances at `xs`
78-
- `mean_and_var(finite_posterior(s,xs))` returns a `Tuple` consisting of a `Vector`
79-
of posterior means and a `Vector` of posterior variances at `xs`
78+
- `mean_and_var(finite_posterior(s,xs))` returns a `Tuple` consisting of a `Vector` of posterior means and a `Vector` of posterior variances at `xs`
8079
- `rand(finite_posterior(s,xs))` returns a `Vector`, which is a sample from the joint posterior at points `xs`
8180

8281
### Optional methods

src/SurrogatesBase.jl

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,18 @@ Subtypes of `AbstractDeterministicSurrogate` are callable with a `Vector` of poi
1818
The result is a `Vector` of evaluations of the surrogate at points `xs`, corresponding to
1919
approximations of the underlying function at points `xs` respectively.
2020
21-
# Examples
22-
```jldoctest
23-
julia> struct ZeroSurrogate <: AbstractDeterministicSurrogate end
21+
# Examples
2422
25-
julia> (::ZeroSurrogate)(xs) = 0
23+
```jldoctest
24+
julia> struct ZeroSurrogate <: AbstractDeterministicSurrogate end
2625
27-
julia> s = ZeroSurrogate()
28-
ZeroSurrogate()
26+
julia> (::ZeroSurrogate)(xs) = 0
2927
30-
julia> s([4]) == 0
31-
true
32-
```
28+
julia> s = ZeroSurrogate();
29+
30+
julia> s([4]) == 0
31+
true
32+
```
3333
"""
3434
abstract type AbstractDeterministicSurrogate <: Function end
3535

@@ -93,8 +93,7 @@ the returned object:
9393
9494
- `mean(finite_posterior(s,xs))` returns a `Vector` of posterior means at `xs`
9595
- `var(finite_posterior(s,xs))` returns a `Vector` of posterior variances at `xs`
96-
- `mean_and_var(finite_posterior(s,xs))` returns a `Tuple` consisting of a `Vector`
97-
of posterior means and a `Vector` of posterior variances at `xs`
96+
- `mean_and_var(finite_posterior(s,xs))` returns a `Tuple` consisting of a `Vector` of posterior means and a `Vector` of posterior variances at `xs`
9897
- `rand(finite_posterior(s,xs))` returns a `Vector`, which is a sample from the joint
9998
posterior at points `xs`
10099

0 commit comments

Comments
 (0)