Skip to content

Commit ab703ac

Browse files
committed
minor changes to snapshots based on updates to printing from external pkgs
1 parent 163373b commit ab703ac

File tree

4 files changed

+56
-28
lines changed

4 files changed

+56
-28
lines changed

tests/testthat/_snaps/check-m1.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Code
44
check_tf_version("error")
5-
Message <simpleMessage>
5+
Message
66
greta does not currently work with Apple Silicon (M1)
77
We are working on getting this resolved ASAP, see <https://github.com/greta-dev/greta/issues/458> for current progress.FALSE
88

tests/testthat/_snaps/distributions.md

+34-14
Original file line numberDiff line numberDiff line change
@@ -37,25 +37,25 @@
3737

3838
Wrong function name provided in another model
3939
It looks like you're using greta's `poisson()` function in the family argument of another model.
40-
Maybe you want to use `` family = stats::`poisson` ``,instead?
40+
Maybe you want to use `family = stats::poisson`,instead?
4141

4242
---
4343

4444
Wrong function name provided in another model
4545
It looks like you're using greta's `binomial()` function in the family argument of another model.
46-
Maybe you want to use `` family = stats::`binomial` ``,instead?
46+
Maybe you want to use `family = stats::binomial`,instead?
4747

4848
---
4949

5050
Wrong function name provided in another model
5151
It looks like you're using greta's `poisson()` function in the family argument of another model.
52-
Maybe you want to use `` family = stats::`poisson` ``,instead?
52+
Maybe you want to use `family = stats::poisson`,instead?
5353

5454
---
5555

5656
Wrong function name provided in another model
5757
It looks like you're using greta's `poisson()` function in the family argument of another model.
58-
Maybe you want to use `` family = stats::`poisson` ``,instead?
58+
Maybe you want to use `family = stats::poisson`,instead?
5959

6060
# wishart distribution errors informatively
6161

@@ -130,11 +130,15 @@
130130

131131
---
132132

133-
object 'n_realisations' not found
133+
! Could not evaluate cli `{}` expression: `n_realisations`.
134+
Caused by error in `eval(expr, envir = envir)`:
135+
! object 'n_realisations' not found
134136

135137
---
136138

137-
object 'n_realisations' not found
139+
! Could not evaluate cli `{}` expression: `n_realisations`.
140+
Caused by error in `eval(expr, envir = envir)`:
141+
! object 'n_realisations' not found
138142

139143
---
140144

@@ -153,11 +157,15 @@
153157

154158
---
155159

156-
object 'n_realisations' not found
160+
! Could not evaluate cli `{}` expression: `n_realisations`.
161+
Caused by error in `eval(expr, envir = envir)`:
162+
! object 'n_realisations' not found
157163

158164
---
159165

160-
object 'n_realisations' not found
166+
! Could not evaluate cli `{}` expression: `n_realisations`.
167+
Caused by error in `eval(expr, envir = envir)`:
168+
! object 'n_realisations' not found
161169

162170
---
163171

@@ -176,11 +184,15 @@
176184

177185
---
178186

179-
object 'n_realisations' not found
187+
! Could not evaluate cli `{}` expression: `n_realisations`.
188+
Caused by error in `eval(expr, envir = envir)`:
189+
! object 'n_realisations' not found
180190

181191
---
182192

183-
object 'n_realisations' not found
193+
! Could not evaluate cli `{}` expression: `n_realisations`.
194+
Caused by error in `eval(expr, envir = envir)`:
195+
! object 'n_realisations' not found
184196

185197
---
186198

@@ -199,11 +211,15 @@
199211

200212
---
201213

202-
object 'n_realisations' not found
214+
! Could not evaluate cli `{}` expression: `n_realisations`.
215+
Caused by error in `eval(expr, envir = envir)`:
216+
! object 'n_realisations' not found
203217

204218
---
205219

206-
object 'n_realisations' not found
220+
! Could not evaluate cli `{}` expression: `n_realisations`.
221+
Caused by error in `eval(expr, envir = envir)`:
222+
! object 'n_realisations' not found
207223

208224
---
209225

@@ -222,11 +238,15 @@
222238

223239
---
224240

