Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into rwp_typing
Browse files Browse the repository at this point in the history
  • Loading branch information
RandallPittmanOrSt committed Oct 22, 2024
2 parents d81d4fa + d181813 commit 9cd78c9
Show file tree
Hide file tree
Showing 20 changed files with 181 additions and 158 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build_latest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
pushd pnetcdf-${PNETCDF_VERSION}
./configure --prefix $NETCDF_DIR --enable-shared --disable-fortran --disable-cxx
make -j 2
make install
sudo make install
popd
echo "Download and build netCDF version ${NETCDF_VERSION}"
wget https://downloads.unidata.ucar.edu/netcdf-c/${NETCDF_VERSION}/netcdf-c-${NETCDF_VERSION}.tar.gz
Expand All @@ -46,7 +46,7 @@ jobs:
export LIBS="-lhdf5_mpich_hl -lhdf5_mpich -lm -lz"
./configure --prefix $NETCDF_DIR --enable-netcdf-4 --enable-shared --enable-dap --enable-parallel4 $NETCDF_EXTRA_CONFIG
make -j 2
make install
sudo make install
popd
# - name: The job has failed
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build_master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
autoreconf -i
./configure --prefix $NETCDF_DIR --enable-netcdf-4 --enable-shared --enable-dap --enable-parallel4
make -j 2
make install
sudo make install
popd
# - name: The job has failed
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/build_old.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
runs-on: ubuntu-latest
env:
PNETCDF_VERSION: 1.12.1
NETCDF_VERSION: 4.8.1
NETCDF_VERSION: 4.7.4
NETCDF_DIR: ${{ github.workspace }}/..
NETCDF_EXTRA_CONFIG: --enable-pnetcdf
CC: mpicc.mpich
Expand Down Expand Up @@ -35,18 +35,19 @@ jobs:
pushd pnetcdf-${PNETCDF_VERSION}
./configure --prefix $NETCDF_DIR --enable-shared --disable-fortran --disable-cxx
make -j 2
make install
sudo make install
popd
echo "Download and build netCDF version ${NETCDF_VERSION}"
wget https://downloads.unidata.ucar.edu/netcdf-c/${NETCDF_VERSION}/netcdf-c-${NETCDF_VERSION}.tar.gz
#wget https://downloads.unidata.ucar.edu/netcdf-c/${NETCDF_VERSION}/netcdf-c-${NETCDF_VERSION}.tar.gz
wget https://www.gfd-dennou.org/arch/netcdf/unidata-mirror/netcdf-c-${NETCDF_VERSION}.tar.gz
tar -xzf netcdf-c-${NETCDF_VERSION}.tar.gz
pushd netcdf-c-${NETCDF_VERSION}
export CPPFLAGS="-I/usr/include/hdf5/mpich -I${NETCDF_DIR}/include"
export LDFLAGS="-L${NETCDF_DIR}/lib"
export LIBS="-lhdf5_mpich_hl -lhdf5_mpich -lm -lz"
./configure --prefix $NETCDF_DIR --enable-netcdf-4 --enable-shared --enable-dap --enable-parallel4 $NETCDF_EXTRA_CONFIG
make -j 2
make install
sudo make install
popd
# - name: The job has failed
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/cibuildwheel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ jobs:
echo "Setting CIBW_SKIP=$CIBW_SKIP"
- name: "Building ${{ matrix.os }} (${{ matrix.arch }}) wheels"
uses: pypa/cibuildwheel@v2.19.2
uses: pypa/cibuildwheel@v2.21.3
env:
CIBW_SKIP: ${{ env.CIBW_SKIP }}
CIBW_ARCHS: ${{ matrix.arch }}
Expand All @@ -107,8 +107,6 @@ jobs:
CIBW_TEST_COMMAND: >
python -c "import netCDF4; print(f'netCDF4 v{netCDF4.__version__}')"
&& pytest -s -rxs -v {project}/test
&& URL="https://icdc.cen.uni-hamburg.de/thredds/dodsC/ftpthredds/hamtide/m2.hamtide11a.nc"
&& python -c "from netCDF4 import Dataset; nc=Dataset(\"${URL}\"); print(nc)"
- uses: actions/upload-artifact@v4
with:
Expand All @@ -135,7 +133,7 @@ jobs:
python-version: 3.x

- name: Setup Micromamba Python ${{ matrix.python-version }}
uses: mamba-org/setup-micromamba@v1
uses: mamba-org/setup-micromamba@v2
with:
environment-name: build
init-shell: bash
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/miniconda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
os: [windows-latest, ubuntu-latest, macos-latest]
platform: [x64, x32]
exclude:
- os: macos-latest
- os: macos-latest
platform: x32
fail-fast: false
defaults:
Expand All @@ -29,7 +29,7 @@ jobs:
submodules: true

- name: Setup Micromamba
uses: mamba-org/setup-micromamba@v1
uses: mamba-org/setup-micromamba@v2
with:
environment-name: TEST
init-shell: bash
Expand Down Expand Up @@ -63,13 +63,13 @@ jobs:
submodules: true

