Coder Social home page Coder Social logo

datastorr's People

Contributors

aammd avatar richfitz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

datastorr's Issues

Private Organization repositories

filing this here because one cannot place issues on a fork.. it seems like there is a problem when fetching a private (but not a public) Organization repository. Perhaps something around this line or something similar in the github API functions.

Documentation field in datastorr.json

As datastorr doesn't necessarily generate a package anymore, it might be useful to have a way to point to documentation that might have been in the help file.

One approach is to put a doc: field in the JSON file. This could point to a file in the repo/release or a URL, which could be opened with browseURL(), invoked by a function like view_docs(repo).

Pretty-print datastorr:::autogenerate()?

I found it easier to use copy the output of datastorr:::autogenerate() when line-number printing is suppressed with cat. See https://github.com/jsta/datastorr/commit/011ab4bdf54f019fb04db2785781089dd2494fd2

Example

datastorr:::autogenerate(repo="richfitz/datastorr.example", read="readRDS", name="mydata")

without pretty-print cat()

[1] "##' Download the example data set from richfitz/datastorr.example"     
[2] "##'  (\\url{https://github.com/richfitz/datastorr.example/})"          
[3] "##' @title Download example data set"                                  
[4] "##'"                                                                   
[5] "##' @param version Version number.  The default will load the most"    

with pretty-print cat()

##' Download the example data set from richfitz/datastorr.example
##'  (\url{https://github.com/richfitz/datastorr.example/})
##' @title Download example data set
##'
##' @param version Version number.  The default will load the most

`datastorr::github_release_info` should default to obtaining `read` function from datastorr.json (?)

I'm trying to get my head around how the read function is specified. It seems like datastorr::github_release_info() wants to get the name of a currently available function before it will run successfully. datastorr.json can also serve as a place to store that information.

Should datastorr::github_release_info have a default argument, where the read function is just allowed to be whatever is specified in the datastorr.json file?

On the other hand, it seems dangerous for a function's behaviour to be modified by a change to a file on github! (i.e. if datastorr.json changes, then the output of datastorr::github_release_info changes too.). Perhaps it should supply a warning if the datastorr.json function is used?

Similarly, should datastorr::github_release_info check for the existence of a datastorr.json file?

pulling data from private repos

I am having trouble pulling data from private datastorr repos. My workflow is to:

The preceding steps run fine. I am able to create a new release in the private repo with the mydata.rds binary "attached".

This is where I start having trouble. Running datastorr.example::mydata("1.0.4") yields the following output:

Downloading: 93 kB
Error: key '1.0.4' ('objects') not found, with error: Downloading https://github.com/jsta/datastorr.example.private/releases/download/v1.0.4/mydata.rds failed with code 404

This is puzzling because datastorr is obviously not having trouble detecting my token and I verified that https://github.com/jsta/datastorr.example.private/releases/download/v1.0.4/mydata.rds exists (I can point my browser to it). I feel that something is off about the way datastorr is deciding whether or not to run token authentication. Unfortunately, I am having a tough time understanding/debugging the R6 objects in datastorr.

Cannot reproduce example

Hi!
I am trying to set up your package to manage data stored at GitHub
When running the example from package description, I received this error:

devtools::install_github("richfitz/datastorr")
devtools::install_github("richfitz/datastorr.example")

r$> datastorr.example::mydata_versions()
character(0)

r$> datastorr.example::mydata_versions(local=FALSE)
[1] "1.0.0" "1.0.1" "1.0.2"

r$> d <- datastorr.example::mydata()
Downloading Source.zip
Downloading: 6.7 kB     
Error in read_function(file) : unknown input format

It seems this is related to some temporary solution commented in-line here. I wonder if this has been resolved or you can provide insights in where this error is coming from?

Thanks you.
Please see the session info below

r$> sessionInfo()
R version 4.1.3 (2022-03-10)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: CentOS Linux 7 (Core)

Matrix products: default
BLAS:   /gsc/software/linux-x86_64-centos7/R-4.1.3/lib64/R/lib/libRblas.so
LAPACK: /gsc/software/linux-x86_64-centos7/R-4.1.3/lib64/R/lib/libRlapack.so

locale:
 [1] LC_CTYPE=en_CA.UTF-8       LC_NUMERIC=C              
 [3] LC_TIME=en_CA.UTF-8        LC_COLLATE=en_CA.UTF-8    
 [5] LC_MONETARY=en_CA.UTF-8    LC_MESSAGES=en_CA.UTF-8   
 [7] LC_PAPER=en_CA.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=en_CA.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

loaded via a namespace (and not attached):
 [1] digest_0.6.30           rappdirs_0.3.3          R6_2.5.1               
 [4] lifecycle_1.0.3         jsonlite_1.8.4          storr_1.2.5            
 [7] magrittr_2.0.3          httr_1.4.4              rlang_1.0.6            
[10] stringi_1.7.8           datastorr.example_1.0.2 cli_3.4.1              
[13] datastorr_0.0.4         curl_4.3.3              whisker_0.4.1          
[16] tools_4.1.3             stringr_1.5.0.9000      glue_1.6.2             
[19] compiler_4.1.3         

Autogenerated metadata help files

A nice-to-have, perhaps. It would be great if metadata and/or data descriptions could have auto-generated help files, so that ?my_data() would call these up in R-help. Of course, one can write help files, but in the spirit of not repeating oneself, it would be good to have a way to ingest metadata files and generate help files with these.

default for `github_release_versions` and `github_release_version_current` is `local = TRUE`

Feels a bit counter-intuitive to me that the default for github_release_versions and github_release_version_current is local = TRUE. I think this is partly a function naming issue. If the function were called release_versions it would be logical to pass in a location value which could be local, github, zenodo, whatever...

Just a note for whenever the next version happens.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.