Commit Graph

2188 Commits

Author SHA1 Message Date
Harendra Kumar
c3b506b68b Refactor, cleanup, hlint - fold and handle tests 2021-01-04 01:26:39 +05:30
Ranjeet Ranjan
0bd1586175 Add test cases for Data.Fold/Array, FileSystem.Handle
Added the following test cases to Data.Fold:

drain, drainBy, mean, stdDev, variance, mconcat, foldMap, foldMapM,
lookup, mapM, teeWithLength, teeWithMax, distribute, partition, unzip

Added the following test cases to Data.Array.Storable.Foreign

* fromList and fromListN

Added FileSystem.Handle module
2021-01-04 01:24:25 +05:30
Harendra Kumar
2e0a445514 Add licensing guidelines 2021-01-01 14:13:35 +05:30
Harendra Kumar
57bd9d29f8 Reorganize some sections 2021-01-01 14:05:26 +05:30
Harendra Kumar
ee3d3a7216 Update and edit PR changeset guidelines 2021-01-01 13:55:30 +05:30
Harendra Kumar
9522eb15df Fix -DCOVERAGE_BUILD 2021-01-01 02:06:15 +05:30
Harendra Kumar
c0065208f2 Fix reporting, use only existing files in hpc report 2021-01-01 00:26:49 +05:30
Harendra Kumar
a5a6efc83a Remove empty tix dirs
To make hpc-coveralls work, because it expects a tix file in all dirs.
2021-01-01 00:26:49 +05:30
Harendra Kumar
364334e6c1 Use only 2 cabal jobs at a time 2021-01-01 00:26:49 +05:30
Harendra Kumar
d6771a2807 Enable hlint for tests and benchmarks 2020-12-31 01:12:50 +05:30
Harendra Kumar
a1111f33b2 Remove redundant echo output 2020-12-31 01:12:50 +05:30
Harendra Kumar
76eea18dba Initialize COVERAGE with a valid value
Otherwise comparisons in conditions fail.
2020-12-31 01:12:50 +05:30
Harendra Kumar
08588c958b Use memory restrictions when building tests 2020-12-31 01:12:50 +05:30
Harendra Kumar
0c29627667 Fix target groups not working correctly
RUNNING_BENCHMARKS/RUNNING_TESTS variables were getting cleared up by
set_common_vars. Also, all_grp is a function and should be treated
differently than variables.
2020-12-30 20:42:50 +05:30
Harendra Kumar
dd8bd7d275 Revert to using a separate GroupConsume state 2020-12-29 22:59:16 +05:30
Adithya Kumar
6bc64a47ba Add a simple test for ArrayStream.concat 2020-12-29 19:48:25 +05:30
Harendra Kumar
d2f70e40cf Update issue management guidelines and labels 2020-12-29 13:38:24 +05:30
Harendra Kumar
a2330bfb74 Use a separate project file for hpc-coveralls
It would be helpful to run bin/test.sh locally without having to install
dependencies of hpc-coveralls. Instead we can install hpc-coveralls
independently and use it after installing it once.
2020-12-28 23:56:18 +05:30
Harendra Kumar
f25a1dd28e Use test.sh to generate coverage info
cabal does not work with coverage when tests are in a different package.
2020-12-28 23:56:18 +05:30
Harendra Kumar
002551e55f Support hpc-coveralls for coverage upload 2020-12-28 23:56:18 +05:30
Harendra Kumar
4dc01677c7 Add coverage option to test.sh script 2020-12-28 23:56:18 +05:30
Harendra Kumar
1b1cbbd16d Do not use threading/rts options in library 2020-12-28 23:56:18 +05:30
Harendra Kumar
f6d05d3f52 Refactor bench.sh to use build-lib.sh 2020-12-28 23:56:18 +05:30
Harendra Kumar
58cb9caffa Move the bench.sh script to "bin" dir 2020-12-28 23:56:18 +05:30
Harendra Kumar
299bdffdd6 Add a script to run tests
This allows us to build and run individual tests or groups of tests. The
script is supposed to be extended to run hpc/coverage manually after
running the tests.

Note: cabal fails to run coverage if the test module is separated from
the library.
2020-12-28 23:56:18 +05:30
Harendra Kumar
9e37229375 Add the test package to coverage/inspection tests 2020-12-28 23:56:18 +05:30
Harendra Kumar
da9d78f47c Revert "Add inspection-testing dependency by default"
This reverts commit 93479c02c8.
2020-12-28 23:56:18 +05:30
Pranay Sashank
638fa00f31 Add CI for macOS. 2020-12-23 17:44:46 +05:30
Adithya Kumar
4d3f9b41ed Implement Data.Parser.ParserD.wordBy
- Modify Data.Parser.wordBy accordingly
- Add tests for both
- Add benchmarks for both
2020-12-23 00:15:32 +05:30
Adithya Kumar
9fefed37d5 Small description fix for test:Data.Parser.takeWhile1 2020-12-17 04:21:18 +05:30
Adithya Kumar
b6ce6a3624 Implement Data.Parser.ParserD.groupBy
- Modify Data.Parser.groupBy accordingly
- Add tests for both
- Add benchmarks for both
2020-12-17 04:21:18 +05:30
Harendra Kumar
ac3af87491 Remove the opt option from streamly-benchmarks
Wherever possible, to improve build times.

