diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 494975f..1915f69 100644 --- a/CHANGELOG.txt +++ b/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 diff --git a/README.rst b/README.rst index 38ad5ea..d4e64d7 100644 --- a/README.rst +++ b/README.rst @@ -5,6 +5,9 @@ Compression/decompression command-line tool and Python package for Gaussian CUBE files, exploiting the capabilities of the `HDF5 `__ binary format via ``h5py``. +Branches named with the prefix ``v.`` are volatile. The history +there may be rewritten dramatically, without warning. + Available on `PyPI `__ (``pip install h5cube``). diff --git a/doc/source/conf.py b/doc/source/conf.py index f1f2ba8..311b27e 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -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. diff --git a/h5cube/__init__.py b/h5cube/__init__.py index 8a1dc67..88ac510 100644 --- a/h5cube/__init__.py +++ b/h5cube/__init__.py @@ -18,5 +18,5 @@ from .h5cube import cube_to_h5, h5_to_cube, H5, EXIT -__version__ = '0.1.post1' +__version__ = '0.1.post2' diff --git a/h5cube/h5cube.py b/h5cube/h5cube.py index e45d352..b99985e 100644 --- a/h5cube/h5cube.py +++ b/h5cube/h5cube.py @@ -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), @@ -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]), @@ -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]), @@ -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]), @@ -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 " @@ -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 " diff --git a/setup.py b/setup.py index d6255ae..37dda53 100644 --- a/setup.py +++ b/setup.py @@ -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', @@ -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',