DOI-USGS / DOI-USGS/scipiper

merge list_all_targets, list_group_targets into list_targets

Open
#99 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
R
Stars
10
Forks
12
PR merge metrics
No merged PRs in 30d

Description

`list_group_targets` introduced here: https://github.com/USGS-R/scipiper/pull/86/files/b1052fb1a7e831ff0dd90f94cbd5ff02691e4f1c..ec34e09bbfa93cd6b48b5d720243d0c63b4b08b6.

It's currently necessary to distinguish between group and other targets because `scdel()` can't handle requests to delete group targets, which led to build problems with PR #86 (but this should be resolved eventually by #98). And it would probably sometimes be nice for a user to be able to get info on the targets and target types within their remake file[s]. So I like that we've added this function.

However, we already have `list_all_targets`, and `list_all_targets` provides functionality that `list_group_targets` does not (namely, option for recursiveness into `include`d .ymls), and the addition of `list_group_targets` makes me think it'd be nice if we had a new function, `list_targets`, that included the functionality of `list_all_targets` but also offered an option to select only targets of specific types (file, object, group, or a combination of those three).

Taking it a step further, this new `list_targets` could possibly even turn a remake file into a data.frame in general drake plan and with a column for target type? Depends on how hard and how advantageous that would be.

Contributor guide

Open the contributing guide

Research direction

Start by comparing the existing list_all_targets and list_group_targets functions, including list_all_targets' recursive handling of included .yml files, and review how scdel treats group targets. Define the supported target-type filters and recursive behavior for a unified list_targets function; the broader data.frame idea remains optional and needs a separate scope decision.

Written by the indexing model from the issue text.

Assessment

Tech stack
r
Domain
tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.