Skip to content

Commit

Permalink
Revisions to documentation and packaging settings.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryan Helinski committed Mar 19, 2018
1 parent 024bab8 commit be9daa2
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 12 deletions.
54 changes: 46 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,18 +58,47 @@ This package is tested with Python versions 2.7 and 3.6.
Installation:
* Python http://python.org/
* GCC http://gcc.gnu.org/
* libgmp http://gmplib.org/
* GMP http://gmplib.org/ or MPIR on Windows http://mpir.org/
* bitstring http://pythonhosted.org/bitstring/
* NumPy http://numpy.org/

For running tests:
* pytest http://pytest.org/
* mock https://pypi.org/project/mock/ if using Python 2


Installation
------------
Install from pip
----------------

This package includes a C extension which has to be compiled for each platform.
Python wheels include compiled binary code and allow the extension to be
installed without requiring a compiler.

`pip >= 1.4` with `setuptools >= 0.8` will use a wheel if there is one available
for the target platform:
```
pip install --user BiEntropy
```

You will need to install the GMP library if not installing from a wheel.
Once installed, the tests can be run with pytest:
```
pytest --pyargs bientropy
```
or:
```
python -m pytest --pyargs bientropy
```


Install from Source
-------------------

The source code for the `bientropy` package can be cloned or downloaded from:
* GitHub: https://github.com/sandialabs/bientropy
* PyPI: https://pypi.org/project/BiEntropy

The [GMP library](http://gmplib.org/) headers need to be installed before
compiling.

On Debian/Ubuntu:
```
Expand All @@ -86,18 +115,27 @@ Then, use `setup.py` to compile and install the package:
python setup.py install
```

Optionally, you can run the unit tests with the following command:
Optionally, the unit tests can be run with the following command:
```
python setup.py test
```

You can test your installation with this command:

Included Scripts
----------------

After installing, a demonstration can be run with this command:
```
python -m bientropy.demo
```
This file (`bientropy/demo.py`) also serves as a good example for using
the package.

This file (`bientropy/demo.py`) also serves as a good starting point for using
the code.
The same benchmark script used to generate the data shown in the table and plot
above is also included. It can be run with:
```
python -m bientropy.benchmark
```


Development
Expand Down
3 changes: 1 addition & 2 deletions bientropy/test_suite.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,10 +216,9 @@ def test_error_empty():
$ pytest
or if pytest is not in your path variable:
$ python -m pytest
If the bientropy package is already installed, run the tests with:
$ pytest --pyargs bientropy
or if pytest is not in your path variable:
$ python -m pytest --pyargs bientropy
""")

3 changes: 1 addition & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,13 @@
test_requirements.append('mock')

setup(name='BiEntropy',
version='1.0',
version='1.0.3',
description='High-performance implementations of BiEntropy metrics '
'proposed by Grenville J. Croll',
ext_modules=[MODULE],
url='https://github.com/sandialabs/bientropy',
author='Ryan Helinski',
author_email='[email protected]',
license='GPLv3',
keywords='entropy randomness statistics',
headers=['ext/bientropy.h'],
packages=['bientropy'],
Expand Down

0 comments on commit be9daa2

Please sign in to comment.