Releases: kinto-b/makepipe
makepipe 0.2.2
- Added a
buildargument 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 toPipelinewhich 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 newbuildargument described above comes in handy here: settingbuild=FALSEyou 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
webshotdependency towebshot2, which doesn't depend on the unmaintainedPhantomJS.
makepipe 0.2.1
- 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
NULLThe 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").
makepipe 0.2.0
-
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
nomnomlflowcharts:- By default,
show_pipeline()will now display anomnomlstyle flowchart. You can reproduce the oldvisNetworkstyle chart usingshow_pipeline(as="visnetwork"). These are powered by two new methods belonging to thePipelineclass:$nomnoml()and$visnetwork(). - By default,
save_pipeline()will now save an image of thenomnomlchart. You can export thevisNetworkchart as an html file usingsave_pipeline(as="visnetwork"). These are powered by two new methods belonging to thePipelineclass, which replace the deprecated$save()method:$save_nomnoml()and$save_visnetwork().
- By default,
-
Added
noteandlabelarguments 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 ifdependenciesdon'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
makepipe 0.1.0
make_*()
-
Made
dependenciesargument tomake_*()optional (#25). -
Added a
forceargument 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.
Segment
- Implemented
Segmentclass to serve as the basic building block for the
Pipeline(#28). This clarifies the link between the fundamentalmake_*()
functions and thePipelineobject. In particular, eachmake_*()call
constructs aSegmentwhich is appended to thePipeline.
- The
Segmentclass 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 thePipelineas would be done if we calledmake_*()again. - The
Segmentholds all execution metadata (e.g. execution result, execution
time, etc.). This is updated via theSegment$update_result()method whenever
Segment$execute()is called.
-
Added a
build()method to thePipelineclass, which sorts theSegments
topologically and then callsexecute()on each in turn. -
Added a
clean()method to thePipelineclass, which deletes thetargets
associated with eachSegment. -
Removed the now redundant
makepipe_resultS3 class. All of the information
that was held by themakepipe_resultis now held by theSegment.
Bug fixes
-
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 amakepipesegment if the user set
quiet=TRUE. This is no longer the case.
Documentation
- Added a getting started vignette (#19).
makepipe 0.0.5
- Fixed minor bug having to do with the propagation of out-of-dateness in
Pipeline visualizations.
makepipe 0.0.4
- Renamed package from
pipertomakepipe(#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 aresultelement which:- If using
make_with_recipe(), is identical with whatever therecipereturns - 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 theenvirargument.
piper 0.0.3
-
Added arguments to
save_pipeline()andshow_pipeline(), allowing the user to specify e.g. height and width of output widgets. -
Added
packagesargument tomake_*()functions, allowing the user to easily add packages as dependencies of their targets. If any of thepackagesspecified have been updated since thetargetswere last produced, thetargetswill be registered as out-of-date whenmake_*()is run.
piper 0.0.2
- Pipeline visualisations are now sorted hierarchically, from left to right across the screen.
- Fixed bug in pipeline invalidation (#4).
- Added a
NEWS.mdfile to track changes to the package.
piper 0.0.1
Initial release