You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+6Lines changed: 6 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,12 @@
2
2
3
3
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
4
4
5
+
## Unreleased
6
+
7
+
### Added
8
+
9
+
* Information about dataset versions can now be accessed via the the `.versions` property of a `Dataset` object. (#2)
Copy file name to clipboardExpand all lines: docs/src/guides/datasets.md
+40-3Lines changed: 40 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -30,12 +30,13 @@ julia> JuliaHub.datasets()
30
30
31
31
If you know the name of the dataset, you can also directly access it with the [`dataset`](@ref) function, and you can access the dataset metadata via the properties of the [`Dataset`](@ref) object.
32
32
33
-
```jldoctest
33
+
```jldoctest example-dataset
34
34
julia> ds = JuliaHub.dataset("example-dataset")
35
35
Dataset: example-dataset (Blob)
36
36
owner: username
37
37
description: An example dataset
38
-
size: 57 bytes
38
+
versions: 2
39
+
size: 388 bytes
39
40
tags: tag1, tag2
40
41
41
42
julia> ds.owner
@@ -45,7 +46,7 @@ julia> ds.description
45
46
"An example dataset"
46
47
47
48
julia> ds.size
48
-
57
49
+
388
49
50
```
50
51
51
52
If you want to work with dataset that you do not own but is shared with you in JuliaHub, you can pass `shared=true` to [`datasets`](@ref), or specify the username.
As datasets can have multiple versions, the [`.versions` property of `Dataset`](@ref Dataset) can be used to see information about the individual versions (represented with [`DatasetVersion`](@ref) objects).
85
+
When downloading, you can also specify the version you wish to download (with the default being the newest version).
To explicitly access the newest dataset, you can use the `last` function on the `.versions` property.
109
+
110
+
```jldoctest example-dataset
111
+
julia> last(ds.versions)
112
+
DatasetVersion: example-dataset @ v2
113
+
owner: username
114
+
timestamp: 2022-10-14T01:39:43.237-04:00
115
+
size: 331 bytes
116
+
117
+
```
118
+
82
119
!!! tip "Tip: DataSets.jl"
83
120
84
121
In JuliaHub jobs and Cloud IDEs you can also use the [DataSets.jl](https://github.com/JuliaComputing/DataSets.jl) package to access and work with datasets.
0 commit comments