Merge pull request #1 from datpy/cleanups-gardening

Cleanups on package meta and docs
This commit is contained in:
decentral1se 2019-10-06 15:37:57 +02:00 committed by GitHub
commit 14cf07deef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 69 additions and 74 deletions

View File

@ -3,9 +3,9 @@ language: python
matrix:
include:
- python: 3.6
env: TOXENV=py36-test
env: TOXENV=py36
- python: 3.7
env: TOXENV=py37-test
env: TOXENV=py37
- python: 3.7
env: TOXENV=lint
- python: 3.7

View File

@ -4,7 +4,7 @@ Flat_Tree 0.0.1a3 (2019-07-01)
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)
@ -13,4 +13,4 @@ Flat_Tree 0.0.1a2 (2019-07-01)
Project Announcements
---------------------
- Initial development release is made! (#1)
- The first alpha development release is made!

View File

@ -1,20 +1,16 @@
Get started
-----------
Install `Tox`_ with:
Install `Tox`_.
.. _tox: http://tox.readthedocs.io/
.. code-block:: bash
$ pip install --user tox
Run tests
---------
.. code-block:: bash
tox -e test
tox -e py37
Lint source
-----------
@ -40,28 +36,6 @@ Type check source
Release Process
---------------
Add a change entry and re-generate the changelog:
.. 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

View File

@ -43,17 +43,50 @@ From `The Dat Protocol`_:
them uniquely efficient and convenient to implement in a wide range of
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
*************
* https://flat-tree.readthedocs.io
* `flat-tree.readthedocs.io`_
.. _flat-tree.readthedocs.io: https://flat-tree.readthedocs.io
.. _mirroring:
Mirroring
*********
* https://hack.decentral1.se/datpy/flat-tree (primary)
* https://github.com/datpy/flat-tree
* `hack.decentral1.se/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

View File

@ -3,7 +3,12 @@
Other Implementations
*********************
* https://github.com/mafintosh/flat-tree
* https://github.com/datrs/flat-tree
* https://github.com/bcomnes/flattree
* https://github.com/datcxx/flat-tree
* `mafintosh/flat-tree`_
* `datrs/flat-tree`_
* `bcomnes/flattree`_
* `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

View File

@ -35,7 +35,7 @@ classifiers =
[options]
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 =
setuptools_scm
setuptools_scm_git_archive

51
tox.ini
View File

@ -1,6 +1,6 @@
[tox]
envlist =
{py36,py37}-test
{py36,py37}
lint
sort
format
@ -17,70 +17,53 @@ deps =
pytest
pytest-cov
pytest-mock
commands =
pytest test/ --cov={toxinidir}/flat_tree/ --no-cov-on-fail {posargs}
commands = pytest test/ --cov={toxinidir}/flat_tree/ --no-cov-on-fail {posargs}
[testenv:lint]
description = lint the source
skipdist = True
deps =
flake8
commands =
flake8 {posargs} flat_tree/ test/
deps = flake8
commands = flake8 {posargs} flat_tree/ test/
[testenv:sort]
description = sort the source
skipdist = True
deps =
isort
commands =
isort {posargs:-rc -c} -sp setup.cfg flat_tree/ test/
deps = isort
commands = isort {posargs:-rc -c} -sp setup.cfg flat_tree/ test/
[testenv:format]
description = format the source
skipdist = True
basepython = python3.6
deps =
black
commands =
black {posargs:--check} flat_tree/ test/
deps = black
commands = black {posargs:--check} flat_tree/ test/
[testenv:type]
description = type check the source
basepython = python3.7
skipdist = True
deps =
mypy
commands =
mypy flat_tree/ test/
deps = mypy
commands = mypy flat_tree/ test/
[testenv:docs]
description = build the documentation
deps =
sphinx
sphinx-autodoc-typehints >= 1.6.0, < 2.0
commands =
python -m setup build_sphinx
extras = docs
commands = python -m setup build_sphinx
[testenv:changelog]
description = draft the changelog
skipdist = True
deps =
towncrier
commands =
towncrier --draft
deps = towncrier
commands = towncrier --draft
[testenv:metadata-release]
description = validate the package metadata
deps =
twine
commands =
twine check .tox/dist/*
deps = twine
commands = twine check {toxworkdir}/dist/*
[testenv:release]
description = make a release
deps =
{[testenv:metadata-release]deps}
deps = {[testenv:metadata-release]deps}
commands =
python -m setup sdist bdist_wheel
twine upload {toxworkdir}/dist/*