Skip to content

Commit

Permalink
Merge pull request #8 from NCAR-CISL-ASAP/hifreqTesting
Browse files Browse the repository at this point in the history
Merging high-frequency testing branch into master
  • Loading branch information
Kevin Paul committed Oct 5, 2015
2 parents 55e1fb0 + fbc1f1a commit d319a25
Show file tree
Hide file tree
Showing 30 changed files with 27,474 additions and 6,252 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
*.pyc
dist/
build/
PyReshaper.egg-info/
PyReshaper.egg-info/
/.settings/
2 changes: 2 additions & 0 deletions .pydevproject
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,7 @@
<pydev_property name="org.python.pydev.PYTHON_PROJECT_INTERPRETER">Homebrew Python 2.7</pydev_property>
<pydev_pathproperty name="org.python.pydev.PROJECT_SOURCE_PATH">
<path>/${PROJECT_DIR_NAME}/source</path>
<path>/${PROJECT_DIR_NAME}/tests/yellowstone/utilities</path>
<path>/${PROJECT_DIR_NAME}/tests/yellowstone</path>
</pydev_pathproperty>
</pydev_project>
11 changes: 11 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -85,3 +85,14 @@ VERSION 0.9.4

29 June 2015:
- Newly automated versioning information

1 October 2015:
- Bugfixes, performance improvements
- New yellowstone testing code

2 October 2015:
- Now measures read/write times separately in diagnostic data
- Performance improvement (no explicit loop over time-steps in a time-slice
file needed)
- Enabling user-defined compression level for NetCDF4 output

6 changes: 3 additions & 3 deletions LICENSE.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Corporation for Atmospheric Research ("UCAR").

1. **License Grant to Technology.** UCAR grants to Licensee a restricted, royalty-free, perpetual, nonexclusive,
nontransferable, noncommercial license to copy, modify, enhance, improve and use the NCAR PyReshaper code set for
transforming NetCDF time-slice datasets into NetCDF time-series format provided in source code format (Technology)
transforming NetCDF time-slice datasets into NetCDF time-series format provided in source code format (**Technology**)
for research purposes and for collaborating with UCAR only; provided, however, that Licensee does not commercialize,
sell, license, distribute, or transfer the Technology, or any work that contains the Technology. Licensee may freely
use the data and results from the Technology. Licensee shall note in all publications of data or results that this
Expand All @@ -30,7 +30,7 @@ Corporation for Atmospheric Research ("UCAR").
Technology, sublicense, display, and distribute your Contributions. You represent that you are legally entitled to grant the
above license. If your employer(s) has rights to intellectual property that you create that includes your Contributions, you
acknowledge that you are allowed to make Contributions on behalf of that employer.
5. **Disclaimer of Warranty/Noninfringement.** THE TECHNOLOGY IS SUPPLIED AS IS WITHOUT WARRANTY OF ANY KIND. UCAR DISCLAIMS
5. **Disclaimer of Warranty/Noninfringement.** THE TECHNOLOGY IS SUPPLIED **AS IS** WITHOUT WARRANTY OF ANY KIND. UCAR DISCLAIMS
ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION, ANY IMPLIED WARRANTIES OF NONINFRINGEMENT, ORIGINALITY,
MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE WITH REGARD TO THE TECHNOLOGY PROVIDED HEREUNDER. UCAR MAKES NO
REPRESENTATIONS THAT THE USE, OPERATION, SALE, PERFORMANCE, MODIFICATION, REPRODUCTION, DISPLAY OF THE TECHNOLOGY WILL
Expand All @@ -45,7 +45,7 @@ Corporation for Atmospheric Research ("UCAR").
intended for use in any operational activities including activities or hazardous environments requiring fail-safe
performance, such as in aircraft navigation or communication systems, air traffic control, weapons systems, nuclear
power plants or critical 24/7 operations, in which the failure of the Technology could lead directly to death, personal
injury, or severe physical or environmental damage (High Risk Activities). Accordingly, UCAR specifically disclaims
injury, or severe physical or environmental damage (**High Risk Activities**). Accordingly, UCAR specifically disclaims
any express or implied warranties of fitness for High Risk Activities. You agree that UCAR shall not be liable for any
claims or damages arising from High Risk Activities.
8. **Controlling Law.** This Agreement shall be governed by the laws of the State of Colorado and of the United States.
31 changes: 18 additions & 13 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ so problems might occur if an earlier versions of these packages have been
installed.


Easy Installation
-----------------
Easy Installation with PIP
--------------------------