- name: Setup Micromamba
uses: mamba-org/setup-micromamba@v1
uses: mamba-org/setup-micromamba@v2
with:
environment-name: TEST
init-shell: bash
create-args: >-
python=${{ matrix.python-version }}
numpy cython pip pytest mpi4py hdf5=*=mpi* libnetcdf=*=mpi* cftime zlib certifi typing-extensions
numpy cython pip pytest openmpi mpi4py hdf5=*=mpi* libnetcdf=*=mpi* cftime zlib certifi typing-extensions
--channel conda-forge
- name: Install netcdf4-python with mpi
Expand All @@ -82,7 +82,7 @@ jobs:
run: |
cd test && python run_all.py
cd ../examples
export PATH="${CONDA_PREFIX}/bin:${CONDA_PREFIX}/Library/bin:$PATH"
export PATH="${CONDA_PREFIX}/bin:${CONDA_PREFIX}/Library/bin:$PATH"
which mpirun
mpirun --version
mpirun -np 4 --oversubscribe python mpi_example.py # for openmpi
Expand Down
17 changes: 10 additions & 7 deletions Changelog
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
===============================
* add static type hints (PR #1302)
* Expose nc_rc_set, nc_rc_get (via rc_set, rc_get module functions). (PR #1348)
* Add Variable.get_fill_value and allow `fill_value='default'` to
set `_FillValue` using default fill values. (issue #1374, PR #1375).
* Fix NETCDF3 endian error (issue #1373, PR #1355).

version 1.7.1 (tag v1.7.1rel)
===============================
Expand All @@ -22,7 +25,7 @@

version 1.6.5 (tag v1.6.5rel)
===============================
* fix for issue #1271 (mask ignored if bool MA assinged to uint8 var)
* fix for issue #1271 (mask ignored if bool MA assigned to uint8 var)
* include information on specific object when reporting errors from netcdf-c
* python 3.12 wheels added, support for python 3.7 removed.

Expand Down Expand Up @@ -341,7 +344,7 @@
* Fix for auto scaling and masking when _Unsigned attribute set (create
view as unsigned type after scaling and masking). Issue #671.
* Always mask values outside valid_min, valid_max (not just when
missing_value attribue present). Issue #672.
missing_value attribute present). Issue #672.
* Fix setup.py so pip install doesn't fail if cython not installed.
setuptools >= 18.0 now required for installation (Issue #666).

Expand Down Expand Up @@ -415,7 +418,7 @@
reading, a vlen string array attribute is returned as a list of
strings. To write, use var.setncattr_string("name", ["two", "strings"]).)
* Fix for issue #596 - julian day calculations wrong for negative years,
caused incorrect rountrip num2date(date2num(date)) roundtrip for dates with year
caused incorrect roundtrip num2date(date2num(date)) roundtrip for dates with year
< 0.
* Make sure negative years work in utime.num2date (issue #596).
* raise NotImplementedError when trying to pickle Dataset, Variable,
Expand Down Expand Up @@ -958,7 +961,7 @@
lib after the 4.2 release). Controlled by kwarg 'diskless' to
netCDF4.Dataset (default False). diskless=True when creating a file
results in a file that exists only in memory, closing the file
makes the data disapper, except if persist=True keyword given in
makes the data disappear, except if persist=True keyword given in
which case it is persisted to a disk file on close. diskless=True
when opening a file creates an in-memory copy of the file for faster access.

Expand Down Expand Up @@ -1196,7 +1199,7 @@ version 0.8.1 (svn revision 744)

* Experimental variable-length (vlen) data type support added.

* changes to accomodate compound types in netcdf-4.1-beta snapshots.
* changes to accommodate compound types in netcdf-4.1-beta snapshots.
Compound types now work correctly for snapshots >= 20090603.

* Added __len__ method and 'size' property to Variable class.
Expand All @@ -1207,7 +1210,7 @@ version 0.8.1 (svn revision 744)

* Fixed bug occurring when indexing with a numpy array of length 1.

* Fixed bug that occured when -1 was used as a variable index.
* Fixed bug that occurred when -1 was used as a variable index.

* enabled 'shared access' mode for NETCDF3 formatted files (mode='ws',
'r+s' or 'as'). Writes in shared mode are unbuffered, which can
Expand Down Expand Up @@ -1376,7 +1379,7 @@ version 0.7.3 (svn revision 501)
to work as slice indices.

* (netCDF4_classic only) try to make sure file is not left in 'define mode'
when execption is raised.
when exception is raised.

* if slicing a variable results in a array with shape (1,), just return
a scalar (except for compound types).
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ For details on the latest updates, see the [Changelog](https://github.com/Unidat
06/13/2024: Version [1.7.0](https://pypi.python.org/pypi/netCDF4/1.7.0) released. Add support for complex numbers via `auto_complex` keyword to `Dataset` ([PR #1295](https://github.com/Unidata/netcdf4-python/pull/1295))

10/20/2023: Version [1.6.5](https://pypi.python.org/pypi/netCDF4/1.6.5) released.
Fix for issue #1271 (mask ignored if bool MA assinged to uint8 var),
Fix for issue #1271 (mask ignored if bool MA assigned to uint8 var),
support for python 3.12 (removal of python 3.7 support), more
informative error messages.

Expand Down
100 changes: 0 additions & 100 deletions README.wheels.md

This file was deleted.

Loading

0 comments on commit 9cd78c9

Please sign in to comment.