Skip to content

Releases: mihaiconstantin/parabar

parabar v1.4.2

16 Dec 23:10
5f96dc5

Choose a tag to compare

What's Changed

Fixed

  • Add missing URL in foreach vignette.

Full Changelog: v1.4.1...v1.4.2

parabar v1.4.1

16 Dec 22:38
eefea79

Choose a tag to compare

What's Changed

Fixed

  • Update URL in foreach vignette to respect the CRAN canonical package URL format.

Full Changelog: v1.4.0...v1.4.1

parabar v1.4.0

16 Dec 21:56
60df61c

Choose a tag to compare

What's Changed

Added

  • Add vignette foreach.Rmd to illustrate how parabar can be used in conjunction with the foreach package. The implementation for the %dopar% operator is provided by the doParabar package. The foreach.Rmd vignette is locally build from the foreach.Rmd.orig file.

Full Changelog: v1.3.0...v1.4.0

parabar v1.3.0

10 Dec 12:53
6126056

Choose a tag to compare

What's Changed

Added

  • Update AsyncBackend to allow forceful stopping of the cluster. This is controlled by the package option stop_forceful, which, when set to TRUE, permits the backend to stop the cluster even if tasks are running or if tasks have finished but their results have not yet been read into the main session. The stopping logic is now based on the newly added class SessionState. Closes #59.
  • Add SessionState class to easily check if an asynchronous backend is ready for certain operations.
  • Add tests for the SessionState and TaskState classes, and other improvements to the existing tests.
  • Introduce "pseudo-tests" for SyncBackend and AsyncBackend finalizers. These tests don't perform real assertions but instead verify that finalizers are invoked when backend instances are garbage collected. As of now, there appears to be no reliable way to programmatically capture conditions handled within a finalizer triggered by manual gc() invocation.

Changed

  • Remove SyncBackend and AsyncBackend destructors in favour of R finalizers registered via base::reg.finalizer.
  • Rename Service to BackendService for clarity and consistency. While the name Service makes sense in the context of the parabar package, it can be confusing when using parabar in conjunction with other packages (e.g., in the context of the powerly package). The new name BackendService is hopefully more descriptive and less likely to clash with other packages.
  • Update comparison.Rmd vignette to refresh the comparison between parabar and pbapply packages.
  • Update design diagram and improved its readability and the client code examples.
  • Refactor task_is_running test helper to accept more context types.
  • Update Specification to allow backends with a single core. Closes #71.

Fixed

  • Fix error triggered by the invocation of the backend destructors (i.e., see issue #61). Clean-up of resources is now handled via the base::reg.finalizer mechanism, with finalizers being automatically registered when a backend is created. This ensures that the cluster is stopped and resources are released even if the user forgets to call stop_backend explicitly. Closes #61.
  • Fix the sink redirect to use the correct destination on Windows (i.e., nul instead of /dev/null). Closes #74.

Full Changelog: v1.2.1...v1.3.0

parabar v1.2.1

17 Oct 06:47
dcb5636

Choose a tag to compare

What's Changed

Fixed

  • Update URL with status 301 in README.md per CRAN checks.

Full Changelog: v1.2.0...v1.2.1

parabar v1.2.0

16 Oct 17:55
0c1b2ea

Choose a tag to compare

What's Changed

Changed

  • Enable roxygen checks for R6 documentation in DESCRIPTION.
  • Update Context to implement the Service interface.
  • Update GitHub workflows.
  • Fix typos and other errors in code documentation.

Full Changelog: v1.1.1...v1.2.0

parabar v1.1.1

05 Feb 21:56
52234ba

Choose a tag to compare

What's Changed

Added

  • Add tests for progress tracking context when executed tasks throw an error. In relation to #44.

Changed

  • Update action versions in GitHub workflows.

Fixed

  • Fix hanging progress bar on errors in the ProgressTrackingContext.R class. Closes #44.
  • Remove duplicated lines in UserApiConsumer class. Closes #41.
  • Fix indentation in UML design diagram. Closes #45.
  • Add missing apply operation to README documentation.

Full Changelog: v1.1.0...v1.1.1

parabar v1.1.0

07 May 09:52
949e191

Choose a tag to compare

What's Changed

Added

  • Update implementations of Service$apply operation for Backend classes to validate the provided margin argument before running the parallel operation.
  • Add helper Helper$check_array_margins to validate the margins provided to the Service$apply operation.
  • Add exception Exception$array_margins_not_compatible for using improper margins in the Service$apply operation.
  • Add exception Exception$primitive_as_task_not_allowed for trying to decorate primitive functions with progress tracking in the ProgressTrackingContext 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 of SyncBackend for consistency.
  • Add more tests to improve coverage.
  • Add implementation for Service$lapply and Service$apply operations for all classes that implement the Service interface.
  • Add par_lapply and par_apply functions to the user API. These functions can be used to run tasks in parallel akin to parallel::parLapply and parallel::parApply, respectively. Closes #30.
  • Add UserApiConsumer R6 class that provides an opinionated wrapper around the developer API of the parabar package. All parallel operations (e.g., par_sapply and par_lapply) follow more or less the same pattern. The UserApiConsumer encapsulates this pattern and makes it easier to extend parabar with new parallel functions (e.g., par_apply) while avoiding code duplication. The UserApiConsumer 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 user API.

Changed

  • Force early evaluation for the x argument of task execution functions in ProgressTrackingContext class.
  • Update the log file for progress tracking to include parabar in the file name.
  • Disable warnings for file.create in ProgressTrackingContext class. This warning is superfluous since the code handles creation failures.
  • Refactor test helpers to avoid code duplication.
  • Update par_sapply to use the UserApiConsumer class.
  • Update the developer API R6 classes to implement the lapply 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 in README.md for the package website.
  • Update .decorate method of ProgressTrackingContext 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 the SyncBackend and Context classes to fall back to the parent environment if the argument environment is not provided.

Full Changelog: v1.0.3...v1.1.0

parabar v1.0.3

24 Apr 06:17

Choose a tag to compare

Fixed

  • Fixed moved URL in package NEWS.md per CRAN request.

Full Changelog: v1.0.2...v1.0.3

parabar v1.0.2

23 Apr 09:09

Choose a tag to compare

Fixed

  • Fixed URLs in package documentation per CRAN request.

Full Changelog: v1.0.1...v1.0.2