Frames-streamly: A streamly layer for Frames I/O

This is a package candidate release! Here you can preview how this package release will appear once published to the main package index (which can be accomplished via the 'maintain' link below). Please note that once a package has been published to the main package index it cannot be undone! Please consult the package uploading documentation for more information.

[maintain] [Publish]

Warnings:

More information is available in the readme.'


[Skip to Readme]

Properties

Versions 0.1.0.0, 0.1.0.1, 0.1.0.2, 0.1.0.3, 0.1.0.3, 0.1.1.0, 0.1.1.1, 0.1.2.0, 0.3.1.0
Change log Changelog.md
Dependencies base (>=4.12.0 && <4.17), exceptions (>=0.10.0 && <0.11), Frames (>=0.6 && <0.8), primitive (>=0.7 && <0.8), relude (>=1.0.0 && <1.1), streamly (>=0.7 && <0.8), strict (>=0.4 && <0.5), text (>=1.2.3 && <1.3), vinyl (>=0.12 && <0.14) [details]
License BSD-3-Clause
Copyright 2020 Adam Conner-Sax
Author Adam Conner-Sax
Maintainer adam_conner_sax@yahoo.com
Category Data
Home page https://github.com/adamConnerSax/Frames-streamly#readme
Bug tracker https://github.com/adamConnerSax/Frames-streamly/issues
Source repo head: git clone https://github.com/adamConnerSax/Frames-streamly
Uploaded by adamCS at 2021-04-28T00:40:50Z

Modules

[Index] [Quick Jump]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees


Readme for Frames-streamly-0.1.0.3

[back to package description]

Frames-streamly- v 0.1.0.2

Build Status Hackage Hackage Dependencies

This library contains some useful functions for using the Frames package with streamly.

Frames has some built-in dependencies on the Pipes package, a few of which--primarily file I/O-- require users of Frames to use the Pipes package explicitly. Streamly provides much of the same functionality as Pipes and may be some users preferred streaming interface.

This package replicates all the external-facing bits of Frames that rely on Pipes and uses streamly instead. It also fleshes out the Frames API in a couple of places:

  1. It adds some flexibility to the functions to write CSV files.
    Frames supported formatting of fields for CSV via a typeclass ShowCSV. That is supported here as well. But this package also supports using the Show instance, and, for more customized formatting, creating field-by-field formatting on the fly via a Vinyl record of functions. Helpful combinators are provided for formatting any single field with a Show instance or a ShowCSV instance or a user provided function from the field type to Text.

  2. It adds some (experimental) support for Frame transformations using Streamly streams as an intermediate state for transformations which may benefit from the concurrency available in streamly. Such transformations first make any foldable of Records (including a Frame) into a stream, apply a streamly transformation to a stream of some other records and then transforms those into a frame. So the result is a frame -> frame function but one that can take advantage of streamly's features at the cost of the transformation into a stream and then back in to a Frame. This allows use of the concurrent features of Streamly for functions like mapM or mapMaybeM.

  3. It adds Streamly folds for the various stream to in-core transformations in case users want to use them directly in stream to Frame transformations. Frames exposed only the functions to transform an entire stream (a pipe producer) into Frames "AoS" structure. This library provides that functionality as well, in this case using streamly streams as the input. But here we also expose streamly folds from streams of Records to Frames so that more complex stream to Frame transformations can be done by the user. For example, suppose you are doing a map/reduce on a large data set and you want to store the grouped subsets as Frames for memory-efficiency. These folds make that simpler.

An example using some of the utilities is here.


LICENSE (BSD-3-Clause)


Copyright (c) 2020, Adam Conner-Sax, All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright
  notice, this list of conditions and the following disclaimer.

* Redistributions in binary form must reproduce the above
  copyright notice, this list of conditions and the following
  disclaimer in the documentation and/or other materials provided
  with the distribution.

* Neither the name of Adam Conner-Sax nor the names of other
  contributors may be used to endorse or promote products derived
  from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.