From 86f8b2f665b88ae36353a6ead0945a4928a8b3b2 Mon Sep 17 00:00:00 2001 From: Vincent Texier <vit@free.fr> Date: Thu, 19 Jul 2018 12:20:50 +0200 Subject: [PATCH] issue #56 Update generating sphinx html documentation --- .gitignore | 4 ++++ README.rst | 16 +++++++++++----- duniterpy/api/bma/__init__.py | 2 +- duniterpy/documents/block.py | 2 +- requirements_dev.txt | 2 ++ 5 files changed, 19 insertions(+), 7 deletions(-) create mode 100644 requirements_dev.txt diff --git a/.gitignore b/.gitignore index b2883034..07e928e3 100644 --- a/.gitignore +++ b/.gitignore @@ -35,3 +35,7 @@ nosetests.xml .project .pydevproject .idea +.python-version +docs/_build +docs/duniterpy.* + diff --git a/README.rst b/README.rst index 85150556..d757a834 100644 --- a/README.rst +++ b/README.rst @@ -39,20 +39,28 @@ Development curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash` +* Install dependencies:: + + pip install -r requirements.txt + * Add PYTHONPATH env var to your shell containing the path to this repository -* Run unit tests with :: +* Run unit tests with:: python -m unittest * Take a look at examples folder -* Run examples from parent folder :: +* Run examples from parent folder:: python examples/request_data.py Documentation ------------- -* `HTML Documentation <https://git.duniter.org/clients/python/duniterpy/tree/master/docs/_build/html>`_ +* Install Sphinx:: + + pip install -r requirements_dev.txt + +* HTML Documentation is generated in docs/_build/html folder. * `Examples <https://git.duniter.org/clients/python/duniterpy/tree/master/examples>`_ Packaging and deploy @@ -61,8 +69,6 @@ Packaging and deploy Pypi ++++ -*The README file must be in RestructuredText format (README.rst) for the long description field of the package.* - In the development pyenv environment, install the following tools:: pip install --upgrade pip setuptools wheel diff --git a/duniterpy/api/bma/__init__.py b/duniterpy/api/bma/__init__.py index a1fae4d5..37ba3820 100644 --- a/duniterpy/api/bma/__init__.py +++ b/duniterpy/api/bma/__init__.py @@ -18,7 +18,7 @@ import logging from . import network, blockchain, tx, wot, node, ud, ws -__all__ = [network, blockchain, tx, wot, node, ud, ws] +__all__ = ['network', 'blockchain', 'tx', 'wot', 'node', 'ud', 'ws'] PROTOCOL_VERSION = 2 diff --git a/duniterpy/documents/block.py b/duniterpy/documents/block.py index 0d751ea2..9487c495 100644 --- a/duniterpy/documents/block.py +++ b/duniterpy/documents/block.py @@ -183,8 +183,8 @@ The class Block handles Block documents. 'Transactions': re_transactions, 'InnerHash': re_hash, 'Noonce': re_noonce, + } } - } Empty_Hash = "E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855" diff --git a/requirements_dev.txt b/requirements_dev.txt new file mode 100644 index 00000000..fe4bbdea --- /dev/null +++ b/requirements_dev.txt @@ -0,0 +1,2 @@ +sphinx + -- GitLab