New Sphinx theme and better docs
This commit is contained in:
parent
4254c262fe
commit
72b19a2919
@ -0,0 +1,17 @@
|
|||||||
|
Hypercore_Crypto 0.0.1a2 (2019-11-03)
|
||||||
|
=====================================
|
||||||
|
|
||||||
|
Improved Documentation
|
||||||
|
---------------------
|
||||||
|
|
||||||
|
- New Sphinx theme.
|
||||||
|
- Add a changelog.
|
||||||
|
|
||||||
|
|
||||||
|
Hypercore_Crypto 0.0.1a1 (2019-10-05)
|
||||||
|
=====================================
|
||||||
|
|
||||||
|
Project Announcements
|
||||||
|
---------------------
|
||||||
|
|
||||||
|
- The first alpha development release is made!
|
@ -33,8 +33,36 @@ Type check source
|
|||||||
|
|
||||||
tox -e type
|
tox -e type
|
||||||
|
|
||||||
Release Process
|
Build the documentation
|
||||||
---------------
|
-----------------------
|
||||||
|
|
||||||
|
.. code-block:: bash
|
||||||
|
|
||||||
|
$ tox -e docs
|
||||||
|
$ tox -e docs-livereload
|
||||||
|
|
||||||
|
Make a new release
|
||||||
|
------------------
|
||||||
|
|
||||||
|
Ensure metadata for packaging is correct.
|
||||||
|
|
||||||
|
.. code-block:: bash
|
||||||
|
|
||||||
|
$ tox -e metadata-release
|
||||||
|
|
||||||
|
Generate the changelog with the next target version.
|
||||||
|
|
||||||
|
.. code-block:: bash
|
||||||
|
|
||||||
|
$ export VERSION=1.0.1 tox -e changelog
|
||||||
|
|
||||||
|
Make a new Git tag.
|
||||||
|
|
||||||
|
.. code-block:: bash
|
||||||
|
|
||||||
|
$ git tag -a 1.0.1
|
||||||
|
|
||||||
|
And finally, make a new release.
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
|
26
README.rst
26
README.rst
@ -29,22 +29,11 @@ hypercore-crypto
|
|||||||
Cryptography primitives for Hypercore
|
Cryptography primitives for Hypercore
|
||||||
-------------------------------------
|
-------------------------------------
|
||||||
|
|
||||||
Cryptography primitives for `Hypercore`_ (WIP).
|
Cryptography primitives for Hypercore.
|
||||||
|
|
||||||
.. _Hypercore: https://hypercore.readthedocs.io
|
Part of the `Datpy`_ project.
|
||||||
|
|
||||||
.. _example:
|
.. _Datpy: https://datpy.decentral1.se/
|
||||||
|
|
||||||
Example
|
|
||||||
*******
|
|
||||||
|
|
||||||
.. code-block:: python
|
|
||||||
|
|
||||||
from hypercore_crypto import key_pair, sign, verify
|
|
||||||
|
|
||||||
public_key, secret_key = key_pair()
|
|
||||||
signature = sign(b'hello world', secret_key)
|
|
||||||
verify(message, signature, public_key)
|
|
||||||
|
|
||||||
.. _documentation:
|
.. _documentation:
|
||||||
|
|
||||||
@ -54,12 +43,3 @@ Documentation
|
|||||||
* `hypercore-crypto.readthedocs.io`_
|
* `hypercore-crypto.readthedocs.io`_
|
||||||
|
|
||||||
.. _hypercore-crypto.readthedocs.io: https://hypercore-crypto.readthedocs.io/
|
.. _hypercore-crypto.readthedocs.io: https://hypercore-crypto.readthedocs.io/
|
||||||
|
|
||||||
Mirroring
|
|
||||||
*********
|
|
||||||
|
|
||||||
* `hack.decentral1.se/datpy/hypercore-crypto`_
|
|
||||||
* `github.com/datpy/hypercore-crypto`_
|
|
||||||
|
|
||||||
.. _hack.decentral1.se/datpy/hypercore-crypto: https://hack.decentral1.se/datpy/hypercore-crypto
|
|
||||||
.. _github.com/datpy/hypercore-crypto: https://github.com/datpy/hypercore-crypto
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
author = 'decentral1se'
|
author = 'decentral1se'
|
||||||
copyright = '2019, decentral1se'
|
copyright = '2019, decentral1se'
|
||||||
html_static_path = ['_static']
|
html_static_path = ['_static']
|
||||||
html_theme = 'alabaster'
|
html_theme = 'sphinx_rtd_theme'
|
||||||
master_doc = 'index'
|
master_doc = 'index'
|
||||||
project = 'hypercore-crypto'
|
project = 'hypercore-crypto'
|
||||||
templates_path = ['_templates']
|
templates_path = ['_templates']
|
||||||
|
13
documentation/source/example.rst
Normal file
13
documentation/source/example.rst
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
.. _example:
|
||||||
|
|
||||||
|
*******
|
||||||
|
Example
|
||||||
|
*******
|
||||||
|
|
||||||
|
.. code-block:: python
|
||||||
|
|
||||||
|
from hypercore_crypto import key_pair, sign, verify
|
||||||
|
|
||||||
|
public_key, secret_key = key_pair()
|
||||||
|
signature = sign(b'hello world', secret_key)
|
||||||
|
verify(message, signature, public_key)
|
@ -1,12 +1,13 @@
|
|||||||
.. include:: ../../README.rst
|
.. include:: ../../README.rst
|
||||||
:end-before: _documentation
|
:end-before: _documentation
|
||||||
|
|
||||||
Table of Contents
|
|
||||||
*****************
|
|
||||||
|
|
||||||
.. toctree::
|
.. toctree::
|
||||||
|
:maxdepth: 1
|
||||||
|
:hidden:
|
||||||
|
|
||||||
install
|
install
|
||||||
|
upgrade
|
||||||
|
example
|
||||||
modules-api
|
modules-api
|
||||||
other-impls
|
other-impls
|
||||||
contribute
|
contribute
|
||||||
|
@ -1,7 +1,11 @@
|
|||||||
.. _other-implementations:
|
.. _other-implementations:
|
||||||
|
|
||||||
|
*********************
|
||||||
Other Implementations
|
Other Implementations
|
||||||
*********************
|
*********************
|
||||||
|
|
||||||
* https://github.com/mafintosh/hypercore-crypto
|
* `mafintosh/hypercore-crypto`_
|
||||||
* https://github.com/datcxx/hypercore-crypto
|
* `datcxx/hypercore-crypto`_
|
||||||
|
|
||||||
|
.. _mafintosh/hypercore-crypto: https://github.com/mafintosh/hypercore-crypto
|
||||||
|
.. _datcxx/hypercore-crypto: https://github.com/datcxx/hypercore-crypto
|
||||||
|
7
documentation/source/upgrade.rst
Normal file
7
documentation/source/upgrade.rst
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
*******
|
||||||
|
Upgrade
|
||||||
|
*******
|
||||||
|
|
||||||
|
.. code-block:: bash
|
||||||
|
|
||||||
|
$ pip install --upgrade hypercore-crypto
|
@ -15,8 +15,8 @@ include = '\.pyi?$'
|
|||||||
[tool.towncrier]
|
[tool.towncrier]
|
||||||
directory = 'changelog/'
|
directory = 'changelog/'
|
||||||
filename = 'CHANGELOG.rst'
|
filename = 'CHANGELOG.rst'
|
||||||
package = 'hypercore-crypto'
|
package = 'hypercore_crypto'
|
||||||
package_dir = 'hypercore-crypto'
|
package_dir = 'hypercore_crypto'
|
||||||
|
|
||||||
[[tool.towncrier.type]]
|
[[tool.towncrier.type]]
|
||||||
directory = 'removal'
|
directory = 'removal'
|
||||||
|
@ -58,6 +58,7 @@ warning-is-error = True
|
|||||||
[options.extras_require]
|
[options.extras_require]
|
||||||
docs =
|
docs =
|
||||||
sphinx
|
sphinx
|
||||||
|
sphinx_rtd_theme
|
||||||
sphinx-autodoc-typehints >= 1.6.0, < 2.0
|
sphinx-autodoc-typehints >= 1.6.0, < 2.0
|
||||||
changelog =
|
changelog =
|
||||||
towncrier <= 19.2.0, < 20.0
|
towncrier <= 19.2.0, < 20.0
|
||||||
|
27
tox.ini
27
tox.ini
@ -52,20 +52,37 @@ skipdist = True
|
|||||||
extras = docs
|
extras = docs
|
||||||
commands = python -m setup build_sphinx
|
commands = python -m setup build_sphinx
|
||||||
|
|
||||||
|
[testenv:docs-livereload]
|
||||||
|
description = invoke sphinx-autobuild to build and reload the documentation
|
||||||
|
commands = python -m sphinx_autobuild documentation/source documentation/build
|
||||||
|
deps = sphinx-autobuild>=0.7.1,<1.0
|
||||||
|
extras = docs
|
||||||
|
|
||||||
[testenv:changelog]
|
[testenv:changelog]
|
||||||
description = draft the changelog
|
description = draw up the new changelog
|
||||||
skipdist = True
|
skipdist = True
|
||||||
extras = changelog
|
passenv = VERSION
|
||||||
commands = towncrier --draft
|
deps = towncrier
|
||||||
|
commands = towncrier --version={env:VERSION} {posargs}
|
||||||
|
|
||||||
[testenv:metadata-release]
|
[testenv:metadata-release]
|
||||||
description = validate the package metadata
|
description = validate the package metadata
|
||||||
deps = twine
|
deps = twine
|
||||||
commands = twine check {toxworkdir}/dist/*
|
commands =
|
||||||
|
rm -rf {toxworkdir}/dist
|
||||||
|
python -m setup sdist --dist-dir {toxworkdir}/dist bdist_wheel
|
||||||
|
python -m setup sdist --dist-dir {toxworkdir}/dist bdist_egg
|
||||||
|
twine check {toxworkdir}/dist/*
|
||||||
|
whitelist_externals =
|
||||||
|
rm
|
||||||
|
|
||||||
[testenv:release]
|
[testenv:release]
|
||||||
description = make a release
|
description = make a release
|
||||||
deps = {[testenv:metadata-release]deps}
|
deps = {[testenv:metadata-release]deps}
|
||||||
commands =
|
commands =
|
||||||
python -m setup sdist bdist_wheel
|
rm -rf {toxworkdir}/dist
|
||||||
|
python -m setup sdist --dist-dir {toxworkdir}/dist bdist_wheel
|
||||||
|
python -m setup sdist --dist-dir {toxworkdir}/dist bdist_egg
|
||||||
twine upload {toxworkdir}/dist/*
|
twine upload {toxworkdir}/dist/*
|
||||||
|
whitelist_externals =
|
||||||
|
rm
|
||||||
|
Loading…
Reference in New Issue
Block a user