Skip to content

Commit e1694b8

Browse files
author
Jeff Whitaker
authored
Merge pull request #1085 from Unidata/v1.5.6rel
prepare for v1.5.6 release
2 parents 947514f + a901113 commit e1694b8

File tree

6 files changed

+25
-16
lines changed

6 files changed

+25
-16
lines changed

.github/workflows/miniconda.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
runs-on: ${{ matrix.os }}
1111
strategy:
1212
matrix:
13-
python-version: [ "3.7", "3.8", "3.9"]
13+
python-version: ["3.6", "3.7", "3.8", "3.9"]
1414
os: [windows-latest, ubuntu-latest, macos-latest]
1515
platform: [x64, x32]
1616
exclude:

Changelog

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
version 1.5.6 (not yet released)
2-
==================================
1+
version 1.5.6 (tag v1.5.6rel)
2+
==============================
33
* move CI/CD tests from travis/appveyor to Github Actions (PR #1061).
44
* move netCDF4 dir under src so module can be imported in source directory (PR #1062).
55
* change numpy.bool to numpy.bool_ and numpy.float to numpy.float_ (float and

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
## News
1010
For details on the latest updates, see the [Changelog](https://github.com/Unidata/netcdf4-python/blob/master/Changelog).
1111

12+
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.
13+
1214
12/20/2020: Version [1.5.5.1](https://pypi.python.org/pypi/netCDF4/1.5.5.1) released.
1315
Updated binary wheels for OSX and linux that link latest netcdf-c and hdf5 libs.
1416

docs/index.html

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -487,11 +487,12 @@ <h2 id="download">Download</h2>
487487
<h2 id="requires">Requires</h2>
488488

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

1619-
<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>
1620+
<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>
16201621

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

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

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

2544-
<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>
2545-
text representation.</p>
2545+
<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>
2546+
text representation. Requires <code>ncgen</code> to be installed and in <code>$PATH</code>.</p>
25462547

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

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

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

2574-
<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>
2575-
text representation of Dataset</p>
2575+
<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>
2576+
text representation of Dataset. Requires <code>ncdump</code> to be installed and in <code>$PATH</code>.</p>
25762577

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

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

25812582
<p><strong><code>outfile</code></strong>: If not None, file to output ncdump to. Default is to return a string.</p>
25822583
</div>

src/netCDF4/_netCDF4.pyx

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3225,8 +3225,8 @@ attribute does not exist on the variable. For example,
32253225
"""
32263226
**`fromcdl(cdlfilename, ncfilename=None, mode='a',format='NETCDF4')`**
32273227
3228-
call ncgen via subprocess to create Dataset from [CDL](https://www.unidata.ucar.edu/software/netcdf/docs/netcdf_utilities_guide.html#cdl_guide)
3229-
text representation.
3228+
call `ncgen` via subprocess to create Dataset from [CDL](https://www.unidata.ucar.edu/software/netcdf/docs/netcdf_utilities_guide.html#cdl_guide)
3229+
text representation. Requires `ncgen` to be installed and in `$PATH`.
32303230
32313231
**`cdlfilename`**: CDL file.
32323232
@@ -3260,8 +3260,8 @@ Dataset instance for `ncfilename` is returned.
32603260
"""
32613261
**`tocdl(self, coordvars=False, data=False, outfile=None)`**
32623262
3263-
call ncdump via subprocess to create [CDL](https://www.unidata.ucar.edu/software/netcdf/docs/netcdf_utilities_guide.html#cdl_guide)
3264-
text representation of Dataset
3263+
call `ncdump` via subprocess to create [CDL](https://www.unidata.ucar.edu/software/netcdf/docs/netcdf_utilities_guide.html#cdl_guide)
3264+
text representation of Dataset. Requires `ncdump` to be installed and in `$PATH`.
32653265
32663266
**`coordvars`**: include coordinate variable data (via `ncdump -c`). Default False
32673267
@@ -3276,7 +3276,8 @@ text representation of Dataset
32763276
ncdumpargs = "-s"
32773277
if not data: ncdumpargs += "h"
32783278
result=subprocess.run(["ncdump", ncdumpargs, self.filepath()],
3279-
check=True, capture_output=True, text=True)
3279+
check=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE,
3280+
encoding='utf-8')
32803281
if outfile is None:
32813282
return result.stdout
32823283
else:

test/run_all.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,11 @@
3838
test_files.remove('tst_dap.py')
3939
test_files.insert(0,'tst_dap.py')
4040

41+
# Don't run CDL test (that requires ncdump/ncgen)
42+
if os.getenv('NO_CDL'):
43+
test_files.remove('tst_cdl.py');
44+
sys.stdout.write('not running tst_cdl.py ...\n')
45+
4146
# Build the test suite from the tests found in the test files.
4247
testsuite = unittest.TestSuite()
4348
for f in test_files:

0 commit comments

Comments
 (0)