diff --git a/.gitignore b/.gitignore index b28830349470d8a016875e26ada3b6e08ce82c0b..07e928e33cb0d1be89048a42df20779e606277c3 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 8515055620c9aa4899623e4db3f2b13ed65947aa..d757a834168773e932d45db0d888fb2ab8b0347f 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 a1fae4d59a6566eee67a0f6c358ccace21773efc..37ba38208fdcf9c775a434edbef223073a4c9679 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 0d751ea2d3c213df8a88a16f63eb8a7ce448440b..9487c495a1da6363a0bff96cadc6a47d34625fff 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 0000000000000000000000000000000000000000..fe4bbdeaa1d4cdb3849bc81a2eb5e29abf9b8ed4 --- /dev/null +++ b/requirements_dev.txt @@ -0,0 +1,2 @@ +sphinx +