Skip to content

Commit

Permalink
Merge branch 'release/0.12.4'
Browse files Browse the repository at this point in the history
  • Loading branch information
Piyush Narang committed Jan 31, 2017
2 parents cb5391a + b2d0553 commit 0ff431f
Show file tree
Hide file tree
Showing 242 changed files with 13,143 additions and 4,130 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
*.jar
*~

sonatype.sbt

#sbt
/project/target/
/project/project/target
Expand Down Expand Up @@ -47,3 +49,6 @@ project/build/target/
project/plugins/target/
project/plugins/lib_managed/
project/plugins/src_managed/

# Auto-copied by sbt-microsites
docs/src/main/tut/contributing.md
12 changes: 12 additions & 0 deletions .jvmopts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# see https://weblogs.java.net/blog/kcpeppe/archive/2013/12/11/case-study-jvm-hotspot-flags
-Dfile.encoding=UTF8
-Xms1G
-Xmx3G
-XX:MaxPermSize=512M
-XX:ReservedCodeCacheSize=250M
-XX:+TieredCompilation
-XX:-UseGCOverheadLimit
# effectively adds GC to Perm space
-XX:+CMSClassUnloadingEnabled
# must be enabled for CMSClassUnloadingEnabled to work
-XX:+UseConcMarkSweepGC
47 changes: 43 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,48 @@ language: scala
sudo: false
matrix:
include:
- scala: 2.10.5
- scala: 2.10.6
# script: ./sbt ++$TRAVIS_SCALA_VERSION clean test mimaReportBinaryIssues"
script: ./sbt ++$TRAVIS_SCALA_VERSION clean test

