diff --git a/.ci/ubuntu25.04_py3/Dockerfile b/.ci/ubuntu25.04_py3/Dockerfile new file mode 100644 index 00000000..eb0bb8c2 --- /dev/null +++ b/.ci/ubuntu25.04_py3/Dockerfile @@ -0,0 +1,45 @@ +FROM ubuntu:25.04 + +MAINTAINER DESY, Jan Kotanski + + +RUN apt-get update +RUN apt-get install -y base-passwd apt-utils dialog -y +RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections +RUN apt-get -qq update && apt-get -qq install -y libterm-readline-gnu-perl software-properties-common coreutils gnupg2 procps curl apt-transport-https gnupg2 ca-certificates wget gpg-agent + +RUN curl -s http://repos.pni-hdri.de/debian_repo.pub.gpg | gpg --no-default-keyring --keyring gnupg-ring:/etc/apt/trusted.gpg.d/debian-hdri-repo.gpg --import +RUN chmod 644 /etc/apt/trusted.gpg.d/debian-hdri-repo.gpg +RUN cd /etc/apt/sources.list.d && wget http://repos.pni-hdri.de/plucky-pni-hdri.list + +RUN apt-get -qq update && export DEBIAN_FRONTEND=noninteractive && apt-get -qq dist-upgrade +RUN apt-get -qq update && export DEBIAN_FRONTEND=noninteractive && apt-get -qq install -y python3-sphinx apt-utils net-tools +RUN apt-get -qq install -y python3-numpy libhdf5-dev libboost-regex-dev libboost-program-options-dev libboost-system-dev libboost-date-time-dev libboost-filesystem-dev libblas-dev libatlas-base-dev cython3 python3-setuptools libboost-python-dev python3-numpy-dev g++ python3-h5py +RUN apt-get -qq install -y hdf5-filter-plugin bitshuffle-serial-links python3-pytest git cmake doxygen python3-sphinx libboost-all-dev +RUN apt-get -qq install -y libpninexus3.2.0-dev libpninexus3.2.0 libh5cpp0.6.1-dev libh5cpp0.6.1 +RUN useradd -ms /bin/bash tango + +# # install latest h5cpp +# RUN mkdir -p /opt/h5cpp +# RUN mkdir -p /h5cpp-src +# RUN cd /h5cpp-src && git clone https://github.com/ess-dmsc/h5cpp && mkdir build +# RUN cd /h5cpp-src/build && cmake -DCMAKE_INSTALL_PREFIX=/opt/h5cpp -DCMAKE_BUILD_TYPE=Release -DH5CPP_CONAN=DISABLE -DH5CPP_DISABLE_TESTS=True -DH5CPP_WITH_BOOST=OFF ../h5cpp && make install -j4 +# ENV CPLUS_INCLUDE_PATH=/opt/h5cpp/include +# ENV LD_LIBRARY_PATH=/opt/h5cpp/lib +# ENV H5CPP=/opt/h5cpp/lib/cmake/h5cpp-0.6 +# ENV H5CPP_LOCAL_PATH=/opt/h5cpp +# ENV HDF5_HL_LOCAL_PATH=/usr/lib/x86_64-linux-gnu/hdf5/serial/ + +# # install latest linpninexus +# RUN mkdir -p /opt/libpninexus +# RUN mkdir -p /libpninexus-src +# RUN cd /libpninexus-src && git clone https://github.com/pni-libraries/libpninexus && mkdir build +# # RUN cd /libpninexus-src/build && cmake -Dh5cpp_DIR=$H5CPP -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/opt/h5cpp/ -DPNINEXUS_CONAN=DISABLE ../libpninexus && make -j4 && make install -j4 +# RUN cd /libpninexus-src/build && cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/opt/libpninexus/ -DPNINEXUS_CONAN=DISABLE ../libpninexus && make -j4 && make install -j4 +# ENV CPLUS_INCLUDE_PATH=$CPLUS_INCLUDE_PATH:/opt/libpninexus/include +# ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/libpninexus/lib +# ENV PNINEXUS_LOCAL_PATH=/opt/libpninexus + +ENV PKG_CONFIG_PATH=/home/tango/lib/pkgconfig +USER tango +WORKDIR /home/tango diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 5c67e983..416b98fb 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -24,7 +24,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - os: [debian12, debian11, debian10, ubuntu24.10, ubuntu24.04, ubuntu22.04] + os: [debian12, debian11, debian10, ubuntu25.04, ubuntu24.04, ubuntu22.04] steps: - uses: actions/checkout@v2 - uses: actions/setup-python@v2 diff --git a/doc/sphinx/h5cpp/datatype.rst b/doc/sphinx/h5cpp/datatype.rst index 292b7744..142ce710 100644 --- a/doc/sphinx/h5cpp/datatype.rst +++ b/doc/sphinx/h5cpp/datatype.rst @@ -10,7 +10,7 @@ Enumerations .. autosummary:: - pninexus.h5cpp.datatype.Class + Class Order Sign Norm diff --git a/src/cpp/h5cpp/attribute/attribute.cpp b/src/cpp/h5cpp/attribute/attribute.cpp index 71846b9e..5e766a15 100644 --- a/src/cpp/h5cpp/attribute/attribute.cpp +++ b/src/cpp/h5cpp/attribute/attribute.cpp @@ -115,7 +115,7 @@ void attribute_write(const hdf5::attribute::Attribute &self, Datatype mem_type = hdf5::datatype::create(array_adapter); if(has_variable_length_string_type(self) && (mem_type.get_class() == hdf5::datatype::Class::String)) - mem_type = String::variable(); + mem_type = self.datatype(); if((self.datatype().get_class() == hdf5::datatype::Class::Enum) && hdf5::datatype::is_bool(hdf5::datatype::Enum(self.datatype()))) mem_type = hdf5::datatype::create(); diff --git a/src/cpp/h5cpp/node/dataset.cpp b/src/cpp/h5cpp/node/dataset.cpp index b089c561..6e2ddf0f 100644 --- a/src/cpp/h5cpp/node/dataset.cpp +++ b/src/cpp/h5cpp/node/dataset.cpp @@ -51,11 +51,11 @@ void dataset_write_chunk(const hdf5::node::Dataset &self, hdf5::property::DatasetTransferList()) { numpy::ArrayAdapter array_adapter(data); - std::vector voffset; + std::vector voffset; for (boost::python::ssize_t i = 0, end = len(offset); i < end; ++i){ boost::python::object o = offset[i]; - boost::python::extract s(o); + boost::python::extract s(o); if (s.check()){ voffset.push_back(s()); } @@ -73,12 +73,12 @@ std::uint32_t dataset_read_chunk(const hdf5::node::Dataset &self, hdf5::property::DatasetTransferList()) { numpy::ArrayAdapter array_adapter(data); - std::vector voffset; + std::vector voffset; for (boost::python::ssize_t i = 0, end = len(offset); i < end; ++i){ boost::python::object o = offset[i]; - boost::python::extract s(o); + boost::python::extract s(o); if (s.check()){ voffset.push_back(s()); } @@ -87,14 +87,14 @@ std::uint32_t dataset_read_chunk(const hdf5::node::Dataset &self, return self.read_chunk(array_adapter,voffset,dtpl); } -long long unsigned int dataset_chunk_storage_size(const hdf5::node::Dataset &self, +hsize_t dataset_chunk_storage_size(const hdf5::node::Dataset &self, boost::python::list offset) { - std::vector voffset; + std::vector voffset; for (boost::python::ssize_t i = 0, end = len(offset); i < end; ++i){ boost::python::object o = offset[i]; - boost::python::extract s(o); + boost::python::extract s(o); if (s.check()){ voffset.push_back(s()); } diff --git a/src/pninexus/h5cpp/node/__init__.py b/src/pninexus/h5cpp/node/__init__.py index ba44f2dc..4a743a1f 100644 --- a/src/pninexus/h5cpp/node/__init__.py +++ b/src/pninexus/h5cpp/node/__init__.py @@ -302,7 +302,7 @@ def dataset_write(self, data, selection=None): if isinstance(self.datatype, datatype.String): if self.datatype.is_variable_length: - memory_type = datatype.String.variable() + memory_type = self.datatype # if the data is bool numpy array we have to convert it to a # int array