- Added a
build
argument tomake_*
family to allow a Pipeline to be built without being executed. Once the pipeline has been fully 'registered' it can be built via
p <- get_pipeline()
p$build()
- Added a
touch()
method toPipeline
which updates the file modification times of all targets to the current time. This is useful when you know your targets are all up-to-date but makepipe doesn't, for example after a negligible change was made to your source code. The newbuild
argument described above comes in handy here: settingbuild=FALSE
you can construct the make 'graph' without executing it, then call
p <- get_pipeline()
p$touch()
This will update the times for all the targets in the pipeline so that when you call p$build()
nothing will happen (unless one of your targets is set to force=TRUE
).
- Upgraded the internal
webshot
dependency towebshot2
, which doesn't depend on the unmaintainedPhantomJS
.
- You can now specify the targets and dependencies (and so on) for each source script in your pipeline within that script using roxygen tags like this,
#'@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"
)
- You can now produce a plain text summary of your pipeline using
show_pipeline(as = "text")
. You can also save this using, e.g.,save_pipeline(file = "pipeline.md", as = "text")
.
-
BREAKING CHANGE: Deprecated
Pipeline$save()
and changed the arguments forsave_pipeline()
,show_pipeline()
, andPipeline$annotate()
. This change was made to support the next change which is: -
Added support for
nomnoml
flowcharts:- By default,
show_pipeline()
will now display anomnoml
style flowchart. You can reproduce the oldvisNetwork
style chart usingshow_pipeline(as="visnetwork")
. These are powered by two new methods belonging to thePipeline
class:$nomnoml()
and$visnetwork()
. - By default,
save_pipeline()
will now save an image of thenomnoml
chart. You can export thevisNetwork
chart as an html file usingsave_pipeline(as="visnetwork")
. These are powered by two new methods belonging to thePipeline
class, which replace the deprecated$save()
method:$save_nomnoml()
and$save_visnetwork()
.
- By default,
-
Added
note
andlabel
arguments tomake_*()
. This allows makepipe code to be even more self documenting, since notes that might be left as comments above themake_*()
segment can now be incorporated into the pipeline itself. -
make_with_*()
no longer throws an error ifdependencies
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 -
Added
reset_pipeline()
, a wrapper forset_pipeline(Pipeline$new())
, for resetting the active pipeline
-
Made
dependencies
argument tomake_*()
optional (#25). -
Added a
force
argument tomake_*()
(#26). This allows the user to override the default conditional execution logic to ensure that a given segment of the pipeline is run no matter what.
- Implemented
Segment
class to serve as the basic building block for thePipeline
(#28). This clarifies the link between the fundamentalmake_*()
functions and thePipeline
object. In particular, eachmake_*()
call constructs aSegment
which is appended to thePipeline
.
- The
Segment
class has anexecute()
method, which replicates the execution behaviour of themake_*()
functions. HenceSegment$execute()
can be run to rebuild the targets associated with a given segment without adding a new segment to thePipeline
as would be done if we calledmake_*()
again. - The
Segment
holds all execution metadata (e.g. execution result, executiontime, etc.). This is updated via theSegment$update_result()
method wheneverSegment$execute()
is called.
-
Added a
build()
method to thePipeline
class, which sorts theSegment
s topologically and then callsexecute()
on each in turn. -
Added a
clean()
method to thePipeline
class, which deletes thetargets
associated with eachSegment
. -
Removed the now redundant
makepipe_result
S3 class. All of the information that was held by themakepipe_result
is now held by theSegment
.
-
Fixed a minor bug in
Pipeline$print()
which was causing user-supplied annotations to be overwritten (#23). -
Fixed a minor bug in
make_register()
(#22). Previously, an error would be thrown when usingmake_register()
outside of amakepipe
segment if the user setquiet=TRUE
. This is no longer the case.
- Added a getting started vignette (#19).
- Fixed minor bug having to do with the propagation of out-of-dateness in Pipeline visualizations.
-
Renamed package from
piper
tomakepipe
(#11). -
Both
make_with_recipe()
andmake_with_source()
now return an object of classmakepipe_result
(#2, #14). Along with metadata relating to the execution, this object contains aresult
element which:- If using
make_with_recipe()
, is identical with whatever therecipe
returns - If using
make_with_source()
, is a list containing any objects registered in the source script usingmake_register()
- If using
-
The execution environment for
make_*()
is now, by default, a fresh environment whose parent is the calling environment. This can be overridden using theenvir
argument.
-
Added arguments to
save_pipeline()
andshow_pipeline()
, allowing the user to specify e.g. height and width of output widgets. -
Added
packages
argument tomake_*()
functions, allowing the user to easily add packages as dependencies of their targets. If any of thepackages
specified have been updated since thetargets
were last produced, thetargets
will be registered as out-of-date whenmake_*()
is run.
- Pipeline visualisations are now sorted hierarchically, from left to right across the screen.
- Fixed bug in pipeline invalidation (#4).
- Added a
NEWS.md
file to track changes to the package.
- Initial release.