- scala: 2.11.7
script: ./sbt ++$TRAVIS_SCALA_VERSION clean test
after_success: "./sbt coveralls"
- scala: 2.11.8
#script: ./sbt ++$TRAVIS_SCALA_VERSION clean coverage test coverageReport mimaReportBinaryIssues
script: ./sbt ++$TRAVIS_SCALA_VERSION clean coverage test coverageReport
after_success:
- bash <(curl -s https://codecov.io/bash)

- scala: 2.12.1
jdk: oraclejdk8
# script: ./sbt "+++$TRAVIS_SCALA_VERSION clean" "+++$TRAVIS_SCALA_VERSION test" "+++$TRAVIS_SCALA_VERSION mimaReportBinaryIssues"
script: ./sbt "+++$TRAVIS_SCALA_VERSION clean" "+++$TRAVIS_SCALA_VERSION test" "++$TRAVIS_SCALA_VERSION docs/makeMicrosite"

before_install:
- export PATH=${PATH}:./vendor/bundle

install:
- rvm use 2.2.3 --install --fuzzy
- gem update --system
- gem install sass
- gem install jekyll -v 3.2.1

cache:
directories:
- $HOME/.sbt/0.13/dependency
- $HOME/.sbt/boot/scala*
- $HOME/.sbt/launchers
- $HOME/.ivy2/cache
- $HOME/.nvm

before_cache:
- du -h -d 1 $HOME/.ivy2/cache
- du -h -d 2 $HOME/.sbt/
- find $HOME/.sbt -name "*.lock" -type f -delete
- find $HOME/.ivy2/cache -name "ivydata-*.properties" -type f -delete

notifications:
webhooks:
urls:
- https://webhooks.gitter.im/e/83f5f34730d7a004992f
on_success: change
on_failure: always
on_start: never
60 changes: 60 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,65 @@
# Algebird #

### Version 0.12.3 (Not yet released) ###

* Add `SetDiff` data structure to `algebird-core`: https://github.com/twitter/algebird/pull/555
* Add `Ring[BigDecimal]`, modeled after `Ring[BigInt]`: https://github.com/twitter/algebird/pull/553
* "Exponential Histogram" sliding window counter implementation added to `algebird-core` as `ExpHist`: https://github.com/twitter/algebird/pull/568
* improve HLLSeries performance: https://github.com/twitter/algebird/pull/575
* Add a microsite at <https://twitter.github.io/algebird> via the `sbt-microsites` plugin, along with docs for all typeclasses and data structures: https://github.com/twitter/algebird/pull/576
* Adds lots of scalacheck `Arbitrary` and `Gen` instances to `algebird-test`, under `com.twitter.algebird.scalacheck.{ gen, arbitrary }`: https://github.com/twitter/algebird/pull/579
* Add `Monoid[Max[Vector[T]]]`, `Monoid[Max[Stream[T]]]`: https://github.com/twitter/algebird/pull/579
* Add `FirstAggregator` and `LastAggregator`, and docs and API / perf improvements for `First`, `Last`, `Min`, `Max`: https://github.com/twitter/algebird/pull/579
* Add `LawsEquiv` versions of all laws: https://github.com/twitter/algebird/pull/584
* Deprecates broken group/ring for `Future`/`Try`: https://github.com/twitter/algebird/pull/584
* Add `metricsLaws[T]` to `BaseProperties` in `algebird-test`: https://github.com/twitter/algebird/pull/584
* Modify generated `Tuple2Monoid`, etc to extend `TupleNSemigroup`, giving subclasses access to efficient `sumOption`: https://github.com/twitter/algebird/pull/585
* optimize `Generated{Abstract,Product}Algebra.sumOption` with benchmarking https://github.com/twitter/algebird/pull/591
* Add an efficient `sumOption`, `+`, `-`, methods and docs to `AveragedValue`: https://github.com/twitter/algebird/pull/589

### Version 0.12.2 ###

* optimize `CMS.create(Seq[K])`: https://github.com/twitter/algebird/pull/537
* Update to sbt 0.13.11: https://github.com/twitter/algebird/pull/540
* Add `Semigroup.maybePlus`: https://github.com/twitter/algebird/pull/544
* Improve the build and test times and add Codecov.io: https://github.com/twitter/algebird/pull/541

### Version 0.12.1 ###

* Add `Identity` class and `Monad` instance: https://github.com/twitter/algebird/pull/511
* Using `dropRight` instead of `tail` for shortening `BytesSpec` array: https://github.com/twitter/algebird/pull/510
* Fix flaky `MinHasherSpec` test: https://github.com/twitter/algebird/pull/514
* fix input type of `toRichTraversable`: https://github.com/twitter/algebird/pull/518
* build in scala 2.11 by default: https://github.com/twitter/algebird/pull/520
* make `SSOne`/`SSMany` constructors private and add apply method with count: https://github.com/twitter/algebird/pull/519
* Fix `BytesSpec` to not reference head on an empty list https://github.com/twitter/algebird/pull/525
* Add an `Aggregator.randomSample` aggregator: https://github.com/twitter/algebird/pull/529
* Add `sortedTakeBy` and `sortedReverseTakeBy` to `Aggregator.scala`: https://github.com/twitter/algebird/pull/527
* Add `Batched[A]` type for efficient lazy addition: https://github.com/twitter/algebird/pull/530
* Add a default `k` value for `Aggregator.approximatePercentile`: https://github.com/twitter/algebird/pull/531

### Version 0.12.0 ###

* Implement an appendMonoid Aggregator factory which yields aggregators…: https://github.com/twitter/algebird/pull/501
* Dealing with probabilistic tests: https://github.com/twitter/algebird/pull/478
* Add Applicative.sequenceGen: https://github.com/twitter/algebird/pull/498
* Create a sparse Count-Min-Sketch.: https://github.com/twitter/algebird/pull/464
* fix name and visibility of negativePowersOfTwo: https://github.com/twitter/algebird/pull/492
* Speed up HLL presentation by 100x: https://github.com/twitter/algebird/pull/491
* Test Semigroup#sumOption using Iterator instead of List: https://github.com/twitter/algebird/pull/490
* Fix tests that were not actually running: https://github.com/twitter/algebird/pull/485
* add immutable version of sorted(Reverse)Take: https://github.com/twitter/algebird/pull/484
* Cuber/roller macros: https://github.com/twitter/algebird/pull/483
* Add sanity requirement for Approximate: https://github.com/twitter/algebird/pull/481
* Ioconnell/make develop version have snapshot suffix: https://github.com/twitter/algebird/pull/482
* Upgrade scalacheck and scalatest: https://github.com/twitter/algebird/pull/480
* Adding scoped top-N CMS monoid: https://github.com/twitter/algebird/pull/471
* Fix Qtree quantileBounds off-by-one error: https://github.com/twitter/algebird/pull/472
* Move benchmarks to JMH: https://github.com/twitter/algebird/pull/473
* Ianoc/q tree benchmark more coverage: https://github.com/twitter/algebird/pull/474
* Optimize QTree a bunch: https://github.com/twitter/algebird/pull/475
* Disable coveralls, shows up as builds pending that are long finished: https://github.com/twitter/algebird/pull/476

### Version 0.11.0 ###
* Move CMSHasherByteArray from scalding: https://github.com/twitter/algebird/pull/467
* Upgrade sbt launcher script (sbt-extras): https://github.com/twitter/algebird/pull/469
Expand Down
20 changes: 20 additions & 0 deletions COMMITTERS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Committers

Please see our [Project Governance](https://github.com/twitter/analytics-infra-governance) page for more details.

## Active

| Name | Handle |
|------------------------|-----------------------------------------------------------|
| Alex Levenson | [@isnotinvain](https://github.com/isnotinvain) |
| Ben Pence | [@benpence](https://github.com/benpence) |
| Ian O'Connell | [@ianoc](https://github.com/ianoc) |
| Joe Nievelt | [@jnievelt](https://github.com/jnievelt) |
| Oscar Boykin | [@johnynek](https://github.com/johnynek) |
| Pankaj Gupta | [@pankajroark](https://github.com/pankajroark) |
| Piyush Narang | [@piyushnarang](https://github.com/piyushnarang) |
| Ruban Monu | [@rubanm](https://github.com/rubanm) |
| Sriram Krishnan | [@sriramkrishnan](https://github.com/sriramkrishnan) |
| Sam Ritchie | [@sritchie](https://github.com/sritchie) |

##Emeritus
136 changes: 125 additions & 11 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,129 @@
Recommendations and requirements for how to best contribute to Algebird.
---
layout: page
title: "Contributing"
section: "contributing"
position: 5
---

We strive to obey these as best as possible. As always, thanks for contributing--we hope these guidelines make it easier and shed some light on our approach and processes.
# Contributing to Algebird

### Key branches
- `master` is the latest, deployed version
- `develop` is where development happens and all pull requests should be submitted
This page lists recommendations and requirements for how to best contribute to Algebird. We strive to obey these as best as possible. As always, thanks for contributing--we hope these guidelines make it easier and shed some light on our approach and processes.

### Pull requests
- Submit pull requests against the `develop` branch
- Try not to pollute your pull request with unintended changes--keep them simple and small
## Key branches

### License
By contributing your code, you agree to license your contribution under the terms of the APLv2:
https://github.com/twitter/algebird/blob/master/LICENSE
- `master` is the latest, deployed version.
- `develop` is where development happens and all pull requests should be submitted.

## Pull requests

Submit pull requests against the `develop` branch. Try not to pollute your pull request with unintended changes. Keep it simple and small.

## Contributing Tests

All tests go into the test directory of the `algebird-test` subproject. This is because Algebird publishes a module of helpful functions and Scalacheck laws that anyone can use to test the algebraic properties of their own data structures.

We don't have strong conventions around our tests, but here are a few guidelines that will help both for contributing, and when trying to find tests for existing data structures.

### Scalacheck Properties

If you're adding [scalacheck](https://scalacheck.org/) properties, make a new class that extends `com.twitter.algebird.CheckProperties`. Here's an example of a new file of tests:

```scala
package com.twitter.algebird

import org.scalacheck.Prop

class MaxLaws extends CheckProperties {
property("test description") {
// Any instance of Prop will work.
Prop.forAll { x: Int => x + 0 == x }
}

// Prop instances defined elsewhere work too:
property("Max[Long] is a commutative monoid") {
BaseProperties.commutativeMonoidLaws[Max[Long]]
}
}
```

### Scalatest

We use [scalatest](http://www.scalatest.org/) for all of our other tests. [OperatorTest.scala](https://github.com/twitter/algebird/blob/1520068ae296d65ce3c4af7a0dc40137349f76f0/algebird-test/src/test/scala/com/twitter/algebird/OperatorTest.scala#L7) provides a nice example of this style of testing.

### What need testing the most?

The best way to figure out where we need tests is to look at our [Codecov coverage report](https://codecov.io/github/twitter/algebird). Codecov has an incredible [browser extension](http://docs.codecov.io/docs/browser-extension) that will embed coverage information right into the GitHub file browsing UI.

Once you've got the extension installed, navigate to the [algebird-core index](https://github.com/twitter/algebird/tree/develop/algebird-core/src/main/scala/com/twitter/algebird) to see file-by-file coverage percentages. Inside each file, lines that aren't covered by tests will be highlighted red.

## Contributing Documentation

The documentation for Algebird's website is stored in the `docs/src/main/tut` directory of the [docs subproject](https://github.com/twitter/algebird/tree/develop/docs).

Algebird's documentation is powered by [sbt-microsites](https://47deg.github.io/sbt-microsites/) and [tut](https://github.com/tpolecat/tut). `tut` compiles any code that appears in the documentation, ensuring that snippets and examples won't go out of date.

We would love your help making our documentation better. If you see a page that's empty or needs work, please send us a pull request making it better. If you contribute a new data structure to Algebird, please add a corresponding documentation page. To do this, you'll need to:

- Add a new Markdown file to `docs/src/main/tut/datatypes` with the following format:

```markdown
---
layout: docs
title: "<Your Page Title>"
section: "data"
source: "algebird-core/src/main/scala/com/twitter/algebird/<YourDataType>.scala"
scaladoc: "#com.twitter.algebird.<YourDataType>"
---

# Your Data Type

.....
```

- Make sure to add some code examples! Any code block of this form will get compiled using `tut`:


```toot:book
<your code>
```
(Please replace `toot` with `tut`!) `tut` will evaluate your code as if you'd pasted it into a REPL and insert each line's results in the output. State persists across `tut` code blocks, so feel free to alternate code blocks with text discussion. See the [tut README](https://github.com/tpolecat/tut) for more information on the various options you can use to customize your code blocks.
- Add your page to the appropriate section in [the menu](https://github.com/twitter/algebird/tree/develop/docs/src/main/resources/microsite/data/menu.yml)
### Generating the Site
run `sbt docs/makeMicrosite` to generate a local copy of the microsite.
### Previewing the site
1. Install jekyll locally, depending on your platform, you might do this with any of the following commands:
```
yum install jekyll
apt-get install jekyll
gem install jekyll
```
2. In a shell, navigate to the generated site directory in `docs/target/site`
3. Start jekyll with `jekyll serve --incremental`
4. Navigate to http://127.0.0.1:4000/algebird/ in your browser
5. Make changes to your site, and run `sbt docs/makeMicrosite` to regenerate the site. The changes should be reflected as soon as `sbt docs/makeMicrosite` completes.
## Post-release
After the release occurs, you will need to update the documentation. Here is a list of the places that will definitely need to be updated:
* `README.md`: update version numbers
* `CHANGES.md`: summarize changes since last release
(Other changes may be necessary, especially for large releases.)
You can get a list of changes between release tags `v0.1.2` and `v0.2.0` via `git log v0.1.2..v0.2.0`. Scanning this list of commit messages is a good way to get a summary of what happened, although it does not account for conversations that occured on Github. (You can see the same view on the Github UI by navigating to <https://github.com/twitter/algebird/compare/v0.1.2...v0.2.0>.)
Once the relevant documentation changes have been committed, new [release notes](https://github.com/twitter/algebird/releases) should be added. You can add a release by clicking the "Draft a new release" button on that page, or if the relevant release already exists, you can click "Edit release".
The website should then be updated via `sbt docs/publishMicrosite`.
## License
By contributing your code, you agree to license your contribution under the terms of the [APLv2](LICENSE).
4 changes: 1 addition & 3 deletions NOTICE
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
MurmurHash implementation provided by software developed by The Apache Software
Foundation (http://www.apache.org/).


Foundation (http://www.apache.org/).
Loading

0 comments on commit 0ff431f

Please sign in to comment.