The easiest way to install the ASAP Python Toolbox is from the Python
Package Index (PyPI) with the pip package manager::
Expand All @@ -64,40 +64,45 @@ The optional '--user' argument can be used to install the package in the
local user's directory, which is useful if the user doesn't have root
privileges.

One should be careful, however, as the PyPI packages may not always be up
to date. We recommend obtaining the most recent versions of the PyReshaper
from the GitHub site shown in the section below.


Obtaining the Source Code
-------------------------

Currently, the most up-to-date development source code is available via git from the site::
Currently, the most up-to-date development source code is available
via git from the site::

https://github.com/NCAR-CISL-ASAP/PyReshaper

Check out the most recent stable tag. The source is available in read-only mode to
everyone, but special permissions can be given to those to make changes to the source.
Check out the most recent stable tag. The source is available in
read-only mode to everyone. Developers are welcome to update the source
and submit Pull Requests via GitHub.


Building & Installation
-----------------------
Building & Installing from Source
---------------------------------

Installation of the PyReshaper is very simple. After checking out the source
from the above svn link, via::

$ git clone https://github.com/NCAR-CISL-ASAP/PyReshaper
Enter the newly cloned directory and check out the most recent stable tag::
Enter the newly cloned directory::

$ cd PyReshaper
$ git checkout [latest tag]

Then, run the Python distutils setup. On unix, this involves::
Then, run the Python setuptools setup script. On unix, this involves::

$ python setup.py install [--prefix=/path/to/install/location]
The prefix is optional, as the default prefix is typically /usr/local on
linux machines. However, you must have permissions to write to the prefix
location, so you may want to choose a prefix location where you have write
permissions. Like most distutils installations, you can alternatively
install the pyReshaper with the --user option, which will automatically
install the PyReshaper with the '--user' option, which will automatically
select (and create if it does not exist) the $HOME/.local directory in which
to install. To do this, type (on unix machines)::

Expand Down Expand Up @@ -150,6 +155,6 @@ Instructions & Use
------------------

Please see the more detailed instructions found in the docs/ directory for
usage and examples. See the 'Building & Installation' section for how to
build the documentation with Sphinx.
usage and examples. See the 'Building & Installing from Source' section
for how to build the documentation with Sphinx.

38 changes: 30 additions & 8 deletions bin/slice2series
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,12 @@ Copyright 2015, University Corporation for Atmospheric Research
See the LICENSE.rst file for details
"""

# Builtin Modules
import optparse
import glob
import cPickle as pickle

# Package Modules
from pyreshaper import specification
from pyreshaper import reshaper

Expand Down Expand Up @@ -58,6 +62,11 @@ def cli():
action='store_true', dest='overwrite',
help='Whether to overwrite existing output files. '
'[Default: False]')
parser.add_option('--specfile', default=None,
help='Allows the user to use a Pickled Specifier (file) '
'as input to the script, instead of the command-'
'line options and arguments.'
'[Default: None]')
parser.add_option('-v', '--verbosity', default=1, type='int',
help='Verbosity level for level of output. A value of 0 '
'means no output, and a value greater than 0 means '
Expand All @@ -77,20 +86,33 @@ def cli():
#==============================================================================
def main(options, input_file_list):

# Create the input object for the Reshaper
spec = specification.create_specifier()
# Check for a Specifier file
if options.specfile:

# Try importing the file
try:
spec = pickle.load(open(options.specfile, 'rb'))
except:
err_msg = "Specifier File '" + str(options.specfile) + "' " + \
"could not be opened and read"
raise RuntimeError(err_msg)

else:

# Create the input object for the Reshaper
spec = specification.create_specifier()

# Generate the input file list from (potentially) globs/wildcards
full_input_file_list = []
for arg in input_file_list:
full_input_file_list.extend(glob.glob(arg))

# Add input to the specifier
spec.input_file_list = full_input_file_list
spec.netcdf_format = options.netcdf_format
spec.output_file_prefix = options.output_prefix
spec.output_file_suffix = options.output_suffix
spec.time_variant_metadata = options.metadata
# Add input to the specifier
spec.input_file_list = input_file_list
spec.netcdf_format = options.netcdf_format
spec.output_file_prefix = options.output_prefix
spec.output_file_suffix = options.output_suffix
spec.time_variant_metadata = options.metadata

# Create the PyReshaper object
reshpr = reshaper.create_reshaper(spec,
Expand Down
2 changes: 1 addition & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
# The short X.Y version.
version = '0.9'
# The full version, including alpha/beta/rc tags.
release = '0.9.3'
release = '0.9.4'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
Loading

0 comments on commit d319a25

Please sign in to comment.