Skip to content

Commit

Permalink
Update README.rst with one from documentation and symlink each other (#…
Browse files Browse the repository at this point in the history
…61)

Symlink the README.rst in the documentation to the main README.rst of the repository. I originally thought I had done this but when I edited the documentation README.rst, it did not transfer over to the repository README.rst. Copy changes from the documentation README into the main README.
  • Loading branch information
addisonElliott authored Aug 21, 2018
1 parent 8f16b52 commit 221a887
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 127 deletions.
68 changes: 37 additions & 31 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,16 @@
:target: https://doi.org/10.5281/zenodo.62065
:alt: DOI

.. image:: https://img.shields.io/pypi/pyversions/pynrrd.svg
:target: https://img.shields.io/pypi/pyversions/pynrrd.svg
:alt: Python version

.. image:: https://badge.fury.io/py/pynrrd.svg
:target: https://badge.fury.io/py/pynrrd
:alt: PyPi version

|
pynrrd
======
pynrrd is a pure-Python module for reading and writing `NRRD <http://teem.sourceforge.net/nrrd/>`_ files into and
Expand All @@ -17,74 +27,70 @@ The module's only dependency is `numpy <http://numpy.scipy.org/>`_.

Installation
------------

Install via pip and PyPi repository (recommended)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. code-block:: bash
pip install pynrrd
Install via pip and GitHub
~~~~~~~~~~~~~~~~~~~~~~~~~~

.. code-block:: bash
pip install git+https://github.com/mhe/pynrrd.git
Install from source
~~~~~~~~~~~~~~~~~~~
Install from source (recommended for contributing to pynrrd)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
For developers that want to contribute to pynrrd, you can clone the pynrrd repository and install it using the following commands:

.. code-block:: bash
git clone https://github.com/mhe/pynrrd.git
cd pynrrd
pip install .
or, for the last line, instead use:

.. code-block:: bash
python setup.py install
pip install -e .
to install in 'develop' or 'editable' mode, where changes can be made to the local working code and Python will use
the updated pynrrd code.

Example usage
-------------

.. code-block:: python
import numpy as np
import nrrd
# some sample numpy data
# Some sample numpy data
data = np.zeros((5,4,3,2))
filename = 'testdata.nrrd'
# write to a NRRD file
# Write to a NRRD file
nrrd.write(filename, data)
# read the data back from file
readdata, options = nrrd.read(filename)
print readdata.shape
print options
# Read the data back from file
readdata, header = nrrd.read(filename)
print(readdata.shape)
print(header)
Tests
-----

To run the tests:
Run the following command in the base directory to run the tests:

.. code-block:: bash
python -m unittest discover -v nrrd/tests
Bugs and shortcomings
---------------------

Most of the `NRRD format specification <http://teem.sourceforge.net/nrrd/format.html>`_ is implemented. Exceptions
are:

- files where "data file" is "LIST"

Other shortcomings:

- More documentation is desirable, in particular for the options that
can be passed to the write function.
- pynrrd is currently probably fairly forgiving in what it accepts for as
NRRD files and could be made stricter.

Next Steps
----------
For more information, see the `documentation <http://pynrrd.readthedocs.io/>`_.

License
-------

See `LICENSE <https://github.com/mhe/pynrrd/blob/master/LICENSE>`_.
See the `LICENSE <https://github.com/mhe/pynrrd/blob/master/LICENSE>`_ for more information.
96 changes: 0 additions & 96 deletions docs/source/README.rst

This file was deleted.

1 change: 1 addition & 0 deletions docs/source/README.rst

0 comments on commit 221a887

Please sign in to comment.