Skip to content

Commit 1408e79

Browse files
committed
docs: fix DatasetVersion docstring
1 parent 1040337 commit 1408e79

File tree

2 files changed

+22
-2
lines changed

2 files changed

+22
-2
lines changed

Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ docs-manifest:
1717
docs: docs/Manifest.toml
1818
${JULIA} --project=docs/ docs/make.jl
1919

20+
fix-doctests: docs/Manifest.toml
21+
${JULIA} --project=docs/ docs/make.jl --fix-doctests
22+
2023
changelog:
2124
${JULIA} --project=docs/ docs/changelog.jl
2225

src/datasets.jl

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,25 @@ Objects have the following properties:
2525
- `.size :: Int`: size of the dataset version in bytes
2626
- `.timestamp :: ZonedDateTime`: dataset version timestamp
2727
28-
```
29-
julia> JuliaHub.datasets()
28+
```jldoctest
29+
julia> ds = JuliaHub.dataset("example-dataset")
30+
Dataset: example-dataset (Blob)
31+
owner: username
32+
description: An example dataset
33+
versions: 2
34+
size: 388 bytes
35+
tags: tag1, tag2
36+
37+
julia> ds.versions
38+
2-element Vector{JuliaHub.DatasetVersion}:
39+
JuliaHub.DatasetVersion(dataset = ("username", "example-dataset"), version = 1)
40+
JuliaHub.DatasetVersion(dataset = ("username", "example-dataset"), version = 2)
41+
42+
julia> ds.versions[end]
43+
DatasetVersion: example-dataset @ v2
44+
owner: username
45+
timestamp: 2022-10-14T01:39:43.237-04:00
46+
size: 331 bytes
3047
```
3148
3249
See also: [`Dataset`](@ref), [`datasets`](@ref), [`dataset`](@ref).

0 commit comments

Comments
 (0)