Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix various check issues that appear in the newest version #215

Merged
merged 1 commit into from
Jan 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: hdf5r
Type: Package
Title: Interface to the 'HDF5' Binary Data Format
Version: 1.3.8
Version: 1.3.9
Authors@R: c(
person("Holger", "Hoefling", email = "[email protected]", role = c("aut", "cre")),
person("Mario", "Annau", email = "[email protected]", role = "aut"),
Expand Down
6 changes: 4 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
.ONESHELL:
SHELL:=/bin/bash

R_REVISION?=83640
R_REVISION?=85786
HDF5_VERSION?=System
DOCKER_CRAN_CHECK_ARG=''
# DOCKER_CRAN_CHECK_ARG='--as-cran'
Expand All @@ -14,7 +15,7 @@ PKG_NAME := $(shell grep -i ^package DESCRIPTION | cut -d : -d \ -f 2)
#DATA_FILES := $(wildcard data/*.rda)
R_FILES := $(wildcard R/*.R)
TEST_FILES := $(wildcard tests/*.R) $(wildcard tests/testthat/*.R)
ALL_SRC_FILES := $(wildcard src/*.cpp) $(wildcard src/*.h) src/Makevars.in
ALL_SRC_FILES := $(wildcard src/*.c) $(wildcard src/*.h) src/Makevars.in
RMD_FILES := README.Rmd
MD_FILES := $(RMD_FILES:.Rmd=.md)
SRC_FILES := $(filter-out src/RcppExports.cpp, $(ALL_SRC_FILES))
Expand Down Expand Up @@ -71,6 +72,7 @@ check: $(BUILD_OUTPUT)

check-docker: $(BUILD_OUTPUT)
if [[ "${HDF5_VERSION}" = "System" ]]; then
echo HDF is System
$(MAKE) -C docker build-system R_REVISION=${R_REVISION} HDF5_VERSION=${HDF5_VERSION}
else
$(MAKE) -C docker build-custom R_REVISION=${R_REVISION} HDF5_VERSION=${HDF5_VERSION}
Expand Down
8 changes: 3 additions & 5 deletions R/convert.R
Original file line number Diff line number Diff line change
Expand Up @@ -372,22 +372,20 @@ guess_chunks <- function(space_maxdims, dtype_size, chunk_size=getOption("hdf5r.
return(chunk_dim)
}

##' Set the correct dimension attribute for an object
##' Get the correct dimensions for a space and datatype
##'
##' This function uses the space and the selection in it to set the correct dimension
##' This function uses the space and the selection in it to get the correct dimension
##' for the resulting object (but without dropping dimensions). Furthermore, if the
##' datatype is an array, those dimensions are correctly determined as well.
##'
##' Internal use only; currently unused
##' @title Set the correct dimension attribute for an object
##' @param x an object that was read from an HDF5 dataset or attribute
##' @title Extract the dimension of a space and datatype
##' @param space The space with the selection that was used to read the dataset
##' @param dtype The datatype of the dataset
##' @return \code{x}, but with a new dimension attribute
##' @author Holger Hoefling
##' @keywords internal
extract_dim <- function(space, dtype) {
## apply the right dimension attribute to x that is implied by the space and the data-type
dtype_dim <- NULL
if(inherits(dtype, "H5T")) {
if(dtype$get_class() == h5const$H5T_ARRAY) {
Expand Down
2 changes: 1 addition & 1 deletion R/high_level_UI.R
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ are_args_scalar <- function(args) {
##'
##' Checks for the functions \code{:}, \code{seq} and \code{seq_len}
##' @title Check argument for known functions that encode a hyperslab
##' @param cur_arg The argument to check
##' @param x The argument to check
##' @param envir The environment in which to evaluate the argument
##' @return A vector of length 4 describing start, count, stride and block if appropriate
##' @author Holger Hoefling
Expand Down
2 changes: 1 addition & 1 deletion inst/CWrappers_1.10.0/datatype_export_c.brew
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ hid_t get_h5_equiv(int size, bool sign) {
SEXP print_dtypes_array(void) {
Rprintf("New -------------------------------------\n");
for(int i=0; i < DT_LAST_ITEM; ++i) {
Rprintf("%d: %I64d\n", i, h5_datatype[i]);
Rprintf("%d: %ld\n", i, h5_datatype[i]);
}
return(R_NilValue);
}
Expand Down
2 changes: 1 addition & 1 deletion inst/CWrappers_1.10.0/identify_prototypes.R
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ struct_all_elements_rtype$all_rtype[struct_all_elements_rtype$category_name=="H5
struct_all_elements_rtype <- subset(struct_all_elements_rtype, all_rtype)


all_types_with_complete_rtype <- rbind.fill(subset(struct_enum_types, !category %in% c("struct", "union") ||
all_types_with_complete_rtype <- rbind.fill(subset(struct_enum_types, !category %in% c("struct", "union") |
category_name %in% struct_all_elements_rtype$category_name), all_other)
all_types_with_complete_rtype <- subset(all_types_with_complete_rtype, has_rtype)

Expand Down
2 changes: 1 addition & 1 deletion inst/CWrappers_1.10.2/datatype_export_c.brew
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ hid_t get_h5_equiv(int size, bool sign) {
SEXP print_dtypes_array(void) {
Rprintf("New -------------------------------------\n");
for(int i=0; i < DT_LAST_ITEM; ++i) {
Rprintf("%d: %I64d\n", i, h5_datatype[i]);
Rprintf("%d: %ld\n", i, h5_datatype[i]);
}
return(R_NilValue);
}
Expand Down
2 changes: 1 addition & 1 deletion inst/CWrappers_1.10.2/identify_prototypes.R
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ struct_all_elements_rtype$all_rtype[struct_all_elements_rtype$category_name=="H5
struct_all_elements_rtype <- subset(struct_all_elements_rtype, all_rtype)


all_types_with_complete_rtype <- rbind.fill(subset(struct_enum_types, !category %in% c("struct", "union") ||
all_types_with_complete_rtype <- rbind.fill(subset(struct_enum_types, !category %in% c("struct", "union") |
category_name %in% struct_all_elements_rtype$category_name), all_other)
all_types_with_complete_rtype <- subset(all_types_with_complete_rtype, has_rtype)

Expand Down
2 changes: 1 addition & 1 deletion inst/CWrappers_1.10.3/datatype_export_c.brew
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ hid_t get_h5_equiv(int size, bool sign) {
SEXP print_dtypes_array(void) {
Rprintf("New -------------------------------------\n");
for(int i=0; i < DT_LAST_ITEM; ++i) {
Rprintf("%d: %I64d\n", i, h5_datatype[i]);
Rprintf("%d: %ld\n", i, h5_datatype[i]);
}
return(R_NilValue);
}
Expand Down
2 changes: 1 addition & 1 deletion inst/CWrappers_1.10.3/identify_prototypes.R
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ struct_all_elements_rtype$all_rtype[struct_all_elements_rtype$category_name=="H5
struct_all_elements_rtype <- subset(struct_all_elements_rtype, all_rtype)


all_types_with_complete_rtype <- rbind.fill(subset(struct_enum_types, !category %in% c("struct", "union") ||
all_types_with_complete_rtype <- rbind.fill(subset(struct_enum_types, !category %in% c("struct", "union") |
category_name %in% struct_all_elements_rtype$category_name), all_other)
all_types_with_complete_rtype <- subset(all_types_with_complete_rtype, has_rtype)

Expand Down
2 changes: 1 addition & 1 deletion inst/CWrappers_1.12.0/datatype_export_c.brew
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ hid_t get_h5_equiv(int size, bool sign) {
SEXP print_dtypes_array(void) {
Rprintf("New -------------------------------------\n");
for(int i=0; i < DT_LAST_ITEM; ++i) {
Rprintf("%d: %I64d\n", i, h5_datatype[i]);
Rprintf("%d: %ld\n", i, h5_datatype[i]);
}
return(R_NilValue);
}
Expand Down
2 changes: 1 addition & 1 deletion inst/CWrappers_1.12.0/identify_prototypes.R
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ struct_all_elements_rtype$all_rtype[struct_all_elements_rtype$category_name=="H5
struct_all_elements_rtype <- subset(struct_all_elements_rtype, all_rtype)


all_types_with_complete_rtype <- rbind.fill(subset(struct_enum_types, !category %in% c("struct", "union") ||
all_types_with_complete_rtype <- rbind.fill(subset(struct_enum_types, !category %in% c("struct", "union") |
category_name %in% struct_all_elements_rtype$category_name), all_other)
all_types_with_complete_rtype <- subset(all_types_with_complete_rtype, has_rtype)

Expand Down
2 changes: 1 addition & 1 deletion inst/CWrappers_1.8.12/datatype_export_c.brew
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ hid_t get_h5_equiv(int size, bool sign) {
SEXP print_dtypes_array(void) {
Rprintf("New -------------------------------------\n");
for(int i=0; i < DT_LAST_ITEM; ++i) {
Rprintf("%d: %I64d\n", i, h5_datatype[i]);
Rprintf("%d: %ld\n", i, h5_datatype[i]);
}
return(R_NilValue);
}
Expand Down
2 changes: 1 addition & 1 deletion inst/CWrappers_1.8.12/identify_prototypes.R
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ struct_all_elements_rtype$all_rtype[struct_all_elements_rtype$category_name=="H5
struct_all_elements_rtype <- subset(struct_all_elements_rtype, all_rtype)


all_types_with_complete_rtype <- rbind.fill(subset(struct_enum_types, !category %in% c("struct", "union") ||
all_types_with_complete_rtype <- rbind.fill(subset(struct_enum_types, !category %in% c("struct", "union") |
category_name %in% struct_all_elements_rtype$category_name), all_other)
all_types_with_complete_rtype <- subset(all_types_with_complete_rtype, has_rtype)

Expand Down
2 changes: 1 addition & 1 deletion inst/CWrappers_1.8.14/datatype_export_c.brew
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ hid_t get_h5_equiv(int size, bool sign) {
SEXP print_dtypes_array(void) {
Rprintf("New -------------------------------------\n");
for(int i=0; i < DT_LAST_ITEM; ++i) {
Rprintf("%d: %I64d\n", i, h5_datatype[i]);
Rprintf("%d: %ld\n", i, h5_datatype[i]);
}
return(R_NilValue);
}
Expand Down
2 changes: 1 addition & 1 deletion inst/CWrappers_1.8.14/identify_prototypes.R
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ struct_all_elements_rtype$all_rtype[struct_all_elements_rtype$category_name=="H5
struct_all_elements_rtype <- subset(struct_all_elements_rtype, all_rtype)


all_types_with_complete_rtype <- rbind.fill(subset(struct_enum_types, !category %in% c("struct", "union") ||
all_types_with_complete_rtype <- rbind.fill(subset(struct_enum_types, !category %in% c("struct", "union") |
category_name %in% struct_all_elements_rtype$category_name), all_other)
all_types_with_complete_rtype <- subset(all_types_with_complete_rtype, has_rtype)

Expand Down
2 changes: 1 addition & 1 deletion inst/CWrappers_1.8.16/datatype_export_c.brew
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ hid_t get_h5_equiv(int size, bool sign) {
SEXP print_dtypes_array(void) {
Rprintf("New -------------------------------------\n");
for(int i=0; i < DT_LAST_ITEM; ++i) {
Rprintf("%d: %I64d\n", i, h5_datatype[i]);
Rprintf("%d: %ld\n", i, h5_datatype[i]);
}
return(R_NilValue);
}
Expand Down
2 changes: 1 addition & 1 deletion inst/CWrappers_1.8.16/identify_prototypes.R
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ struct_all_elements_rtype$all_rtype[struct_all_elements_rtype$category_name=="H5
struct_all_elements_rtype <- subset(struct_all_elements_rtype, all_rtype)


all_types_with_complete_rtype <- rbind.fill(subset(struct_enum_types, !category %in% c("struct", "union") ||
all_types_with_complete_rtype <- rbind.fill(subset(struct_enum_types, !category %in% c("struct", "union") |
category_name %in% struct_all_elements_rtype$category_name), all_other)
all_types_with_complete_rtype <- subset(all_types_with_complete_rtype, has_rtype)

Expand Down
4 changes: 2 additions & 2 deletions man/check_arg_for_hyperslab_func.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 3 additions & 5 deletions man/extract_dim.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/1_10_0/datatype_export.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ hid_t get_h5_equiv(int size, bool sign) {
SEXP print_dtypes_array(void) {
Rprintf("New -------------------------------------\n");
for(int i=0; i < DT_LAST_ITEM; ++i) {
Rprintf("%d: %I64d\n", i, h5_datatype[i]);
Rprintf("%d: %ld\n", i, h5_datatype[i]);
}
return(R_NilValue);
}
Expand Down
2 changes: 1 addition & 1 deletion src/1_10_2/datatype_export.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ hid_t get_h5_equiv(int size, bool sign) {
SEXP print_dtypes_array(void) {
Rprintf("New -------------------------------------\n");
for(int i=0; i < DT_LAST_ITEM; ++i) {
Rprintf("%d: %I64d\n", i, h5_datatype[i]);
Rprintf("%d: %ld\n", i, h5_datatype[i]);
}
return(R_NilValue);
}
Expand Down
2 changes: 1 addition & 1 deletion src/1_10_3/datatype_export.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ hid_t get_h5_equiv(int size, bool sign) {
SEXP print_dtypes_array(void) {
Rprintf("New -------------------------------------\n");
for(int i=0; i < DT_LAST_ITEM; ++i) {
Rprintf("%d: %I64d\n", i, h5_datatype[i]);
Rprintf("%d: %ld\n", i, h5_datatype[i]);
}
return(R_NilValue);
}
Expand Down
2 changes: 1 addition & 1 deletion src/1_12_0/datatype_export.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ hid_t get_h5_equiv(int size, bool sign) {
SEXP print_dtypes_array(void) {
Rprintf("New -------------------------------------\n");
for(int i=0; i < DT_LAST_ITEM; ++i) {
Rprintf("%d: %I64d\n", i, h5_datatype[i]);
Rprintf("%d: %ld\n", i, h5_datatype[i]);
}
return(R_NilValue);
}
Expand Down
2 changes: 1 addition & 1 deletion src/1_8_12/datatype_export.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ hid_t get_h5_equiv(int size, bool sign) {
SEXP print_dtypes_array(void) {
Rprintf("New -------------------------------------\n");
for(int i=0; i < DT_LAST_ITEM; ++i) {
Rprintf("%d: %I64d\n", i, h5_datatype[i]);
Rprintf("%d: %ld\n", i, h5_datatype[i]);
}
return(R_NilValue);
}
Expand Down
2 changes: 1 addition & 1 deletion src/1_8_14/datatype_export.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ hid_t get_h5_equiv(int size, bool sign) {
SEXP print_dtypes_array(void) {
Rprintf("New -------------------------------------\n");
for(int i=0; i < DT_LAST_ITEM; ++i) {
Rprintf("%d: %I64d\n", i, h5_datatype[i]);
Rprintf("%d: %ld\n", i, h5_datatype[i]);
}
return(R_NilValue);
}
Expand Down
2 changes: 1 addition & 1 deletion src/1_8_16/datatype_export.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ hid_t get_h5_equiv(int size, bool sign) {
SEXP print_dtypes_array(void) {
Rprintf("New -------------------------------------\n");
for(int i=0; i < DT_LAST_ITEM; ++i) {
Rprintf("%d: %I64d\n", i, h5_datatype[i]);
Rprintf("%d: %ld\n", i, h5_datatype[i]);
}
return(R_NilValue);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Wrapper_manual_H5T.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ SEXP h5create_enum_type(SEXP _labels, SEXP _values, SEXP _dtype_id) {
H5Tconvert(H5T_NATIVE_LLONG, dtype_id, 1, &buf, NULL, H5P_DEFAULT);
status = H5Tenum_insert(datatype, CHAR(STRING_ELT(_labels, i)), &buf);
if(status < 0) {
error("Could not insert value into enum %s value %d with status %d\n", CHAR(STRING_ELT(_labels, i)), buf, status);
error("Could not insert value into enum %s value %lld with status %d\n", CHAR(STRING_ELT(_labels, i)), buf, status);
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/convert.c
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ SEXP RToH5_INTEGER(SEXP _Robj, hid_t dtype_id, R_xlen_t nelem) {
SEXP Rval;

if(nelem != XLENGTH(_Robj)) {
error("Length of integer vector not as expected: Actual: %d; Expected %d\n", XLENGTH(_Robj), nelem);
error("Length of integer vector not as expected: Actual: %ld; Expected %ld\n", XLENGTH(_Robj), nelem);
}

switch(TYPEOF(_Robj)) {
Expand Down
Loading