Coder Social home page Coder Social logo

wlandau / targetsketch Goto Github PK

View Code? Open in Web Editor NEW
17.0 3.0 3.0 65 KB

Sketch a pipeline of targets in an interactive web app

Home Page: https://wlandau.shinyapps.io/targetsketch

License: Other

R 98.21% Makefile 1.79%
reproducibility high-performance-computing r shiny data-science pipeline rstats workflow targets

targetsketch's Introduction

targetsketch

This R/Shiny app is a companion to the targets R package. It helps new users learn targets, and it helps new and experienced users set up new targets-powered projects. Simply provide a _targets.R script, and targetsketch will show you the end-to-end dependency graph of your workflow, a manifest of the pipeline, and produce a downloadable _targets.R script to get your project started.

Access

This app is available online at https://wlandau.shinyapps.io/targetsketch. If you cannot access it, you can install it locally in an R session.

install.packages("remotes")
remotes::install_github("wlandau/targetsketch")

Then run it on your own machine.

targetsketch::targetsketch()

Usage

  1. Navigate to the Pipeline view (left sidebar).
  2. Write your _targets.R script in the _targets.R box. The code must return a valid list of tar_target() objects at the end. If you want the app to analyze custom functions called in the commands of the targets, define them in the _targets.R box as well. See the tar_script() help file for more details.
  3. Click Update button in the Control box.
  4. If you want to download the code in the _targets.R box as an R script file, click the Download button in the Control box.

Contributing

Contributions are welcome. If you plan to file an issue or submit a pull request, please first read the code of conduct and rules for contributing.

targetsketch's People

Contributors

ekt-dar avatar parmsam avatar wlandau avatar wlandau-lilly avatar

Stargazers

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

Watchers

 avatar  avatar  avatar

targetsketch's Issues

Create shiny modules from app components

Prework

  • I understand and agree to targetsketch' code of conduct.
  • I understand and agree to targetsketch' contributing guidelines.
  • New features take time and effort to create, and they take even more effort to maintain. So if the purpose of the feature is to resolve a struggle you are encountering personally, please consider first posting a "trouble" or "other" issue so we can discuss your use case and search for existing solutions first.

Proposal

Please describe the new feature. If applicable, write a minimal example in R code or pseudo-code to show input, usage, and desired output.

To help us read any code you include (optional) please try to follow the tidyverse style guide. The style_text() and style_file() functions from the styler package make it easier.

Add button to copy _targets.R script

Prework

  • I understand and agree to targetsketch' code of conduct.
  • I understand and agree to targetsketch' contributing guidelines.
  • New features take time and effort to create, and they take even more effort to maintain. So if the purpose of the feature is to resolve a struggle you are encountering personally, please consider first posting a "trouble" or "other" issue so we can discuss your use case and search for existing solutions first.

Proposal

Please describe the new feature. If applicable, write a minimal example in R code or pseudo-code to show input, usage, and desired output. To help us read any code you include (optional) please try to follow the tidyverse style guide. The style_text() and style_file() functions from the styler package make it easier.

Add button to Control card to copy code from _targets.R card. Copy using rclipboard or custom js function.

Consider adding tests using shinytest2

Prework

  • I understand and agree to targetsketch' code of conduct.
  • I understand and agree to targetsketch' contributing guidelines.
  • New features take time and effort to create, and they take even more effort to maintain. So if the purpose of the feature is to resolve a struggle you are encountering personally, please consider first posting a "trouble" or "other" issue so we can discuss your use case and search for existing solutions first.

Proposal

Please describe the new feature. If applicable, write a minimal example in R code or pseudo-code to show input, usage, and desired output. To help us read any code you include (optional) please try to follow the tidyverse style guide. The style_text() and style_file() functions from the styler package make it easier.

Testing using {shinytest2} would be useful to ensure shiny app works as expected.

Add button to insert code in RStudio script

Prework

  • I understand and agree to targetsketch' code of conduct.
  • I understand and agree to targetsketch' contributing guidelines.
  • New features take time and effort to create, and they take even more effort to maintain. So if the purpose of the feature is to resolve a struggle you are encountering personally, please consider first posting a "trouble" or "other" issue so we can discuss your use case and search for existing solutions first.

Proposal

Please describe the new feature. If applicable, write a minimal example in R code or pseudo-code to show input, usage, and desired output. To help us read any code you include (optional) please try to follow the tidyverse style guide. The style_text() and style_file() functions from the styler package make it easier.

Similar to esquisse, add insert code in script link or button.

Highlight graph target on manifest row selection

Prework

  • I understand and agree to targetsketch' code of conduct.
  • I understand and agree to targetsketch' contributing guidelines.
  • New features take time and effort to create, and they take even more effort to maintain. So if the purpose of the feature is to resolve a struggle you are encountering personally, please consider first posting a "trouble" or "other" issue so we can discuss your use case and search for existing solutions first.