We keep one CI having benchmarks and tests optimized + fusion plugin. In
all other CIs we remove optimization from benchmarks and tests.

Disable x86 build on circle-ci.
2020-12-15 17:48:34 +05:30
Harendra Kumar
b677d0ddc9 Separate streamly tests into another package
To be able to use an internal test library, we need to have it as a
separate package. See comments in streamly-benchmarks.cabal for details.

Use a test library for common test modules
Also, added "opt" flag to control optimization levels.

Add a README for tests.
Update benchmarks readme.
2020-12-15 17:48:34 +05:30
Harendra Kumar
18109c6007 Rename Data.List test-suites 2020-12-15 17:48:22 +05:30
Harendra Kumar
93479c02c8 Add inspection-testing dependency by default 2020-12-15 10:25:56 +00:00
Harendra Kumar
074abb3838 Separate folds with leftovers from terminating folds 2020-12-11 20:31:18 +00:00
Adithya Kumar
74be5ad9a3 Move lastN from StreamD to Array.Storable.Foreign 2020-12-12 01:07:09 +05:30
Harendra Kumar
e44e5b04e9 Change the naming scheme to make it more intuitive 2020-12-12 00:57:37 +05:30
Harendra Kumar
18d9d9ed34 Propose a new organization for arrays and streams
Added a section at the end to describe the full organization of streamly
modules including stream/array/fold/mutvar/channels (SVar).
2020-12-12 00:57:20 +05:30
Harendra Kumar
3ff0f50009 update with new module org plans
proposed plans to be discussed.
2020-12-12 00:57:20 +05:30
Harendra Kumar
7e98cfeabe Make misc formatting, stylistic, comment changes
As part of terminating folds review.
2020-12-11 18:42:20 +00:00
Harendra Kumar
d5af0bfb5d Remove redundant parsers, update docs
Remove the parsers that are covered by terminating folds.
2020-12-11 18:37:59 +00:00
Harendra Kumar
82efd3a5bc Refactor StreamD/IsStream for terminating folds
* IsStream:
  * Add foldMany
  * Update haddock docs, with fold equivalents. Now with terminating folds the
    fold behvaior is equivalent to these folds.
  * Add skeletons for foldSequence/foldIterate/parseSequence
  * Implement combinators directly in terms of foldMany/foldMany1

StreamD:
  * export foldMany/foldMany1
  * Remove groupsOf/splitBy/splitSuffixBy/splitSuffixWith, we can use
    foldMany/foldMany1 directly instead.
  * Make some stylistic changes to code

StreamD/Types:
  * Remove groupsOf
  * Remove GroupConsume state from foldMany/foldMany1

* Add benchmarks for foldMany
2020-12-11 18:27:24 +00:00
Adithya Kumar
c191f9c488 Add property tests for splitOn and splitOnSuffix
These tests are implemented along with splitOnSeq and splitOnSuffixSeq
2020-12-11 20:25:29 +05:30
Harendra Kumar
711ca32aac Udate docs, reorganize exports 2020-12-11 12:01:11 +00:00
Harendra Kumar
2888bf5ce3 Review/update docs, combinators in Fold module
Data.Fold.Types:
* Remove takeSepBy:  This function does not do what the name. Also,
`takeSepBy p` is the same as (sliceSepBy (not . p)). We can just remove
this in favor of sliceSepBy.

Data.Fold:

* Reorganize exports
* Add some skeleton/unimplemented combinators.
* Add/update haddock documentation
* Add sliceSepByMax fold - It was in parsers but it can be implemented
  as a fold.
* Rename drainSepBy to drainWhile
* Rename sliceSepWith to sliceEndWith
* Remove distribute_ as it can be implemented using distribute and has
  not perf advantage.
* Remove demuxWithDefault_ and implement demuxDefaultWith instead, which
  does not discard the results. Discarding results has no perf
  advantage.
* Implement demuxWith in terms of demuxDefaultWith, it has no perf
  advantage over the latter.
* Remove demuxWith_, use demuxWith instead.
* Remove demuxDefault_, use demuxDefault instead.
* Some code/comment cleanups

Benchmarks:

* Changes corresponding to the source changes
* Some code cleanups
* Reorder benchmarks
2020-12-11 17:23:53 +05:30
Anurag Hooda
56fce33221 Refactor streamly-benchmarks.cabal, change some function names 2020-12-11 13:09:07 +05:30
Anurag Hooda
1ff4d3c634 Move Streamly.Benchmark.CommonH to lib and change benchmark names, refactor 2020-12-11 13:09:07 +05:30
Anurag Hooda
425df88c9d Fix imports, comments and change RTS flags in streamly-benchmarks.cabal 2020-12-11 13:09:07 +05:30
Anurag Hooda
91a89db002 Change memory limit of Prelude.Adapative module 2020-12-11 13:09:07 +05:30