#'@title Load #'@description Clean raw survey data and do derivations #'@dependencies "data/raw.Rds", "lookup/concordance.csv" #'@targets "data/1 data.Rds" #'@makepipe NULL
The entire pipeline can then be executed in one fell-swoop with
make_with_dir(), simply by passing through the directory in which the scripts are located. Alternatively, you can construct your pipeline piece by piece using
make_with_roxy(). For example, using the tags above, you would have
# This: make_with_roxy("load.R") # Instead of this: make_with_source( "load.R", targets = "data/1 data.Rds", dependencies = c("data/raw.Rds", "lookup/concordance.csv"), label = "Load", note = "Clean raw survey data and do derivations" )
show_pipeline(as = "text"). You can also save this using, e.g.,
save_pipeline(file = "pipeline.md", as = "text").
Added support for
show_pipeline()will now display a
nomnomlstyle flowchart. You can reproduce the old
visNetworkstyle chart using
show_pipeline(as="visnetwork"). These are powered by two new methods belonging to the
save_pipeline()will now save an image of the
nomnomlchart. You can export the
visNetworkchart as an html file using
save_pipeline(as="visnetwork"). These are powered by two new methods belonging to the
Pipelineclass, which replace the deprecated
label arguments to
make_*(). This allows makepipe code to be even more self documenting, since notes that might be left as comments above the
make_*() segment can now be incorporated into the pipeline itself.
make_with_*() no longer throws an error if
dependencies don’t exist. It will be left to the users script/code to handle this situation.
Fixed a bug which prevented
make_with_recipe() from accepting long (>10 line) recipes
reset_pipeline(), a wrapper for
set_pipeline(Pipeline$new()), for resetting the active pipeline
Segment class to serve as the basic building block for the
Pipeline (#28). This clarifies the link between the fundamental
make_*() functions and the
Pipeline object. In particular, each
make_*() call constructs a
Segment which is appended to the
Segment class has an
execute() method, which replicates the execution behaviour of the
make_*() functions. Hence
Segment$execute() can be run to rebuild the targets associated with a given segment without adding a new segment to the
Pipeline as would be done if we called
Segment holds all execution metadata (e.g. execution result, executiontime, etc.). This is updated via the
Segment$update_result() method whenever
Segment$execute() is called.
build() method to the
Pipeline class, which sorts the
Segments topologically and then calls
execute() on each in turn.
clean() method to the
Pipeline class, which deletes the
targets associated with each
Removed the now redundant
makepipe_result S3 class. All of the information that was held by the
makepipe_result is now held by the
Fixed a minor bug in
Pipeline$print() which was causing user-supplied annotations to be overwritten (#23).
Renamed package from
The execution environment for
make_*() is now, by default, a fresh environment whose parent is the calling environment. This can be overridden using the
packages argument to
make_*() functions, allowing the user to easily add packages as dependencies of their targets. If any of the
packages specified have been updated since the
targets were last produced, the
targets will be registered as out-of-date when
make_*() is run.
NEWS.mdfile to track changes to the package.