From 70e5a98eb9a4df8244d2693cdb3a27aefee07563 Mon Sep 17 00:00:00 2001 From: Luke Murphy Date: Tue, 7 Jul 2020 15:04:50 +0200 Subject: [PATCH] Improve README and bump version --- CHANGELOG.md | 10 ++++++++-- README.md | 20 ++++++++++++++++---- pyproject.toml | 2 +- 3 files changed, 25 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f8a6807..6215bf1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,12 @@ -# flat-tree 0.0.1a7 (UNRELEASED) +# flat-tree 0.0.1a8 (UNRELEASED) -# flat-tree 0.0.1a6 2020-07-07 +# flat-tree 0.0.1a7 (2020-07-07) + +## Improved Documentation + +- Made README clearer and added example + +# flat-tree 0.0.1a6 (2020-07-07) ## Trivial/Internal Changes diff --git a/README.md b/README.md index 6863a9c..57cda61 100644 --- a/README.md +++ b/README.md @@ -4,10 +4,6 @@ ## Utilities for navigating flat trees -```sh -$ pip install flat-tree -``` - > Flat Trees are the core data structure that power Hypercore feeds. They allow > us to deterministically represent a tree structure as a vector. This is > particularly useful because vectors map elegantly to disk and memory. Because @@ -15,3 +11,19 @@ $ pip install flat-tree > them. In effect this means that Flat Trees are a specific way of indexing > into a vector more than they are their own data structure. This makes them > uniquely efficient and convenient to implement in a wide range of languages. + +## Install + +``` +$ pip install flat-tree +``` + +## Example + +``` +>>> from flat_tree.accessor import FlatTreeIterator +>>> tree_iter = FlatTreeIterator() +>>> assert tree_iter.index == 0 +>>> assert tree_iter.parent() == 1 +>>> assert tree_iter.parent() == 3 +``` diff --git a/pyproject.toml b/pyproject.toml index 65657bf..6bab285 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "poetry.masonry.api" [tool.poetry] name = "flat-tree" -version = "0.0.1a6" +version = "0.0.1a7" description = "Utilities for navigating flat trees" authors = ["Decentral1se "] maintainers = ["Decentral1se "]