From 9f3a5e14db8063154790f663554f595887cce30b Mon Sep 17 00:00:00 2001 From: Carl Boettiger Date: Sat, 18 Aug 2018 21:06:01 -0700 Subject: [PATCH] rebuild docs for migrated appveyor --- README.Rmd | 2 +- README.md | 33 ++++++++++------- codemeta.json | 2 +- docs/articles/arkdb.html | 74 +++++++++++++++++++-------------------- docs/index.html | 36 +++++++++---------- docs/reference/ark.html | 4 +-- docs/reference/unark.html | 6 ++-- 7 files changed, 83 insertions(+), 74 deletions(-) diff --git a/README.Rmd b/README.Rmd index 4df356e..58811ee 100644 --- a/README.Rmd +++ b/README.Rmd @@ -4,7 +4,7 @@ output: github_document [![Travis build status](https://travis-ci.org/ropensci/arkdb.svg?branch=master)](https://travis-ci.org/ropensci/arkdb) [![Coverage status](https://codecov.io/gh/ropensci/arkdb/branch/master/graph/badge.svg)](https://codecov.io/github/ropensci/arkdb?branch=master) -[![AppVeyor Build Status](https://ci.appveyor.com/api/projects/status/github/cboettig/arkdb?branch=master&svg=true)](https://ci.appveyor.com/project/cboettig/arkdb) +[![Build status](https://ci.appveyor.com/api/projects/status/28rxw294yfktiebj?svg=true)](https://ci.appveyor.com/project/cboettig/arkdb) [![CRAN_Status_Badge](http://www.r-pkg.org/badges/version/arkdb)](https://cran.r-project.org/package=arkdb) [![](https://badges.ropensci.org/224_status.svg)](https://github.com/ropensci/onboarding/issues/224) [![lifecycle](https://img.shields.io/badge/lifecycle-stable-brightgreen.svg)](https://www.tidyverse.org/lifecycle/#stable) diff --git a/README.md b/README.md index 563706d..85d7814 100644 --- a/README.md +++ b/README.md @@ -3,8 +3,8 @@ status](https://travis-ci.org/ropensci/arkdb.svg?branch=master)](https://travis-ci.org/ropensci/arkdb) [![Coverage status](https://codecov.io/gh/ropensci/arkdb/branch/master/graph/badge.svg)](https://codecov.io/github/ropensci/arkdb?branch=master) -[![AppVeyor Build -Status](https://ci.appveyor.com/api/projects/status/github/cboettig/arkdb?branch=master&svg=true)](https://ci.appveyor.com/project/cboettig/arkdb) +[![Build +status](https://ci.appveyor.com/api/projects/status/28rxw294yfktiebj?svg=true)](https://ci.appveyor.com/project/cboettig/arkdb) [![CRAN\_Status\_Badge](http://www.r-pkg.org/badges/version/arkdb)](https://cran.r-project.org/package=arkdb) [![](https://badges.ropensci.org/224_status.svg)](https://github.com/ropensci/onboarding/issues/224) [![lifecycle](https://img.shields.io/badge/lifecycle-stable-brightgreen.svg)](https://www.tidyverse.org/lifecycle/#stable) @@ -57,7 +57,7 @@ Consider the `nycflights` database in SQLite: ``` r tmp <- tempdir() # Or can be your working directory, "." db <- dbplyr::nycflights13_sqlite(tmp) -#> Caching nycflights db at /var/folders/y8/0wn724zs10jd79_srhxvy49r0000gn/T//RtmpVwTFWx/nycflights13.sqlite +#> Caching nycflights db at /var/folders/y8/0wn724zs10jd79_srhxvy49r0000gn/T//RtmpjCDDVg/nycflights13.sqlite #> Creating table: airlines #> Creating table: airports #> Creating table: flights @@ -71,15 +71,15 @@ Create an archive of the database: dir <- fs::dir_create(fs::path(tmp, "nycflights")) ark(db, dir, lines = 50000) #> Exporting airlines in 50000 line chunks: -#> ...Done! (in 0.01225209 secs) +#> ...Done! (in 0.009561777 secs) #> Exporting airports in 50000 line chunks: -#> ...Done! (in 0.04213691 secs) +#> ...Done! (in 0.035254 secs) #> Exporting flights in 50000 line chunks: -#> ...Done! (in 20.41833 secs) +#> ...Done! (in 15.58381 secs) #> Exporting planes in 50000 line chunks: -#> ...Done! (in 0.05648994 secs) +#> ...Done! (in 0.04551506 secs) #> Exporting weather in 50000 line chunks: -#> ...Done! (in 1.349895 secs) +#> ...Done! (in 1.018439 secs) ``` ## Unarchive @@ -88,15 +88,24 @@ Import a list of compressed tabular files (i.e. `*.csv.bz2`) into a local SQLite database: ``` r -files <- fs::dir_ls(dir, glob = "*.csv.bz2") +files <- fs::dir_ls(dir) new_db <- src_sqlite(fs::path(tmp, "local.sqlite"), create=TRUE) unark(files, new_db, lines = 50000) -#> Warning in assert_files_exist(files): no file specified +#> Importing /var/folders/y8/0wn724zs10jd79_srhxvy49r0000gn/T/RtmpjCDDVg/nycflights/airlines.tsv.bz2 in 50000 line chunks: +#> ...Done! (in 0.03247809 secs) +#> Importing /var/folders/y8/0wn724zs10jd79_srhxvy49r0000gn/T/RtmpjCDDVg/nycflights/airports.tsv.bz2 in 50000 line chunks: +#> ...Done! (in 0.04669309 secs) +#> Importing /var/folders/y8/0wn724zs10jd79_srhxvy49r0000gn/T/RtmpjCDDVg/nycflights/flights.tsv.bz2 in 50000 line chunks: +#> ...Done! (in 11.08787 secs) +#> Importing /var/folders/y8/0wn724zs10jd79_srhxvy49r0000gn/T/RtmpjCDDVg/nycflights/planes.tsv.bz2 in 50000 line chunks: +#> ...Done! (in 0.05716991 secs) +#> Importing /var/folders/y8/0wn724zs10jd79_srhxvy49r0000gn/T/RtmpjCDDVg/nycflights/weather.tsv.bz2 in 50000 line chunks: +#> ...Done! (in 0.607512 secs) new_db -#> src: sqlite 3.22.0 [/var/folders/y8/0wn724zs10jd79_srhxvy49r0000gn/T/RtmpVwTFWx/local.sqlite] -#> tbls: +#> src: sqlite 3.22.0 [/var/folders/y8/0wn724zs10jd79_srhxvy49r0000gn/T/RtmpjCDDVg/local.sqlite] +#> tbls: airlines, airports, flights, planes, weather ``` ----- diff --git a/codemeta.json b/codemeta.json index f27aa69..f516b5b 100644 --- a/codemeta.json +++ b/codemeta.json @@ -237,7 +237,7 @@ ], "releaseNotes": "https://github.com/ropensci/arkdb/blob/master/NEWS.md", "readme": "https://github.com/ropensci/arkdb/blob/master/README.md", - "fileSize": "16.354KB", + "fileSize": "16.474KB", "contIntegration": [ "https://travis-ci.org/cboettig/arkdb", "https://codecov.io/github/cboettig/arkdb?branch=master", diff --git a/docs/articles/arkdb.html b/docs/articles/arkdb.html index 0ec3157..50704af 100644 --- a/docs/articles/arkdb.html +++ b/docs/articles/arkdb.html @@ -116,7 +116,7 @@

First, we’ll need an example database to work with. Conveniently, there is a nice example using the NYC flights data built into the dbplyr package.

We can take a look and confirm the files have been written. Note that we can use fs::dir_info to get a nice snapshot of the file sizes. Compare the compressed sizes to the original database:

fs::dir_info(dir) %>% 
   select(path, size) %>%
@@ -160,21 +160,21 @@ 

new_db <- src_sqlite(fs::path(tmp, "local.sqlite"), create=TRUE)

As with ark, we can set the chunk size to control the memory footprint required:

+#> Importing /var/folders/y8/0wn724zs10jd79_srhxvy49r0000gn/T/Rtmp9mAXQ5/nycflights/airlines.tsv.bz2 in 50000 line chunks: +#> ...Done! (in 0.02786613 secs) +#> Importing /var/folders/y8/0wn724zs10jd79_srhxvy49r0000gn/T/Rtmp9mAXQ5/nycflights/airports.tsv.bz2 in 50000 line chunks: +#> ...Done! (in 0.03957009 secs) +#> Importing /var/folders/y8/0wn724zs10jd79_srhxvy49r0000gn/T/Rtmp9mAXQ5/nycflights/flights.tsv.bz2 in 50000 line chunks: +#> ...Done! (in 10.03488 secs) +#> Importing /var/folders/y8/0wn724zs10jd79_srhxvy49r0000gn/T/Rtmp9mAXQ5/nycflights/planes.tsv.bz2 in 50000 line chunks: +#> ...Done! (in 0.04859996 secs) +#> Importing /var/folders/y8/0wn724zs10jd79_srhxvy49r0000gn/T/Rtmp9mAXQ5/nycflights/weather.tsv.bz2 in 50000 line chunks: +#> ...Done! (in 0.416903 secs)

unark returns a dplyr database connection that we can use in the usual way:

+#> ...Done! (in 1.890622 secs) +#> Importing /var/folders/y8/0wn724zs10jd79_srhxvy49r0000gn/T/Rtmp9mAXQ5/nycflights/airlines.csv.bz2 in 50000 line chunks: +#> ...Done! (in 0.0143292 secs) +#> Importing /var/folders/y8/0wn724zs10jd79_srhxvy49r0000gn/T/Rtmp9mAXQ5/nycflights/airports.csv.bz2 in 50000 line chunks: +#> ...Done! (in 0.05400681 secs) +#> Importing /var/folders/y8/0wn724zs10jd79_srhxvy49r0000gn/T/Rtmp9mAXQ5/nycflights/flights.csv.bz2 in 50000 line chunks: +#> ...Done! (in 16.23808 secs) +#> Importing /var/folders/y8/0wn724zs10jd79_srhxvy49r0000gn/T/Rtmp9mAXQ5/nycflights/planes.csv.bz2 in 50000 line chunks: +#> ...Done! (in 0.109956 secs) +#> Importing /var/folders/y8/0wn724zs10jd79_srhxvy49r0000gn/T/Rtmp9mAXQ5/nycflights/weather.csv.bz2 in 50000 line chunks: +#> ...Done! (in 0.5302351 secs)

arkdb also provides the function streamable_table() to facilitate users creating their own streaming table interfaces. For instance, if you would prefer to use readr methods to read and write tsv files, we could construct the table as follows (streamable_readr_tsv() and streamable_readr_csv() are also shipped inside arkdb for convenience):

Note several constraints on this design. The write method must be able to take a generic R connection object (which will allow it to handle the compression methods used, if any), and the read method must be able to take a textConnection object. readr functions handle these cases out of the box, so the above method is easy to write. Also note that the write method must be able to append, i.e. it should use a header if append=TRUE, but omit when it is FALSE. See the built-in methods for more examples.

@@ -143,19 +143,19 @@

new_db <- src_sqlite(fs::path(tmp, "local.sqlite"), create=TRUE) unark(files, new_db, lines = 50000) -#> Importing /var/folders/y8/0wn724zs10jd79_srhxvy49r0000gn/T/RtmpnRir33/nycflights/airlines.tsv.bz2 in 50000 line chunks: -#> ...Done! (in 0.01171088 secs) -#> Importing /var/folders/y8/0wn724zs10jd79_srhxvy49r0000gn/T/RtmpnRir33/nycflights/airports.tsv.bz2 in 50000 line chunks: -#> ...Done! (in 0.03774214 secs) -#> Importing /var/folders/y8/0wn724zs10jd79_srhxvy49r0000gn/T/RtmpnRir33/nycflights/flights.tsv.bz2 in 50000 line chunks: -#> ...Done! (in 8.305123 secs) -#> Importing /var/folders/y8/0wn724zs10jd79_srhxvy49r0000gn/T/RtmpnRir33/nycflights/planes.tsv.bz2 in 50000 line chunks: -#> ...Done! (in 0.04715109 secs) -#> Importing /var/folders/y8/0wn724zs10jd79_srhxvy49r0000gn/T/RtmpnRir33/nycflights/weather.tsv.bz2 in 50000 line chunks: -#> ...Done! (in 0.520313 secs) +#> Importing /var/folders/y8/0wn724zs10jd79_srhxvy49r0000gn/T/RtmpJKwt0k/nycflights/airlines.tsv.bz2 in 50000 line chunks: +#> ...Done! (in 0.01576591 secs) +#> Importing /var/folders/y8/0wn724zs10jd79_srhxvy49r0000gn/T/RtmpJKwt0k/nycflights/airports.tsv.bz2 in 50000 line chunks: +#> ...Done! (in 0.04689217 secs) +#> Importing /var/folders/y8/0wn724zs10jd79_srhxvy49r0000gn/T/RtmpJKwt0k/nycflights/flights.tsv.bz2 in 50000 line chunks: +#> ...Done! (in 10.02195 secs) +#> Importing /var/folders/y8/0wn724zs10jd79_srhxvy49r0000gn/T/RtmpJKwt0k/nycflights/planes.tsv.bz2 in 50000 line chunks: +#> ...Done! (in 0.04633403 secs) +#> Importing /var/folders/y8/0wn724zs10jd79_srhxvy49r0000gn/T/RtmpJKwt0k/nycflights/weather.tsv.bz2 in 50000 line chunks: +#> ...Done! (in 0.5779071 secs) new_db -#> src: sqlite 3.22.0 [/var/folders/y8/0wn724zs10jd79_srhxvy49r0000gn/T/RtmpnRir33/local.sqlite] +#> src: sqlite 3.22.0 [/var/folders/y8/0wn724zs10jd79_srhxvy49r0000gn/T/RtmpJKwt0k/local.sqlite] #> tbls: airlines, airports, flights, planes, weather


Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.

@@ -194,7 +194,7 @@

Dev status