Browse code

docs rebuild

Türei Dénes authored on 11/04/2021 00:02:55
Showing1 changed files
... ...
@@ -27,7 +27,7 @@ new_version <- omnipath_cache_latest_or_new(url = bioc_url)
27 27
 new_version$status
28 28
 # [1] "unknown"
29 29
 # download the file
30
-download.file(url = bioc_url, destfile = new_version$path)
30
+httr::GET(bioc_url, httr::write_disk(new_version$path, overwrite = TRUE))
31 31
 # report to the cache database that the download is ready
32 32
 omnipath_cache_download_ready(new_version)
33 33
 # now the status is ready:
Browse code

runnable examples whereever it's possible

Türei Dénes authored on 10/03/2021 23:06:36
Showing1 changed files
... ...
@@ -20,23 +20,22 @@ Character: invisibly returns the version number of the cache
20 20
 Sets the download status to ready for a cache item
21 21
 }
22 22
 \examples{
23
-\donttest{
24
-my_url <- 'https://bioconductor.org/'
23
+bioc_url <- 'https://bioconductor.org/'
25 24
 # request a new version item (or retrieve the latest)
26
-new_version <- omnipath_cache_latest_or_new(url = my_url)
25
+new_version <- omnipath_cache_latest_or_new(url = bioc_url)
27 26
 # check if the version item is not a finished download
28 27
 new_version$status
29 28
 # [1] "unknown"
30 29
 # download the file
31
-download.file(url = my_url, destfile = new_version$path)
30
+download.file(url = bioc_url, destfile = new_version$path)
32 31
 # report to the cache database that the download is ready
33 32
 omnipath_cache_download_ready(new_version)
34 33
 # now the status is ready:
35
-version <- omnipath_cache_latest_or_new(url = my_url)
34
+version <- omnipath_cache_latest_or_new(url = bioc_url)
36 35
 version$status
37 36
 # "ready"
38 37
 version$dl_finished
39 38
 # [1] "2021-03-09 16:48:38 CET"
40
-}
39
+omnipath_cache_remove(url = bioc_url) # cleaning up
41 40
 
42 41
 }
Browse code

docs: added all missing return values

Türei Dénes authored on 10/03/2021 18:45:04
Showing1 changed files
... ...
@@ -12,6 +12,10 @@ item will be created}
12 12
 
13 13
 \item{key}{Key of the cache item}
14 14
 }
15
+\value{
16
+Character: invisibly returns the version number of the cache
17
+    version item.
18
+}
15 19
 \description{
16 20
 Sets the download status to ready for a cache item
17 21
 }
Browse code

added new man pages

Türei Dénes authored on 10/03/2021 14:32:26
Showing1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,38 @@
1
+% Generated by roxygen2: do not edit by hand
2
+% Please edit documentation in R/cache.R
3
+\name{omnipath_cache_download_ready}
4
+\alias{omnipath_cache_download_ready}
5
+\title{Sets the download status to ready for a cache item}
6
+\usage{
7
+omnipath_cache_download_ready(version, key = NULL)
8
+}
9
+\arguments{
10
+\item{version}{Version of the cache item. If does not exist a new version
11
+item will be created}
12
+
13
+\item{key}{Key of the cache item}
14
+}
15
+\description{
16
+Sets the download status to ready for a cache item
17
+}
18
+\examples{
19
+\donttest{
20
+my_url <- 'https://bioconductor.org/'
21
+# request a new version item (or retrieve the latest)
22
+new_version <- omnipath_cache_latest_or_new(url = my_url)
23
+# check if the version item is not a finished download
24
+new_version$status
25
+# [1] "unknown"
26
+# download the file
27
+download.file(url = my_url, destfile = new_version$path)
28
+# report to the cache database that the download is ready
29
+omnipath_cache_download_ready(new_version)
30
+# now the status is ready:
31
+version <- omnipath_cache_latest_or_new(url = my_url)
32
+version$status
33
+# "ready"
34
+version$dl_finished
35
+# [1] "2021-03-09 16:48:38 CET"
36
+}
37
+
38
+}