Thanks to visit codestin.com
Credit goes to github.com

Skip to content

tar_config_get does not return the store used in tar_make(store = ) #714

@MilesMcBain

Description

@MilesMcBain

Prework

  • Read and agree to the code of conduct and contributing guidelines.
  • Confirm that your issue is a genuine bug in the targets package itself and not a user error, known limitation, or issue from another package that targets depends on. For example, if you get errors running tar_make_clustermq(), try isolating the problem in a reproducible example that runs clustermq and not targets. And for miscellaneous troubleshooting, please post to discussions instead of issues.
  • If there is already a relevant issue, whether open or closed, comment on the existing thread instead of posting a new issue.
  • Using targets::tar_reprex(), reprex::reprex(), or similar, post a minimal reproducible example like this one so the maintainer can troubleshoot the problems you identify. A reproducible example is:
    • Runnable: post enough R code and data so any onlooker can create the error on their own computer.
    • Minimal: reduce runtime wherever possible and remove complicated details that are irrelevant to the issue at hand.
    • Readable: format your code according to the tidyverse style guide.

Description

tar_config_get("store") does not inherit the store used in tar_make(store = ).

Reproducible example

  • Using targets::tar_reprex(), reprex::reprex(), or similar, post a minimal reproducible example so the maintainer can troubleshoot the problems you identify. A reproducible example is:
    • Runnable: post enough R code and data so any onlooker can create the error on their own computer.
    • Minimal: reduce runtime wherever possible and remove complicated details that are irrelevant to the issue at hand.
    • Readable: format your code according to the tidyverse style guide.
library(targets)
tar_script({
    list(tar_target(the_store, tar_config_get("store")))
})
tar_make(store = "my_store")
#> • start target the_store
#> • built target the_store
#> • end pipeline
tar_read(the_store, store = "my_store")
#> [1] "_targets"

Created on 2021-12-01 by the reprex package (v2.0.1)

Expected result

"my_store". It would enable target factories to know where their store is, if the user has not set TAR_PROJECT.

Diagnostic information

  • A reproducible example.
  • Session info, available through sessionInfo() or reprex(si = TRUE).
  • A stack trace from traceback() or rlang::trace_back().
  • The SHA-1 hash of the GitHub commit of targets currently installed. packageDescription("targets")$GithubSHA1 shows you this.
sessioninfo::session_info()
─ Session info  ────────────────────────────────────────────────────────────────────────────────
 hash: kiss: man, man, flag: Greece, woman pilot: medium-dark skin tone

 setting  value
 version  R version 4.1.2 (2021-11-01)
 os       Ubuntu 20.04.3 LTS
 system   x86_64, linux-gnu
 ui       X11
 language (EN)
 collate  C.UTF-8
 ctype    C.UTF-8
 tz       Etc/UTC
 date     2021-12-01
 pandoc   2.5 @ /usr/bin/ (via rmarkdown)

─ Packages ─────────────────────────────────────────────────────────────────────────────────────
 package     * version    date (UTC) lib source
 assertthat    0.2.1      2019-03-21 [1] RSPM (R 4.1.0)
 backports     1.2.1      2020-12-09 [1] RSPM (R 4.1.0)
 callr         3.7.0      2021-04-20 [1] RSPM (R 4.1.0)
 cli           3.1.0      2021-10-27 [1] CRAN (R 4.1.2)
 clipr         0.7.1      2020-10-08 [1] RSPM (R 4.1.0)
 codetools     0.2-18     2020-11-04 [4] CRAN (R 4.0.3)
 crayon        1.4.2      2021-10-29 [1] CRAN (R 4.1.2)
 data.table    1.14.2     2021-09-27 [1] CRAN (R 4.1.2)
 digest        0.6.28     2021-09-23 [1] CRAN (R 4.1.2)
 ellipsis      0.3.2      2021-04-29 [1] RSPM (R 4.1.0)
 evaluate      0.14       2019-05-28 [1] RSPM (R 4.1.0)
 fansi         0.5.0      2021-05-25 [1] RSPM (R 4.1.0)
 fastmap       1.1.0      2021-01-25 [1] RSPM (R 4.1.0)
 filelock      1.0.2      2018-10-05 [1] RSPM (R 4.1.0)
 fs            1.5.0      2020-07-31 [1] RSPM (R 4.1.0)
 glue          1.5.0      2021-11-07 [1] RSPM (R 4.1.2)
 highr         0.9        2021-04-16 [1] RSPM (R 4.1.0)
 htmltools     0.5.2      2021-08-25 [1] CRAN (R 4.1.2)
 igraph        1.2.6      2020-10-06 [1] RSPM (R 4.1.0)
 jsonlite      1.7.2      2020-12-09 [1] RSPM (R 4.1.0)
 keyring       1.2.0      2021-04-28 [1] RSPM (R 4.1.2)
 knitr         1.36       2021-09-29 [1] RSPM (R 4.1.2)
 lifecycle     1.0.1      2021-09-24 [1] CRAN (R 4.1.2)
 magrittr      2.0.1      2020-11-17 [1] RSPM (R 4.1.0)
 paint         0.1.1.9000 2021-08-12 [1] Github (milesmcbain/paint@163e333)
 pillar        1.6.4      2021-10-18 [1] CRAN (R 4.1.2)
 pkgconfig     2.0.3      2019-09-22 [1] RSPM (R 4.1.0)
 processx      3.5.2      2021-04-30 [1] RSPM (R 4.1.0)
 prompt        1.0.1      2021-03-12 [1] RSPM (R 4.1.2)
 ps            1.6.0      2021-02-28 [1] RSPM (R 4.1.0)
 purrr         0.3.4      2020-04-17 [1] RSPM (R 4.1.0)
 R6            2.5.1      2021-08-19 [1] RSPM (R 4.1.0)
 rappdirs      0.3.3      2021-01-31 [1] RSPM (R 4.1.0)
 reprex        2.0.1      2021-08-05 [1] CRAN (R 4.1.2)
 rlang         0.4.12     2021-10-18 [1] RSPM (R 4.1.2)
 rmarkdown     2.11       2021-09-14 [1] CRAN (R 4.1.2)
 rstudioapi    0.13       2020-11-12 [1] RSPM (R 4.1.0)
 sessioninfo   1.2.1      2021-11-02 [1] RSPM (R 4.1.2)
 sodium        1.2.0      2021-10-21 [1] CRAN (R 4.1.2)
 styler        1.5.1      2021-07-13 [1] RSPM (R 4.1.0)
 targets     * 0.8.1.9000 2021-12-01 [1] Github (ropensci/targets@d1f7f23)
 tibble        3.1.6      2021-11-07 [1] CRAN (R 4.1.2)
 tidyselect    1.1.1      2021-04-30 [1] RSPM (R 4.1.0)
 utf8          1.2.2      2021-07-24 [1] RSPM (R 4.1.0)
 vctrs         0.3.8      2021-04-29 [1] RSPM (R 4.1.0)
 withr         2.4.2      2021-04-18 [1] RSPM (R 4.1.0)
 xfun          0.28       2021-11-04 [1] CRAN (R 4.1.2)
 yaml          2.2.1      2020-02-01 [1] RSPM (R 4.1.0)

 [1] /home/ubuntu/R/x86_64-pc-linux-gnu-library/4.1
 [2] /usr/local/lib/R/site-library
 [3] /usr/lib/R/site-library
 [4] /usr/lib/R/library

────────────────────────────────────────────────────────────────────────────────────────────────

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions