diff --git a/README.md b/README.md index 1576ae7..7e602aa 100644 --- a/README.md +++ b/README.md @@ -6,57 +6,4 @@ Implementations of priority queues in Python using Rust bindings for speed. I'm doing this to learn Rust, so don't judge me too hard lol. I've noted a few places where I'm unhappy with the implementation (mostly w.r.t. code duplication), but hopefully as I become more comfortable in Rust I can go back and fix those. - -Better to have a bad implementation now than a good implementation never. - -## Usage - -The package provides 3 queues: `Pure`, `Paired`, and `Indexed`, all of which are min-queues. -The `PureQueue` directly sorts the values it is given and returns them in order. -The `PairedQueue` pairs an arbitrary Python object with a float priority and returns the objects in the order specified by their priorities. -The `IndexedQueue` works the same as the `PairedQueue`, but allows arbitrary priority modification and object deletion at the cost of some runtime overhead and no support for duplicate objects (duplicate priorities are okay). - -Typing is provided in `pyority_queue.pyi`, and should be picked up by your IDE. - -## Development - -Install venv and setup as usual - -```sh -python -m venv venv -pip install -r requirements.txt -source venv/bin/activate -``` - -Build rust code with - -```sh -maturin develop -``` - -Note that after you build the project for the first time you may have to restart the venv for it to pick up the new module - -```sh -deactivate -source venv/bin/activate -``` - -Develop as usual, you should now be able to import the code through Python - -```py -from pyority_queue import * -``` - -### Testing - -Run the rust test suite with - -```sh -cargo test -``` - -Run the python test suite with - -```sh -pytest tests/*.py -``` +Better to have a bad implementation now than a good implementation never is my view. diff --git a/requirements.txt b/requirements.txt index 4281a29..ba45a50 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,4 +2,5 @@ iniconfig==2.0.0 maturin==1.8.1 packaging==24.2 pluggy==1.5.0 +-e git+ssh://git@git.mmbradley.ca:222/MichaelBradley/pyority_queue.git@661e1d220ae71002d66d2ba2d3dfddfe4ff1035d#egg=pyority_queue pytest==8.3.4