parabar v1.1.0
What's Changed
- Add support for the
lapply
backend operation by @mihaiconstantin in #31 - Fix task decoration in
ProgressTrackingContext
by @mihaiconstantin in #33 - Miscellaneous refactoring by @mihaiconstantin in #34
- Add support for the
apply
backend operation by @mihaiconstantin in #36 - Miscellaneous style and documentation changes by @mihaiconstantin in #37
- Fix silent errors during task execution in
AsyncBackend
by @mihaiconstantin in #38 - Build: bump version to
1.1.0
by @mihaiconstantin in #39
Added
- Update implementations of
Service$apply
operation forBackend
classes to validate the providedmargin
argument before running the parallel operation. - Add helper
Helper$check_array_margins
to validate the margins provided to theService$apply
operation. - Add exception
Exception$array_margins_not_compatible
for using improper margins in theService$apply
operation. - Add exception
Exception$primitive_as_task_not_allowed
for trying to decorate primitive functions with progress tracking in theProgressTrackingContext
class. - Add helper
Helper$is_of_class
to check if an object is of a given class. - Add optional arguments to the
get_output
operation ofSyncBackend
for consistency. - Add more tests to improve coverage.
- Add implementation for
Service$lapply
andService$apply
operations for all classes that implement theService
interface. - Add
par_lapply
andpar_apply
functions to the userAPI
. These functions can be used to run tasks in parallel akin toparallel::parLapply
andparallel::parApply
, respectively. Closes #30. - Add
UserApiConsumer
R6
class that provides an opinionated wrapper around the developerAPI
of theparabar
package. All parallel operations (e.g.,par_sapply
andpar_lapply
) follow more or less the same pattern. TheUserApiConsumer
encapsulates this pattern and makes it easier to extendparabar
with new parallel functions (e.g.,par_apply
) while avoiding code duplication. TheUserApiConsumer
class can also be used as a standalone class for parallel operations, however, its primary purpose is to be used by the parallel task execution functions in the userAPI
.
Changed
- Force early evaluation for the
x
argument of task execution functions inProgressTrackingContext
class. - Update the log file for progress tracking to include
parabar
in the file name. - Disable warnings for
file.create
inProgressTrackingContext
class. This warning is superfluous since the code handles creation failures. - Refactor test helpers to avoid code duplication.
- Update
par_sapply
to use theUserApiConsumer
class. - Update the developer
API
R6
classes to implement thelapply
parallel operation.
Fixed
- Ensure task execution errors are propagated to the main session in
AsyncBackend
. Closes #35. - Fixed the rendering of
CC BY 4.0
license icons inREADME.md
for the package website. - Update
.decorate
method ofProgressTrackingContext
to be more flexible. More specifically, the method will now throw when primitive functions are provided for decoration. The method can now handle both inline functions (i.e.,function(x) x
) and functions that have a body defined in terms of compound expressions (i.e.,function(x) { x }
). Closes #32. - Fix the
export
operation in theSyncBackend
andContext
classes to fall back to the parent environment if the argumentenvironment
is not provided.
Full Changelog: v1.0.3...v1.1.0