Merge pull request #1 from datpy/cleanups-gardening
Cleanups on package meta and docs
This commit is contained in:
commit
14cf07deef
@ -3,9 +3,9 @@ language: python
|
|||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- python: 3.6
|
- python: 3.6
|
||||||
env: TOXENV=py36-test
|
env: TOXENV=py36
|
||||||
- python: 3.7
|
- python: 3.7
|
||||||
env: TOXENV=py37-test
|
env: TOXENV=py37
|
||||||
- python: 3.7
|
- python: 3.7
|
||||||
env: TOXENV=lint
|
env: TOXENV=lint
|
||||||
- python: 3.7
|
- python: 3.7
|
||||||
|
@ -4,7 +4,7 @@ Flat_Tree 0.0.1a3 (2019-07-01)
|
|||||||
Removals
|
Removals
|
||||||
--------
|
--------
|
||||||
|
|
||||||
- Don't advertise Python 3.5 which is not supported. (#1)
|
- 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)
|
||||||
@ -13,4 +13,4 @@ Flat_Tree 0.0.1a2 (2019-07-01)
|
|||||||
Project Announcements
|
Project Announcements
|
||||||
---------------------
|
---------------------
|
||||||
|
|
||||||
- Initial development release is made! (#1)
|
- The first alpha development release is made!
|
||||||
|
@ -1,20 +1,16 @@
|
|||||||
Get started
|
Get started
|
||||||
-----------
|
-----------
|
||||||
|
|
||||||
Install `Tox`_ with:
|
Install `Tox`_.
|
||||||
|
|
||||||
.. _tox: http://tox.readthedocs.io/
|
.. _tox: http://tox.readthedocs.io/
|
||||||
|
|
||||||
.. code-block:: bash
|
|
||||||
|
|
||||||
$ pip install --user tox
|
|
||||||
|
|
||||||
Run tests
|
Run tests
|
||||||
---------
|
---------
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
tox -e test
|
tox -e py37
|
||||||
|
|
||||||
Lint source
|
Lint source
|
||||||
-----------
|
-----------
|
||||||
@ -40,28 +36,6 @@ Type check source
|
|||||||
Release Process
|
Release Process
|
||||||
---------------
|
---------------
|
||||||
|
|
||||||
Add a change entry and re-generate the changelog:
|
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
$ towncrier
|
|
||||||
|
|
||||||
Make a new release tag:
|
|
||||||
|
|
||||||
.. code-block:: bash
|
|
||||||
|
|
||||||
$ git tag x.x.x
|
|
||||||
$ git push --tags
|
|
||||||
|
|
||||||
If you have a development install locally, you can verify:
|
|
||||||
|
|
||||||
.. code-block:: bash
|
|
||||||
|
|
||||||
$ flat_tree --version
|
|
||||||
|
|
||||||
Then run the release process:
|
|
||||||
|
|
||||||
.. code-block:: bash
|
|
||||||
|
|
||||||
$ tox -e metadata-release
|
|
||||||
$ tox -e release
|
$ tox -e release
|
||||||
|
39
README.rst
39
README.rst
@ -43,17 +43,50 @@ From `The Dat Protocol`_:
|
|||||||
them uniquely efficient and convenient to implement in a wide range of
|
them uniquely efficient and convenient to implement in a wide range of
|
||||||
languages.
|
languages.
|
||||||
|
|
||||||
|
.. _example:
|
||||||
|
|
||||||
|
Example
|
||||||
|
*******
|
||||||
|
|
||||||
|
.. code-block:: python
|
||||||
|
|
||||||
|
"""
|
||||||
|
|
||||||
|
You can represent a binary tree in a simple
|
||||||
|
flat list using the following structure:
|
||||||
|
|
||||||
|
3
|
||||||
|
1 5
|
||||||
|
0 2 4 6 ...
|
||||||
|
|
||||||
|
This module exposes a series of functions
|
||||||
|
to help you build and maintain this data structure.
|
||||||
|
|
||||||
|
"""
|
||||||
|
|
||||||
|
from flat_tree import FlatTreeAccessor
|
||||||
|
|
||||||
|
tree_access = FlatTreeAccessor()
|
||||||
|
|
||||||
|
# get array index for depth: 1, offset: 0
|
||||||
|
tree_access.index(1, 0)
|
||||||
|
|
||||||
.. _documentation:
|
.. _documentation:
|
||||||
|
|
||||||
Documentation
|
Documentation
|
||||||
*************
|
*************
|
||||||
|
|
||||||
* https://flat-tree.readthedocs.io
|
* `flat-tree.readthedocs.io`_
|
||||||
|
|
||||||
|
.. _flat-tree.readthedocs.io: https://flat-tree.readthedocs.io
|
||||||
|
|
||||||
.. _mirroring:
|
.. _mirroring:
|
||||||
|
|
||||||
Mirroring
|
Mirroring
|
||||||
*********
|
*********
|
||||||
|
|
||||||
* https://hack.decentral1.se/datpy/flat-tree (primary)
|
* `hack.decentral1.se/datpy/flat-tree`_
|
||||||
* https://github.com/datpy/flat-tree
|
* `github.com/datpy/flat-tree`_
|
||||||
|
|
||||||
|
.. _hack.decentral1.se/datpy/flat-tree: https://hack.decentral1.se/datpy/flat-tree
|
||||||
|
.. _github.com/datpy/flat-tree: https://github.com/datpy/flat-tree
|
||||||
|
@ -3,7 +3,12 @@
|
|||||||
Other Implementations
|
Other Implementations
|
||||||
*********************
|
*********************
|
||||||
|
|
||||||
* https://github.com/mafintosh/flat-tree
|
* `mafintosh/flat-tree`_
|
||||||
* https://github.com/datrs/flat-tree
|
* `datrs/flat-tree`_
|
||||||
* https://github.com/bcomnes/flattree
|
* `bcomnes/flattree`_
|
||||||
* https://github.com/datcxx/flat-tree
|
* `datcxx/flat-tree`_
|
||||||
|
|
||||||
|
.. _mafintosh/flat-tree: https://github.com/mafintosh/flat-tree
|
||||||
|
.. _datrs/flat-tree: https://github.com/datrs/flat-tree
|
||||||
|
.. _bcomnes/flattree: https://github.com/bcomnes/flattree
|
||||||
|
.. _datcxx/flat-tree: https://github.com/datcxx/flat-tree
|
||||||
|
@ -35,7 +35,7 @@ classifiers =
|
|||||||
|
|
||||||
[options]
|
[options]
|
||||||
use_scm_version = True
|
use_scm_version = True
|
||||||
python_requires = !=2.7.*, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*
|
python_requires = >=3.6
|
||||||
setup_requires =
|
setup_requires =
|
||||||
setuptools_scm
|
setuptools_scm
|
||||||
setuptools_scm_git_archive
|
setuptools_scm_git_archive
|
||||||
|
51
tox.ini
51
tox.ini
@ -1,6 +1,6 @@
|
|||||||
[tox]
|
[tox]
|
||||||
envlist =
|
envlist =
|
||||||
{py36,py37}-test
|
{py36,py37}
|
||||||
lint
|
lint
|
||||||
sort
|
sort
|
||||||
format
|
format
|
||||||
@ -17,70 +17,53 @@ deps =
|
|||||||
pytest
|
pytest
|
||||||
pytest-cov
|
pytest-cov
|
||||||
pytest-mock
|
pytest-mock
|
||||||
commands =
|
commands = pytest test/ --cov={toxinidir}/flat_tree/ --no-cov-on-fail {posargs}
|
||||||
pytest test/ --cov={toxinidir}/flat_tree/ --no-cov-on-fail {posargs}
|
|
||||||
|
|
||||||
[testenv:lint]
|
[testenv:lint]
|
||||||
description = lint the source
|
description = lint the source
|
||||||
skipdist = True
|
skipdist = True
|
||||||
deps =
|
deps = flake8
|
||||||
flake8
|
commands = flake8 {posargs} flat_tree/ test/
|
||||||
commands =
|
|
||||||
flake8 {posargs} flat_tree/ test/
|
|
||||||
|
|
||||||
[testenv:sort]
|
[testenv:sort]
|
||||||
description = sort the source
|
description = sort the source
|
||||||
skipdist = True
|
skipdist = True
|
||||||
deps =
|
deps = isort
|
||||||
isort
|
commands = isort {posargs:-rc -c} -sp setup.cfg flat_tree/ test/
|
||||||
commands =
|
|
||||||
isort {posargs:-rc -c} -sp setup.cfg flat_tree/ test/
|
|
||||||
|
|
||||||
[testenv:format]
|
[testenv:format]
|
||||||
description = format the source
|
description = format the source
|
||||||
skipdist = True
|
skipdist = True
|
||||||
basepython = python3.6
|
basepython = python3.6
|
||||||
deps =
|
deps = black
|
||||||
black
|
commands = black {posargs:--check} flat_tree/ test/
|
||||||
commands =
|
|
||||||
black {posargs:--check} flat_tree/ test/
|
|
||||||
|
|
||||||
[testenv:type]
|
[testenv:type]
|
||||||
description = type check the source
|
description = type check the source
|
||||||
basepython = python3.7
|
basepython = python3.7
|
||||||
skipdist = True
|
skipdist = True
|
||||||
deps =
|
deps = mypy
|
||||||
mypy
|
commands = mypy flat_tree/ test/
|
||||||
commands =
|
|
||||||
mypy flat_tree/ test/
|
|
||||||
|
|
||||||
[testenv:docs]
|
[testenv:docs]
|
||||||
description = build the documentation
|
description = build the documentation
|
||||||
deps =
|
extras = docs
|
||||||
sphinx
|
commands = python -m setup build_sphinx
|
||||||
sphinx-autodoc-typehints >= 1.6.0, < 2.0
|
|
||||||
commands =
|
|
||||||
python -m setup build_sphinx
|
|
||||||
|
|
||||||
[testenv:changelog]
|
[testenv:changelog]
|
||||||
description = draft the changelog
|
description = draft the changelog
|
||||||
skipdist = True
|
skipdist = True
|
||||||
deps =
|
deps = towncrier
|
||||||
towncrier
|
commands = towncrier --draft
|
||||||
commands =
|
|
||||||
towncrier --draft
|
|
||||||
|
|
||||||
[testenv:metadata-release]
|
[testenv:metadata-release]
|
||||||
description = validate the package metadata
|
description = validate the package metadata
|
||||||
deps =
|
deps = twine
|
||||||
twine
|
commands = twine check {toxworkdir}/dist/*
|
||||||
commands =
|
|
||||||
twine check .tox/dist/*
|
|
||||||
|
|
||||||
[testenv:release]
|
[testenv:release]
|
||||||
description = make a release
|
description = make a release
|
||||||
deps =
|
deps = {[testenv:metadata-release]deps}
|
||||||
{[testenv:metadata-release]deps}
|
|
||||||
commands =
|
commands =
|
||||||
python -m setup sdist bdist_wheel
|
python -m setup sdist bdist_wheel
|
||||||
twine upload {toxworkdir}/dist/*
|
twine upload {toxworkdir}/dist/*
|
||||||
|
Loading…
Reference in New Issue
Block a user