Skip to content

Commit

Permalink
MAINT: Preparing for v1.2.0 release
Browse files Browse the repository at this point in the history
  • Loading branch information
jjhelmus committed Feb 3, 2015
1 parent 7a81046 commit 4c66b2c
Show file tree
Hide file tree
Showing 3 changed files with 94 additions and 68 deletions.
9 changes: 9 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
include *.rst
recursive-include doc *
recursive-include examples *.py *.txt
recursive-include pyart *.c *.h *.pyx *.pxd *.f90 *.pyf
include README.rst
include LICENSE.txt
include INSTALL.rst
include pyart/correct/src/UWASHINGTON_4DD_README
include pyart/__check_build/README
114 changes: 63 additions & 51 deletions pyart/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,56 +4,68 @@
"""

# print out helpful message if build fails or importing from source tree
from . import __check_build

# versioning
from .version import git_revision as __git_revision__
from .version import version as __version__

# import subpackages
from . import core
from . import io
from . import correct
from . import graph
from . import map
from . import testing
from . import config
from . import aux_io
from . import retrieve

# root level functions
from .config import load_config
from ._debug_info import _debug_info

# test function setup based on scikit-image test function
import imp as _imp
import os.path as _osp
import functools as _functools

# Detect if we're being called as part of Py-ART's setup procedure
try:
_imp.find_module('nose')
except ImportError:
def _test(verbose=False):
"""
This would invoke the Py-ART test suite, but nose couldn't be
imported so the test suite can not run.
"""
raise ImportError("Could not load nose. Unit tests not available.")
__PYART_SETUP__
except NameError:
__PYART_SETUP__ = False

if __PYART_SETUP__:
import sys as _sys
_sys.stderr.write("Running from Py-ART source directory.\n")
del _sys
else:
def _test(verbose=False):
"""
Invoke the Py-ART test suite.
"""
import nose
pkg_dir = _osp.abspath(_osp.dirname(__file__))
args = ['', pkg_dir, '--exe']
if verbose:
args.extend(['-v', '-s'])
nose.run('pyart', argv=args)

# do not use `test` as function name as this leads to a recursion problem with
# the nose test suite
test = _test
test_verbose = _functools.partial(test, verbose=True)
test_verbose.__doc__ = test.__doc__

# print out helpful message if build fails or importing from source tree
from . import __check_build

# versioning
from .version import git_revision as __git_revision__
from .version import version as __version__

# import subpackages
from . import core
from . import io
from . import correct
from . import graph
from . import map
from . import testing
from . import config
from . import aux_io
from . import retrieve

# root level functions
from .config import load_config
from ._debug_info import _debug_info

# test function setup based on scikit-image test function
import imp as _imp
import os.path as _osp
import functools as _functools

try:
_imp.find_module('nose')
except ImportError:
def _test(verbose=False):
"""
This would invoke the Py-ART test suite, but nose couldn't be
imported so the test suite can not run.
"""
raise ImportError("Could not load nose. Unit tests not available.")
else:
def _test(verbose=False):
"""
Invoke the Py-ART test suite.
"""
import nose
pkg_dir = _osp.abspath(_osp.dirname(__file__))
args = ['', pkg_dir, '--exe']
if verbose:
args.extend(['-v', '-s'])
nose.run('pyart', argv=args)

# do not use `test` as function name as this leads to a recursion problem
# with the nose test suite
test = _test
test_verbose = _functools.partial(test, verbose=True)
test_verbose.__doc__ = test.__doc__
39 changes: 22 additions & 17 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
#!/usr/bin/env python
"""Py-ART: Python ARM Radar Toolkit
Py-ART is a toolkit contains a variety of utilities that can be strung
together to produce applications for:
* Reading Radar data
* Correcting radar data in antenna coordinates
* Mapping data to a Cartesian Grid
* Performing retrievals on this mapped data
* Doing calculations on the retievals
* And finally writing both radial and Cartesian data to documented NetCDF files
The Python ARM Radar Toolkit, Py-ART, is an open source Python module containing
a growing collection of weather radar algorithms and utilities build on top of
the Scientific Python stack and distributed under the 3-Clause BSD license.
Py-ART is used by the Atmospheric Radiation Measurement (ARM) Climate Research
Facility for working with data from a number of precipitation and cloud radars,
but has been designed so that it can be used by others in the radar and
atmospheric communities to examine, processes, and analyse data from many types
of weather radars.
"""

Expand All @@ -30,21 +29,26 @@


CLASSIFIERS = """\
Development Status :: 2 - Pre-Alpha
Development Status :: 5 - Production/Stable
Intended Audience :: Science/Research
Intended Audience :: Developers
License :: OSI Approved :: BSD License
Programming Language :: C
Programming Language :: Python
Programming Language :: Python :: 2
Programming Language :: Python :: 2.6
Programming Language :: Python :: 2.7
Programming Language :: C
Programming Language :: Cython
Programming Language :: Fortran
Topic :: Scientific/Engineering
Topic :: Scientific/Engineering :: Atmospheric Science
Operating System :: Unix
Operating System :: POSIX :: Linux
Operating System :: MacOS
Operating System :: MacOS :: MacOS X
Operating System :: Microsoft :: Windows
"""


NAME = 'pyart'
NAME = 'arm_pyart'
MAINTAINER = "Py-ART Developers"
MAINTAINER_EMAIL = "[email protected]"
DESCRIPTION = DOCLINES[0]
Expand All @@ -55,10 +59,10 @@
CLASSIFIERS = filter(None, CLASSIFIERS.split('\n'))
PLATFORMS = ["Linux", "Mac OS-X", "Unix"]
MAJOR = 1
MINOR = 0
MINOR = 2
MICRO = 0
ISRELEASED = False
VERSION = '%d.%d.%d' % (MAJOR, MINOR, MICRO)
ISRELEASED = True
VERSION = '%d.%d.%drc1' % (MAJOR, MINOR, MICRO)
SCRIPTS = glob.glob('scripts/*')


Expand Down Expand Up @@ -168,6 +172,7 @@ def setup_package():
description=DESCRIPTION,
long_description=LONG_DESCRIPTION,
url=URL,
version=VERSION,
download_url=DOWNLOAD_URL,
license=LICENSE,
classifiers=CLASSIFIERS,
Expand Down

0 comments on commit 4c66b2c

Please sign in to comment.