Skip to content

Commit

Permalink
Merge branch 'hotfix-fname'
Browse files Browse the repository at this point in the history
  • Loading branch information
bskinn committed Aug 29, 2016
2 parents b0bd2a0 + 0205e4b commit 859b0ba
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 18 deletions.
11 changes: 9 additions & 2 deletions CHANGELOG.txt
@@ -1,12 +1,19 @@
Changelog for h5cube

v0.1.post1
v0.1.post2 (29 Aug 2016)
================================================================================

* Improve wording of commandline help messages
* h5cube now ignores case when identifying file extensions


v0.1.post1 (28 Aug 2016)
================================================================================

Administrative fix (typo in setup.py)


v0.1
v0.1 (28 Aug 2016)
================================================================================

Initial beta release, without documentation or a test suite. Below functionality
Expand Down
3 changes: 3 additions & 0 deletions README.rst
Expand Up @@ -5,6 +5,9 @@ Compression/decompression command-line tool and Python package for
Gaussian CUBE files, exploiting the capabilities of the
`HDF5 <http://www.h5py.org/>`__ binary format via ``h5py``.

Branches named with the prefix ``v.`` are volatile. The history
there may be rewritten dramatically, without warning.

Available on `PyPI <https://pypi.python.org/pypi/h5cube>`__
(``pip install h5cube``).

Expand Down
2 changes: 1 addition & 1 deletion doc/source/conf.py
Expand Up @@ -67,7 +67,7 @@
# The short X.Y version.
version = '0.1'
# The full version, including alpha/beta/rc tags.
release = '0.1.post1'
release = '0.1.post2'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
2 changes: 1 addition & 1 deletion h5cube/__init__.py
Expand Up @@ -18,5 +18,5 @@

from .h5cube import cube_to_h5, h5_to_cube, H5, EXIT

__version__ = '0.1.post1'
__version__ = '0.1.post2'

27 changes: 19 additions & 8 deletions h5cube/h5cube.py
Expand Up @@ -349,7 +349,13 @@ def _get_parser():

# Argument for the filename (core parser)
prs.add_argument(AP.PATH, action='store',
help="path to .(h5)cube file to be (de)compressed")
help="path to file to be (de)compressed, where "
"the operation to be performed is hard coded based "
"on the file extension: .cub/.cube files are "
"compressed to .h5cube, .h5cube files are "
"decompressed to .cube, and "
"the program exits with an error "
"on any other extension")

# Argument to delete the source file; default is to keep (core)
prs.add_argument('-{0}'.format(AP.DELETE[0]), '--{0}'.format(AP.DELETE),
Expand All @@ -369,10 +375,12 @@ def _get_parser():
gp_comp.add_argument('-{0}'.format(AP.TRUNC[0]),
'--{0}'.format(AP.TRUNC),
action='store', default=None, type=int,
choices=list(range(1,16)),
choices=list(range(16)),
metavar='#',
help="gzip truncation width for volumetric "
"data (1-15, default {0})".format(DEF.TRUNC))
help="h5py scale-offset filter truncation width "
"for volumetric "
"data (number of mantissa digits retained; "
"0-15, default {0})".format(DEF.TRUNC))

# Absolute thresholding mode (compress -- threshold mode)
meg_threshmode.add_argument('-{0}'.format(AP.ABSMODE[0]),
Expand Down Expand Up @@ -405,7 +413,8 @@ def _get_parser():
nargs=2,
metavar='#',
help="min and max values for "
"threshold specification")
"threshold specification (provide as "
"-m [min] [max])")

# Isovalue/factor threshold specification (compress -- threshold values)
meg_threshvals.add_argument('-{0}'.format(AP.ISOFACTOR[0]),
Expand All @@ -416,7 +425,9 @@ def _get_parser():
metavar='#',
help="Isovalue and multiplicative "
"factor values for "
"threshold specification")
"threshold specification (e.g., "
"'-i 0.002 4' corresponds to "
"'-m 0.0005 0.008')")

# Data block output precision (decompress)
gp_decomp.add_argument('-{0}'.format(AP.PREC[0]),
Expand Down Expand Up @@ -500,7 +511,7 @@ def notNoneFalse(x):
sys.exit(EXIT.CMDLINE)

# Check file extension as indication of execution mode
if ext == '.h5cube':
if ext.lower() == '.h5cube':
# Decompression mode
if compargs:
print("Error: compression arguments passed to "
Expand All @@ -509,7 +520,7 @@ def notNoneFalse(x):

h5_to_cube(path, delsrc=delsrc, prec=prec)

elif ext in ['.cube', '.cub']:
elif ext.lower() in ['.cube', '.cub']:
# Compression mode
if decompargs:
print("Error: decompression arguments passed to "
Expand Down
11 changes: 5 additions & 6 deletions setup.py
Expand Up @@ -2,9 +2,9 @@

setup(
name='h5cube',
version='0.1.post1',
version='0.1.post2',
provides=['h5cube'],
requires=['h5py (>=2.4)'],
requires=['h5py (>=2.4)', 'numpy (>=1.6.1)'],
packages=['h5cube'],
url='https://www.github.com/bskinn/h5cube',
license='MIT License',
Expand All @@ -17,10 +17,9 @@
'Intended Audience :: Science/Research',
'Operating System :: OS Independent',
'Programming Language :: Python :: 3 :: Only',
# 'Programming Language :: Python :: 3.2',
# 'Programming Language :: Python :: 3.3',
# 'Programming Language :: Python :: 3.4',
# 'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Topic :: Scientific/Engineering',
'Topic :: System :: Archiving :: Compression',
'Topic :: Utilities',
Expand Down

0 comments on commit 859b0ba

Please sign in to comment.