Proposal

Please describe the new feature. If applicable, write a minimal example in R code or pseudo-code to show input, usage, and desired output. To help us read any code you include (optional) please try to follow the tidyverse style guide. The style_text() and style_file() functions from the styler package make it easier.

Consider changing color for the target in the Graph card when a row is selected within the Manifest card dataTable. This would make it easy to quickly see the target position in the dependency graph. The feature could be toggled on and off via a checkbox, if needed. I can work on this if that's okay.

Add argument into targetsketch() for ref script

Prework

  • I understand and agree to targetsketch' code of conduct.
  • I understand and agree to targetsketch' contributing guidelines.
  • New features take time and effort to create, and they take even more effort to maintain. So if the purpose of the feature is to resolve a struggle you are encountering personally, please consider first posting a "trouble" or "other" issue so we can discuss your use case and search for existing solutions first.

Proposal

Please describe the new feature. If applicable, write a minimal example in R code or pseudo-code to show input, usage, and desired output. To help us read any code you include (optional) please try to follow the tidyverse style guide. The style_text() and style_file() functions from the styler package make it easier.

Add an argument into targetsketch::targetsketch() where we can declare the reference _targets.R path to load.

Add button in control bs4Card to add a new target into _targets.R bs4Card

Prework

  • I understand and agree to targetsketch' code of conduct.
  • I understand and agree to targetsketch' contributing guidelines.
  • New features take time and effort to create, and they take even more effort to maintain. So if the purpose of the feature is to resolve a struggle you are encountering personally, please consider first posting a "trouble" or "other" issue so we can discuss your use case and search for existing solutions first.

Proposal

Please describe the new feature. If applicable, write a minimal example in R code or pseudo-code to show input, usage, and desired output. To help us read any code you include (optional) please try to follow the tidyverse style guide. The style_text() and style_file() functions from the styler package make it easier.

Thanks for the package! Button in control card could open modal window where user can fill in new target info to add after the last target in _targets.R. User could select what arguments besides the required name and command they need. Tooltip could be display on mouse hover over argument. This would be helpful to orient new {targets} users to the available arguments for tar_target(). This package is a great learning tool for targets, similar to what {esquisse} provides for {ggplot2}. I can work on this if that's okay.

Consider submitting package to rOpenSci or CRAN

Prework

  • I understand and agree to targetsketch' code of conduct.
  • I understand and agree to targetsketch' contributing guidelines.
  • Be considerate of the maintainer's time and make it as easy as possible to troubleshoot any problems you identify. Read here and here to learn about minimal reproducible examples. Format your code according to the tidyverse style guide to make it easier for others to read.

Description

Please describe the issue.

To help us read any code you include (optional) please try to follow the tidyverse style guide. The style_text() and style_file() functions from the styler package make it easier.

Similar to other targets packages.

Reproducible example

Be considerate of the maintainer's time and make it as easy as possible to troubleshoot any problems you identify. Read here and here to learn about minimal reproducible examples. Format your code according to the tidyverse style guide to make it easier for others to read.

Consider adding RStudio Addin

Prework

  • I understand and agree to targetsketch' code of conduct.
  • I understand and agree to targetsketch' contributing guidelines.
  • New features take time and effort to create, and they take even more effort to maintain. So if the purpose of the feature is to resolve a struggle you are encountering personally, please consider first posting a "trouble" or "other" issue so we can discuss your use case and search for existing solutions first.

Proposal

Please describe the new feature. If applicable, write a minimal example in R code or pseudo-code to show input, usage, and desired output. To help us read any code you include (optional) please try to follow the tidyverse style guide. The style_text() and style_file() functions from the styler package make it easier.

Addins are accessible from the RStudio command palette (Ctrl/Cmd + Shift + P). It would prob be useful for this package. Here is the possible registration metadata for the addin. I can do a PR if that's okay.
inst/rstudio/addins.dcf

Name: targets builder
Description: R/Shiny app companion to targets R package.
Binding: targetsketch
Interactive: true

Hex logo

Prework

  • I understand and agree to targetsketch' code of conduct.
  • I understand and agree to targetsketch' contributing guidelines.
  • New features take time and effort to create, and they take even more effort to maintain. So if the purpose of the feature is to resolve a struggle you are encountering personally, please consider first posting a "trouble" or "other" issue so we can discuss your use case and search for existing solutions first.

Proposal

Please describe the new feature. If applicable, write a minimal example in R code or pseudo-code to show input, usage, and desired output. To help us read any code you include (optional) please try to follow the tidyverse style guide. The style_text() and style_file() functions from the styler package make it easier.

