Compare commits

..

No commits in common. "master" and "0.0.1a7" have entirely different histories.

4 changed files with 45 additions and 34 deletions

View File

@ -1,39 +1,50 @@
# flat-tree 0.0.1a9 (UNRELEASED) # flat-tree 0.0.1a8 (UNRELEASED)
- Simplify CHANGELOG format # flat-tree 0.0.1a7 (2020-07-07)
# flat-tree 0.0.1a8 (2020-07-07) ## Improved Documentation
- Use colours in the README for more happiness
- Made README clearer and added example - Made README clearer and added example
# flat-tree 0.0.1a7 (UNRELEASED)
- **Experimenting with publishing and missed this release number**
# flat-tree 0.0.1a6 (2020-07-07) # flat-tree 0.0.1a6 (2020-07-07)
- Follow the Hypercore protocol renaming situation. ## Trivial/Internal Changes
- Merge all tool configuration into the pyproject.toml - Merge all tool configuration into the pyproject.toml
- Migrate CI to drone.autonomic.zone
- Migrate to git.autonomic.zone ## Removals
- Reduce package boilerplate
- Removed RTD documentation - Removed RTD documentation
## Trivial/Internal Changes
- Follow the Hypercore protocol renaming situation.
- Migrate to git.autonomic.zone
- Migrate CI to drone.autonomic.zone
- Reduce package boilerplate
# flat-tree 0.0.1a5 (2019-11-03) # flat-tree 0.0.1a5 (2019-11-03)
- Fixed changelog entry date and version. ## Trivial/Internal Changes
- Fixed documentation build errors. - Fixed documentation build errors.
- Fixed changelog entry date and version.
# flat-tree 0.0.1a4 (2019-11-03) # flat-tree 0.0.1a4 (2019-11-03)
- Attempt to clarify sections using better navigation. ## Improved Documentation
- Use the sphinx_rtd_theme. - Use the sphinx_rtd_theme.
- Attempt to clarify sections using better navigation.
# flat-tree 0.0.1a3 (2019-07-01) # flat-tree 0.0.1a3 (2019-07-01)
## Removals
- Don't advertise Python 3.5 which is not supported. - Don't advertise Python 3.5 which is not supported.
# flat-tree 0.0.1a2 (2019-07-01) # flat-tree 0.0.1a2 (2019-07-01)
## Project Announcements
- The first alpha development release is made! - The first alpha development release is made!

View File

@ -14,26 +14,16 @@
## Install ## Install
```sh ```
$ pip install flat-tree $ pip install flat-tree
``` ```
## Example ## Example
```python
from flat_tree import FlatTreeIterator
tree_iter = FlatTreeIterator()
print("tree index: ", tree_iter.index)
print("tree first parent: ", tree_iter.parent())
print("tree next parent", tree_iter.parent())
``` ```
>>> from flat_tree.accessor import FlatTreeIterator
Output: >>> tree_iter = FlatTreeIterator()
>>> assert tree_iter.index == 0
```sh >>> assert tree_iter.parent() == 1
tree index: 0 >>> assert tree_iter.parent() == 3
tree first parent: 1
tree next parent 3
``` ```

View File

@ -4,10 +4,10 @@ build-backend = "poetry.masonry.api"
[tool.poetry] [tool.poetry]
name = "flat-tree" name = "flat-tree"
version = "0.0.1a8" version = "0.0.1a7"
description = "Utilities for navigating flat trees" description = "Utilities for navigating flat trees"
authors = ["decentral1se <hi@decentral1.se>"] authors = ["Decentral1se <hi@decentral1.se>"]
maintainers = ["decentral1se <hi@decentral1.se>"] maintainers = ["Decentral1se <hi@decentral1.se>"]
license = "GPLv3" license = "GPLv3"
readme = "README.md" readme = "README.md"
repository = "https://github.com/hyperpy/flat-tree" repository = "https://github.com/hyperpy/flat-tree"
@ -62,7 +62,7 @@ commands = flake8 {posargs:--max-line-length 80} flat_tree/ test/
[testenv:sort] [testenv:sort]
skipdist = True skipdist = True
deps = isort deps = isort
commands = isort {posargs:-c} flat_tree/ test/ commands = isort {posargs:-c} -sp setup.cfg flat_tree/ test/
[testenv:format] [testenv:format]
skipdist = True skipdist = True

10
test/test_version.py Normal file
View File

@ -0,0 +1,10 @@
"""Version test module."""
def test_version_fails_gracefully(mocker):
target = "pkg_resources.get_distribution"
mocker.patch(target, side_effect=Exception())
from flat_tree.__init__ import __version__
assert __version__ == "unknown"