Skip to content

Commit

Permalink
Merge pull request #1085 from Unidata/v1.5.6rel
Browse files Browse the repository at this point in the history
prepare for v1.5.6 release
  • Loading branch information
jswhit authored Feb 14, 2021
2 parents 947514f + a901113 commit e1694b8
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/miniconda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: [ "3.7", "3.8", "3.9"]
python-version: ["3.6", "3.7", "3.8", "3.9"]
os: [windows-latest, ubuntu-latest, macos-latest]
platform: [x64, x32]
exclude:
Expand Down
4 changes: 2 additions & 2 deletions Changelog
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
version 1.5.6 (not yet released)
==================================
version 1.5.6 (tag v1.5.6rel)
==============================
* move CI/CD tests from travis/appveyor to Github Actions (PR #1061).
* move netCDF4 dir under src so module can be imported in source directory (PR #1062).
* change numpy.bool to numpy.bool_ and numpy.float to numpy.float_ (float and
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
## News
For details on the latest updates, see the [Changelog](https://github.com/Unidata/netcdf4-python/blob/master/Changelog).

2/15/2020: Version [1.5.6](https://pypi.python.org/pypi/netCDF4/1.5.6) released. Added `Dataset.fromcdl` and `Dataset.tocdl`, which require `ncdump` and `ncgen` utilities to be in `$PATH`. Removed python 2.7 support.

12/20/2020: Version [1.5.5.1](https://pypi.python.org/pypi/netCDF4/1.5.5.1) released.
Updated binary wheels for OSX and linux that link latest netcdf-c and hdf5 libs.

Expand Down
17 changes: 9 additions & 8 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -487,11 +487,12 @@ <h2 id="download">Download</h2>
<h2 id="requires">Requires</h2>

<ul>
<li>Python 3.6 or later.</li>
<li><a href="http://numpy.scipy.org">numpy array module</a>, version 1.10.0 or later.</li>
<li><a href="http://cython.org">Cython</a>, version 0.21 or later.</li>
<li><a href="https://pypi.python.org/pypi/setuptools">setuptools</a>, version 18.0 or
later.</li>
<li>The HDF5 C library version 1.8.4-patch1 or higher (1.8.x recommended)
<li>The HDF5 C library version 1.8.4-patch1 or higher
from <a href="ftp://ftp.hdfgroup.org/HDF5/current/src"></a>.
<strong><em>netCDF version 4.4.1 or higher is recommended if using HDF5 1.10.x -
otherwise resulting files may be unreadable by clients using earlier
Expand Down Expand Up @@ -1616,7 +1617,7 @@ <h2 id="in-memory-diskless-datasets">In-memory (diskless) Datasets</h2>
the parallel IO example, which is in <code>examples/mpi_example.py</code>.
Unit tests are in the <code>test</code> directory.</p>

<p><strong>contact</strong>: Jeffrey Whitaker <a href="&#x6d;&#x61;i&#x6c;&#116;&#x6f;&#58;j&#x65;f&#102;r&#101;y&#46;&#115;&#46;&#x77;&#x68;i&#x74;&#x61;k&#x65;&#114;&#x40;&#x6e;&#111;&#x61;&#x61;&#46;g&#x6f;&#118;">j&#x65;f&#102;r&#101;y&#46;&#115;&#46;&#x77;&#x68;i&#x74;&#x61;k&#x65;&#114;&#x40;&#x6e;&#111;&#x61;&#x61;&#46;g&#x6f;&#118;</a></p>
<p><strong>contact</strong>: Jeffrey Whitaker <a href="&#109;&#97;&#105;&#x6c;&#116;&#x6f;&#x3a;&#x6a;&#101;ff&#114;&#x65;&#121;&#x2e;&#x73;&#x2e;&#119;&#x68;&#105;&#116;&#x61;&#107;&#101;&#114;&#64;n&#x6f;&#x61;a.&#x67;&#111;v">&#x6a;&#101;ff&#114;&#x65;&#121;&#x2e;&#x73;&#x2e;&#119;&#x68;&#105;&#116;&#x61;&#107;&#101;&#114;&#64;n&#x6f;&#x61;a.&#x67;&#111;v</a></p>

<p><strong>copyright</strong>: 2008 by Jeffrey Whitaker.</p>

Expand Down Expand Up @@ -2541,8 +2542,8 @@ <h2 id="in-memory-diskless-datasets">In-memory (diskless) Datasets</h2>

<div class="docstring"><p><strong><code>fromcdl(cdlfilename, ncfilename=None, mode='a',format='NETCDF4')</code></strong></p>

<p>call ncgen via subprocess to create Dataset from <a href="https://www.unidata.ucar.edu/software/netcdf/docs/netcdf_utilities_guide.html#cdl_guide">CDL</a>
text representation.</p>
<p>call <code>ncgen</code> via subprocess to create Dataset from <a href="https://www.unidata.ucar.edu/software/netcdf/docs/netcdf_utilities_guide.html#cdl_guide">CDL</a>
text representation. Requires <code>ncgen</code> to be installed and in <code>$PATH</code>.</p>

<p><strong><code>cdlfilename</code></strong>: CDL file.</p>

Expand Down Expand Up @@ -2571,12 +2572,12 @@ <h2 id="in-memory-diskless-datasets">In-memory (diskless) Datasets</h2>

<div class="docstring"><p><strong><code>tocdl(self, coordvars=False, data=False, outfile=None)</code></strong></p>

<p>call ncdump via subprocess to create <a href="https://www.unidata.ucar.edu/software/netcdf/docs/netcdf_utilities_guide.html#cdl_guide">CDL</a>
text representation of Dataset</p>
<p>call <code>ncdump</code> via subprocess to create <a href="https://www.unidata.ucar.edu/software/netcdf/docs/netcdf_utilities_guide.html#cdl_guide">CDL</a>
text representation of Dataset. Requires <code>ncdump</code> to be installed and in <code>$PATH</code>.</p>

<p><strong><code>coordvars</code></strong>: if True, write out coordinate variable data (Default False).</p>
<p><strong><code>coordvars</code></strong>: include coordinate variable data (via <code>ncdump -c</code>). Default False</p>

<p><strong><code>data</code></strong>: if True, write out all variable data (Default False).</p>
<p><strong><code>data</code></strong>: if True, write out variable data (Default False).</p>

<p><strong><code>outfile</code></strong>: If not None, file to output ncdump to. Default is to return a string.</p>
</div>
Expand Down
11 changes: 6 additions & 5 deletions src/netCDF4/_netCDF4.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -3225,8 +3225,8 @@ attribute does not exist on the variable. For example,
"""
**`fromcdl(cdlfilename, ncfilename=None, mode='a',format='NETCDF4')`**
call ncgen via subprocess to create Dataset from [CDL](https://www.unidata.ucar.edu/software/netcdf/docs/netcdf_utilities_guide.html#cdl_guide)
text representation.
call `ncgen` via subprocess to create Dataset from [CDL](https://www.unidata.ucar.edu/software/netcdf/docs/netcdf_utilities_guide.html#cdl_guide)
text representation. Requires `ncgen` to be installed and in `$PATH`.
**`cdlfilename`**: CDL file.
Expand Down Expand Up @@ -3260,8 +3260,8 @@ Dataset instance for `ncfilename` is returned.
"""
**`tocdl(self, coordvars=False, data=False, outfile=None)`**
call ncdump via subprocess to create [CDL](https://www.unidata.ucar.edu/software/netcdf/docs/netcdf_utilities_guide.html#cdl_guide)
text representation of Dataset
call `ncdump` via subprocess to create [CDL](https://www.unidata.ucar.edu/software/netcdf/docs/netcdf_utilities_guide.html#cdl_guide)
text representation of Dataset. Requires `ncdump` to be installed and in `$PATH`.
**`coordvars`**: include coordinate variable data (via `ncdump -c`). Default False
Expand All @@ -3276,7 +3276,8 @@ text representation of Dataset
ncdumpargs = "-s"
if not data: ncdumpargs += "h"
result=subprocess.run(["ncdump", ncdumpargs, self.filepath()],
check=True, capture_output=True, text=True)
check=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE,
encoding='utf-8')
if outfile is None:
return result.stdout
else:
Expand Down
5 changes: 5 additions & 0 deletions test/run_all.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@
test_files.remove('tst_dap.py')
test_files.insert(0,'tst_dap.py')

# Don't run CDL test (that requires ncdump/ncgen)
if os.getenv('NO_CDL'):
test_files.remove('tst_cdl.py');
sys.stdout.write('not running tst_cdl.py ...\n')

# Build the test suite from the tests found in the test files.
testsuite = unittest.TestSuite()
for f in test_files:
Expand Down

0 comments on commit e1694b8

Please sign in to comment.