Add hex logo. Would be best to remain consistent with styling of other hex logos in targetopia.

Dark mode text colors hard to distinguish

Prework

  • I understand and agree to targetsketch' code of conduct.
  • I understand and agree to targetsketch' contributing guidelines.
  • I am reasonably sure this is a genuine bug in targetsketch and most likely not a user error. (If you run into an error and do not know the cause, please submit a "Trouble" issue instead.)
  • Be considerate of the maintainer's time and make it as easy as possible to troubleshoot any problems you identify. Read here and here to learn about minimal reproducible examples. Format your code according to the tidyverse style guide to make it easier for others to read.

Description

Please describe the bug.

Love the light mode look. On dark mode button click, text color changes to white on white for _targets.R card, black on black for Graph card, and black on black for Manifest card dataTable column names or search labels.

Reproducible example

Be considerate of the maintainer's time and make it as easy as possible to troubleshoot any problems you identify. Read here and here to learn about minimal reproducible examples. Format your code according to the tidyverse style guide to make it easier for others to read.

Expected result

What should have happened? Please be as specific as possible.

Text color should update to more easily read elements. Usually white text color on black background in dark mode.

Is the use of `tar_options` in the example _targets.R file intentional?

The example pipeline presented to the user when the app is launched doesn't run, and requires the user to change
tar_options into tar_option_set, I believe. Perhaps that's intentional, e.g. to demonstrate how the app helps identify problems? Or perhaps it is an outdated reference to previous behavior changed in targets in July?

If it's not intentional, perhaps it's worth changing tar_options to tar_option_set?

tar_options(packages = c("biglm", "rmarkdown", "tidyverse"))

Thanks a lot for making the targets set of packages available, incredibly useful!

Enhance app to save and load _targets.R script

Prework

  • I understand and agree to targetsketch' code of conduct.
  • I understand and agree to targetsketch' contributing guidelines.
  • New features take time and effort to create, and they take even more effort to maintain. So if the purpose of the feature is to resolve a struggle you are encountering personally, please consider first posting a "trouble" or "other" issue so we can discuss your use case and search for existing solutions first.

Proposal

Please describe the new feature. If applicable, write a minimal example in R code or pseudo-code to show input, usage, and desired output. To help us read any code you include (optional) please try to follow the tidyverse style guide. The style_text() and style_file() functions from the styler package make it easier.

As discussed in #22, add functionality for loading/saving/running the app from an existing _targets.R script.

Add button to reset graph card view to default view

Prework

  • I understand and agree to targetsketch' code of conduct.
  • I understand and agree to targetsketch' contributing guidelines.
  • New features take time and effort to create, and they take even more effort to maintain. So if the purpose of the feature is to resolve a struggle you are encountering personally, please consider first posting a "trouble" or "other" issue so we can discuss your use case and search for existing solutions first.

Proposal

Please describe the new feature. If applicable, write a minimal example in R code or pseudo-code to show input, usage, and desired output. To help us read any code you include (optional) please try to follow the tidyverse style guide. The style_text() and style_file() functions from the styler package make it easier.

Enhancement for user who may have inadvertently zoomed in or moved the dependency graph. Reset Graph View button in Control card or Graph card would update visnetwork back to version prior to zoom or mouse drag actions. I can work on this if that's okay.

Error on shinyapps.io start

Prework

  • I understand and agree to targetsketch' code of conduct.
  • I understand and agree to targetsketch' contributing guidelines.
  • Be considerate of the maintainer's time and make it as easy as possible to troubleshoot any problems you identify. Read here and here to learn about minimal reproducible examples. Format your code according to the tidyverse style guide to make it easier for others to read.

Description

Please describe the issue.

To help us read any code you include (optional) please try to follow the tidyverse style guide. The style_text() and style_file() functions from the styler package make it easier.

Looks like there's an error on the shinyapps.io app start: https://wlandau.shinyapps.io/targetsketch/

Reproducible example

Be considerate of the maintainer's time and make it as easy as possible to troubleshoot any problems you identify. Read here and here to learn about minimal reproducible examples. Format your code according to the tidyverse style guide to make it easier for others to read.

An error has occurred
The application failed to start.

exit status 1

Error in tagAssert(icon, type = "i") when trying to start targetsketch on a fresh install

Description

Just installed targetsketch on windows, using
> remotes::install_github("wlandau/targetsketch", INSTALL_opts="--no-multiarch")
I updated all the packages to the suggested version. When I try to run targetsketch(), I get the following error:

> targetsketch::targetsketch()
[1] "project-diagram"
Error in tagAssert(icon, type = "i") :
  Expected an object with class 'shiny.tag'.

Reproducible example

`> remotes::install_github("wlandau/targetsketch", INSTALL_opts="--no-multiarch")

Expected result

targetsketch should run!

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.