225-
object 'n_realisations' not found
241+
! Could not evaluate cli `{}` expression: `n_realisations`.
242+
Caused by error in `eval(expr, envir = envir)`:
243+
! object 'n_realisations' not found
226244

227245
---
228246

229-
object 'n_realisations' not found
247+
! Could not evaluate cli `{}` expression: `n_realisations`.
248+
Caused by error in `eval(expr, envir = envir)`:
249+
! object 'n_realisations' not found
230250

231251
---
232252

tests/testthat/_snaps/inference.md

+18-11
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,17 @@
77

88
Code
99
o <- opt(m, optimiser = optmr(), max_iterations = 500)
10-
Warning <simpleWarning>
10+
Condition
11+
Warning:
1112
This optimiser is deprecated and will be removed in greta 0.4.0.
1213
Please use a different optimiser.
1314

1415
---
1516

1617
Code
1718
o <- opt(m, optimiser = optmr(), max_iterations = 500)
18-
Warning <simpleWarning>
19+
Condition
20+
Warning:
1921
This optimiser is deprecated and will be removed in greta 0.4.0.
2022
Please use a different optimiser.
2123

@@ -28,39 +30,44 @@
2830

2931
Code
3032
o <- opt(m, optimiser = optmr(), max_iterations = 500)
31-
Warning <simpleWarning>
33+
Condition
34+
Warning:
3235
This optimiser is deprecated and will be removed in greta 0.4.0.
3336
Please use a different optimiser.
3437

3538
---
3639

3740
Code
3841
o <- opt(m, optimiser = optmr(), max_iterations = 500)
39-
Warning <simpleWarning>
42+
Condition
43+
Warning:
4044
This optimiser is deprecated and will be removed in greta 0.4.0.
4145
Please use a different optimiser.
4246

4347
---
4448

4549
Code
4650
o <- opt(m, optimiser = optmr(), max_iterations = 500)
47-
Warning <simpleWarning>
51+
Condition
52+
Warning:
4853
This optimiser is deprecated and will be removed in greta 0.4.0.
4954
Please use a different optimiser.
5055

5156
---
5257

5358
Code
5459
o <- opt(m, optimiser = optmr(), max_iterations = 500)
55-
Warning <simpleWarning>
60+
Condition
61+
Warning:
5662
This optimiser is deprecated and will be removed in greta 0.4.0.
5763
Please use a different optimiser.
5864

5965
---
6066

6167
Code
6268
o <- opt(m, optimiser = optmr(), max_iterations = 500)
63-
Warning <simpleWarning>
69+
Condition
70+
Warning:
6471
This optimiser is deprecated and will be removed in greta 0.4.0.
6572
Please use a different optimiser.
6673

@@ -95,7 +102,7 @@
95102
Code
96103
mcmc(m, warmup = 10, n_samples = 10, chains = 2, initial_values = inits,
97104
verbose = FALSE)
98-
Message <simpleMessage>
105+
Message
99106
only one set of initial values was provided, and was used for all chains
100107
Output
101108
$`11`
@@ -185,23 +192,23 @@
185192

186193
Code
187194
draws <- mock_mcmc(1010)
188-
Message <message>
195+
Message
189196
190197
sampling 1010/1010 | eta: 0s | <1% bad
191198

192199
---
193200

194201
Code
195202
draws <- mock_mcmc(500)
196-
Message <message>
203+
Message
197204
198205
sampling 500/500 | eta: 0s | 2% bad
199206

200207
---
201208

202209
Code
203210
draws <- mock_mcmc(10)
204-
Message <message>
211+
Message
205212
206213
sampling =========== 10/10 | eta: 0s | 100% bad
207214

tests/testthat/_snaps/misc.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
Code
2424
check_tf_version("message")
25-
Message <simpleMessage>
25+
Message
2626
We have detected that you do not have the expected python packages setup.
2727
You can set these up by running this R code in the console:
2828
`install_greta_deps()`
@@ -72,5 +72,6 @@
7272

7373
# cleanly() handles TF errors nicely
7474

75-
Fetchez la vache!
75+
greta hit a tensorflow error:
76+
Error in other_stop(): Fetchez la vache!
7677

0 commit comments

Comments
 (0)