From f7b87f5c5753358b0a82ed00bc23074101bba773 Mon Sep 17 00:00:00 2001 From: Randall Pittman Date: Thu, 25 Jul 2024 08:58:30 -0700 Subject: [PATCH 1/3] [docs] Add link to auth page on rc files. Incidentally pdoc re-inserted missing date2index and date2num stuff. --- docs/index.html | 17 ++++++++++++----- src/netCDF4/_netCDF4.pyx | 6 +++++- 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/docs/index.html b/docs/index.html index 730c955d7..377e45741 100644 --- a/docs/index.html +++ b/docs/index.html @@ -1173,7 +1173,8 @@

Functions

def date2index(dates, nctime, calendar=None, select='exact', has_year_zero=None)
-

Return indices of a netCDF time variable corresponding to the given dates.

+

date2index(dates, nctime, calendar=None, select=u'exact', has_year_zero=None)

+

Return indices of a netCDF time variable corresponding to the given dates.

dates: A datetime object or a sequence of datetime objects. The datetime objects should not include a time-zone offset.

nctime: A netCDF time variable object. The nctime object must have a @@ -1212,7 +1213,8 @@

Functions

def date2num(dates, units, calendar=None, has_year_zero=None, longdouble=False)
-

Return numeric time values given datetime objects. The units +

date2num(dates, units, calendar=None, has_year_zero=None, longdouble=False)

+

Return numeric time values given datetime objects. The units of the numeric time values are described by the units argument and the calendar keyword. The datetime objects must be in UTC with no time-zone offset. @@ -1292,7 +1294,8 @@

Functions

def num2date(times, units, calendar='standard', only_use_cftime_datetimes=True, only_use_python_datetimes=False, has_year_zero=None)
-

Return datetime objects given numeric time values. The units +

num2date(times, units, calendar=u'standard', only_use_cftime_datetimes=True, only_use_python_datetimes=False, has_year_zero=None)

+

Return datetime objects given numeric time values. The units of the numeric time values are described by the units argument and the calendar keyword. The returned datetime objects represent UTC with no time-zone offset, even if the specified @@ -1348,14 +1351,18 @@

Functions

rc_get(key)

-

Returns the internal netcdf-c rc table value corresponding to key.

+

Returns the internal netcdf-c rc table value corresponding to key. +See https://docs.unidata.ucar.edu/netcdf-c/current/auth.html +for more information on rc files and values.

def rc_set(key, value)

rc_set(key, value)

-

Sets the internal netcdf-c rc table value corresponding to key.

+

Sets the internal netcdf-c rc table value corresponding to key. +See https://docs.unidata.ucar.edu/netcdf-c/current/auth.html +for more information on rc files and values.

def set_alignment(threshold, alignment) diff --git a/src/netCDF4/_netCDF4.pyx b/src/netCDF4/_netCDF4.pyx index 9bbc3aaf6..c31ab3f72 100644 --- a/src/netCDF4/_netCDF4.pyx +++ b/src/netCDF4/_netCDF4.pyx @@ -1323,6 +1323,8 @@ def rc_get(key): **```rc_get(key)```** Returns the internal netcdf-c rc table value corresponding to key. +See +for more information on rc files and values. """ cdef int ierr cdef char *keyc @@ -1345,7 +1347,9 @@ def rc_set(key, value): **```rc_set(key, value)```** Sets the internal netcdf-c rc table value corresponding to key. - """ +See +for more information on rc files and values. +""" cdef int ierr cdef char *keyc cdef char *valuec From 3a6d94425dfc7bec0613d8b8897095122a5999d5 Mon Sep 17 00:00:00 2001 From: Randall Pittman Date: Thu, 25 Jul 2024 09:05:36 -0700 Subject: [PATCH 2/3] (minor) simplify diff --- src/netCDF4/_netCDF4.pyx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/netCDF4/_netCDF4.pyx b/src/netCDF4/_netCDF4.pyx index c31ab3f72..d4c6f7d53 100644 --- a/src/netCDF4/_netCDF4.pyx +++ b/src/netCDF4/_netCDF4.pyx @@ -1349,7 +1349,7 @@ def rc_set(key, value): Sets the internal netcdf-c rc table value corresponding to key. See for more information on rc files and values. -""" + """ cdef int ierr cdef char *keyc cdef char *valuec From 9996c01f14cbdf1729a79a83e5816ad21f5ff071 Mon Sep 17 00:00:00 2001 From: Randall Pittman Date: Mon, 29 Jul 2024 09:17:02 -0700 Subject: [PATCH 3/3] Correct auth link --- docs/index.html | 4 ++-- src/netCDF4/_netCDF4.pyx | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/index.html b/docs/index.html index 377e45741..f120d187c 100644 --- a/docs/index.html +++ b/docs/index.html @@ -1352,7 +1352,7 @@

Functions

rc_get(key)

Returns the internal netcdf-c rc table value corresponding to key. -See https://docs.unidata.ucar.edu/netcdf-c/current/auth.html +See https://docs.unidata.ucar.edu/netcdf-c/current/md_auth.html for more information on rc files and values.

@@ -1361,7 +1361,7 @@

Functions

rc_set(key, value)

Sets the internal netcdf-c rc table value corresponding to key. -See https://docs.unidata.ucar.edu/netcdf-c/current/auth.html +See https://docs.unidata.ucar.edu/netcdf-c/current/md_auth.html for more information on rc files and values.

diff --git a/src/netCDF4/_netCDF4.pyx b/src/netCDF4/_netCDF4.pyx index d4c6f7d53..6023406c9 100644 --- a/src/netCDF4/_netCDF4.pyx +++ b/src/netCDF4/_netCDF4.pyx @@ -1323,7 +1323,7 @@ def rc_get(key): **```rc_get(key)```** Returns the internal netcdf-c rc table value corresponding to key. -See +See for more information on rc files and values. """ cdef int ierr @@ -1347,7 +1347,7 @@ def rc_set(key, value): **```rc_set(key, value)```** Sets the internal netcdf-c rc table value corresponding to key. -See +See for more information on rc files and values. """ cdef int ierr