Skip to content

Commit

Permalink
readme and pypi metdata updates. Forgot to include _load_data() in Sp…
Browse files Browse the repository at this point in the history
…ec.__init__ method.
  • Loading branch information
underchemist committed Dec 26, 2015
1 parent 9df5970 commit fc91606
Show file tree
Hide file tree
Showing 4 changed files with 109 additions and 37 deletions.
101 changes: 101 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
|Build Status| |Coverage Status| # nanonispy

A small library written in python 3 to parse Nanonis binary and ascii
files.

Requirements
------------

Currently written and tested with - python 3.5 - python 3.4

Depends on - numpy

Will continue making tests that are actually useful and maybe will make
this a conda/pip build.

Install
-------

pip
~~~

::

pip install nanonispy

conda
~~~~~

::

conda install --channel https://conda.anaconda.org/underchemist nanonispy

github
~~~~~~

Simply clone this repo and run

::

python setup.py install

Basic usage
-----------

Once installed, you should be able to import it to any python script or
ipython session.

.. code:: python
import nanonispy as nap
Then given a file,

.. code:: python
grid = nap.read.Grid('/path/to/datafile.3ds')
You can look at the attributes and methods to determine the information
available.

Running tests
-------------

Similar to the install, except run

::

python setup.py test

. If you have the nose module installed, it's as simple as

::

nosetests

.

You can also see coverage of the tests as well as ignore the test
discovery of numpy core packages (don't quite understand why it does
this) with

::

nosetests --with-coverage --cover-branches --cover-package=nanonispy

.

*I don't know how to turn tests without nose...*

To do
-----

- homogenize grid and scan header keys, right now header formats are
pretty different and I'm to lazy to do it myself.
- more relevant tests
- saving methods

.. |Build Status| image:: https://travis-ci.org/underchemist/nanonispy.svg?branch=master
:target: https://travis-ci.org/underchemist/nanonispy
.. |Coverage Status| image:: https://coveralls.io/repos/underchemist/nanonispy/badge.svg?branch=master&service=github
:target: https://coveralls.io/github/underchemist/nanonispy?branch=master
1 change: 1 addition & 0 deletions nanonispy/read.py
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,7 @@ def __init__(self, fname):
_is_valid_file(fname, ext='dat')
super().__init__(fname)
self.header = _parse_dat_header(self.header_raw)
self.signals = self._load_data()

def _load_data(self):
"""
Expand Down
2 changes: 2 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[metadata]
description-file=README.rst
42 changes: 5 additions & 37 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,65 +4,33 @@
here = path.abspath(path.dirname(__file__))

# Get the long description from the README file
with open(path.join(here, 'README.md')) as f:
with open(path.join(here, 'README.rst')) as f:
long_description = f.read()
version = '1.0'
version = '1.0.1'

setup(
name='nanonispy',

# Versions should comply with PEP440. For a discussion on single-sourcing
# the version across setup.py and the project code, see
# https://packaging.python.org/en/latest/single_source_version.html
version=version,

description='Library to parse Nanonis files.',
long_description=long_description,

# The project's main homepage.
url='https://github.com/underchemist/nanonispy',

# Download url
download_url = 'https://github.com/underchemist/nanonispy/tarball/'+version,

# Author details
author='Yann-Sebastien Tremblay-Johnston',
author_email='yanns.tremblay@gmail.com',

# Choose your license
license='MIT',
platforms=['any'],

# See https://pypi.python.org/pypi?%3Aaction=list_classifiers
classifiers=[
# How mature is this project? Common values are
# 3 - Alpha
# 4 - Beta
# 5 - Production/Stable
'Development Status :: 3 - Alpha',

# Indicate who your project is intended for
'Intended Audience :: Developers',
'Development Status :: 4 - Beta',
'Intended Audience :: Science/Research',
'Topic :: Scientific/Engineering :: Physics',

# Pick your license as you wish (should match "license" above)
'License :: OSI Approved :: MIT License',

# Specify the Python versions you support here. In particular, ensure
# that you indicate whether you support Python 2, Python 3 or both.
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5'
],

# What does your project relate to?
keywords='data science numpy binary file parse',

# You can just specify the packages manually here if your project is
# simple. Or you can use find_packages().
packages=['nanonispy', 'nanonispy.tests'],

# If there are data files included in your packages that need to be
# installed, specify them here. If using Python 2.6 or less, then these
# have to be included in MANIFEST.in as well.
package_data={
'nanonispy': ['LICENSE', 'README.md'],
},
Expand Down

0 comments on commit fc91606

Please sign in to comment.