Skip to content

Commit

Permalink
Merge pull request #4 from G-Research/pypi
Browse files Browse the repository at this point in the history
Document release process, at least, and prepare for first release
  • Loading branch information
itamarst authored Apr 27, 2021
2 parents dcbc728 + 300c1c2 commit 67a1b7a
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 3 deletions.
40 changes: 40 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Contributing to `ahocorasick_rs`

Thank you for considering contributing! Note that by contributing your code, you are agreeing to license it under the Apache License 2.0 (see [`LICENSE`](LICENSE)).

## Setting up a development environment

First, download and install [Just](https://github.com/casey/just)

Then, setup a virtualenv, install dev dependencies, and compile the code:

```bash
just setup
source venv/bin/activateo # or Windoes equivalent
just build-dev
```

## Running tests and benchmarks

To run tests:

```shell-session
$ just test
```

To run benchmarks:

```shell-session
$ just prep-benchmark # on Linux Intel, disables turbobost
$ just benchmark
```

## Doing a release

1. Update version in `Cargo.toml`
2. Submit a PR
3. Merge to `main`
4. Tag in GitHub with new version number
5. Download Wheels.zip artifact from GitHub Actions
6. Upload by running `maturin upload unzipped-files/*.whl`

8 changes: 6 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
[package]
name = "ahocorasick_rs"
version = "0.1.0"
version = "0.9.0"
edition = "2018"
authors = ["G-Research", "Itamar Turner-Trauring <[email protected]>"]
authors = ["G-Research <[email protected]>", "Itamar Turner-Trauring <[email protected]>"]
description = "Search a string for multiple substrings at once"
readme = "README.md"
license = "Apache 2.0"
repository = "https://github.com/G-Research/ahocorasick_rs"

[lib]
name = "ahocorasick_rs"
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# `ahocorasick_rs`: Quickly search for multiple substrings at once
# ahocorasick_rs: Quickly search for multiple substrings at once

`ahocorasick_rs` allows you to search for multiple substrings ("patterns") in a given string ("haystack") using variations of the [Aho-Corasick algorithm](https://en.wikipedia.org/wiki/Aho%E2%80%93Corasick_algorithm).

Expand Down
1 change: 1 addition & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ pytest-benchmark
flake8
black
pyahocorasick
maturin

0 comments on commit 67a1b7a

Please sign in to comment.