From b59a5a497caef9caf1081f836b859123b2f7a04d Mon Sep 17 00:00:00 2001 From: Martin Sumner Date: Mon, 28 Oct 2024 12:14:15 +0000 Subject: [PATCH] Update for OpenRiak --- .github/workflows/erlang.yml | 4 +-- README.md | 47 +++++++++++++++++++++++++ README.org | 67 ------------------------------------ rebar.config | 2 +- 4 files changed, 50 insertions(+), 70 deletions(-) create mode 100644 README.md delete mode 100644 README.org diff --git a/.github/workflows/erlang.yml b/.github/workflows/erlang.yml index e1b55d8..3eb5907 100644 --- a/.github/workflows/erlang.yml +++ b/.github/workflows/erlang.yml @@ -3,10 +3,10 @@ name: Erlang CI on: push: branches: - - nhse-develop + - openriak-3.2 pull_request: branches: - - nhse-develop + - openriak-3.2 jobs: diff --git a/README.md b/README.md new file mode 100644 index 0000000..bd1b59b --- /dev/null +++ b/README.md @@ -0,0 +1,47 @@ +# ebloom + +## Overview + +![ebloom OpenRiak Status](https://github.com/OpenRiak/ebloom/actions/workflows/erlang.yml/badge.svg?branch=openriak-3.2) + +`ebloom` is a NIF wrapper around a basic bloom filter. + +## Quick Start + +You must have [[http://erlang.org/download.html][Erlang/OTP 22]] or later and a GNU-style build system to compile and run =ebloom=. + +``` +git clone git://github.com/basho/ebloom.git +cd ebloom +make +``` + +Start up an Erlang shell with the path to =ebloom= included. + +``` +erl -pa path/to/ebloom/ebin +``` + +Create a new bloom filter, insert elements, and test for an elements presence. + +``` +1> PredictedElementCount=5. +5 +2> FalsePositiveProbability=0.01. + +3> RandomSeed=123. +123 +4> {ok, Ref} = ebloom:new(PredictedElementCount, FalsePositiveProbability, RandomSeed). +{ok,<<>>} +5> ebloom:insert(Ref, <<"abcdef">>). +ok +6> true = ebloom:contains(Ref, <<"abcdef">>). +true +7> false = ebloom:contains(Ref, <<"zzzzzz">>). +false +``` + +## Contributing + +The `ebloom` module is maintained to support a single function within the Riak legacy replication feature. It is not actively developed (i.e. to consider new features or performance improvements). + diff --git a/README.org b/README.org deleted file mode 100644 index 27c2ab7..0000000 --- a/README.org +++ /dev/null @@ -1,67 +0,0 @@ -* ebloom -** Overview -[[http://travis-ci.org/basho/ebloom][Travis-CI]] :: [[https://secure.travis-ci.org/basho/ebloom.png]] - -=ebloom= is a NIF wrapper around a basic bloom filter. - -** Quick Start - You must have [[http://erlang.org/download.html][Erlang/OTP R13B04]] or later and a GNU-style build - system to compile and run =ebloom=. - -#+BEGIN_SRC shell -git clone git://github.com/basho/ebloom.git -cd ebloom -make -#+END_SRC - - Start up an Erlang shell with the path to =ebloom= included. - -#+BEGIN_SRC shell -erl -pa path/to/ebloom/ebin -#+END_SRC - - Create a new bloom filter, insert elements, and test for an - elements presence. - -#+BEGIN_SRC erlang -1> PredictedElementCount=5. -5 -2> FalsePositiveProbability=0.01. - -3> RandomSeed=123. -123 -4> {ok, Ref} = ebloom:new(PredictedElementCount, FalsePositiveProbability, RandomSeed). -{ok,<<>>} -5> ebloom:insert(Ref, <<"abcdef">>). -ok -6> true = ebloom:contains(Ref, <<"abcdef">>). -true -7> false = ebloom:contains(Ref, <<"zzzzzz">>). -false -#+END_SRC - -** Contributing - We encourage contributions to =ebloom= from the community. - - 1) Fork the =ebloom= repository on [[https://github.com/basho/ebloom][Github]]. - 2) Clone your fork or add the remote if you already have a clone of - the repository. -#+BEGIN_SRC shell -git clone git@github.com:yourusername/ebloom.git -# or -git remote add mine git@github.com:yourusername/ebloom.git -#+END_SRC - 3) Create a topic branch for your change. -#+BEGIN_SRC shell -git checkout -b some-topic-branch -#+END_SRC - 4) Make your change and commit. Use a clear and descriptive commit - message, spanning multiple lines if detailed explanation is - needed. - 5) Push to your fork of the repository and then send a pull-request - through Github. -#+BEGIN_SRC shell -git push mine some-topic-branch -#+END_SRC - 6) A Basho engineer or community maintainer will review your patch - and merge it into the main repository or send you feedback. diff --git a/rebar.config b/rebar.config index 6209797..d58a4a7 100644 --- a/rebar.config +++ b/rebar.config @@ -8,7 +8,7 @@ {erl_opts, [debug_info, warnings_as_errors]}. {cover_enabled, true}. -{plugins, [{pc, {git, "https://github.com/blt/port_compiler", {tag, "v1.14.0"}}}]}. +{plugins, [{pc, {git, "https://github.com/OpenRiak/port_compiler", {tag, "openriak-3.2"}}}]}. {profiles, [ {gha, [{erl_opts, [{d, 'GITHUBEXCLUDE'}]}]}