From f7e2523200ea9f42f45f7573668014818b97b666 Mon Sep 17 00:00:00 2001 From: "Saurabh Pradhan(on Thinkstation)" Date: Thu, 5 Dec 2024 18:45:10 +0100 Subject: [PATCH] update theme to pydata --- .gitignore | 1 + docs/build.rst | 2 +- docs/conf.py | 19 ++++++++- docs/docnrgcore.rst | 2 +- docs/index.rst | 1 + nrgcore/include/utils/h5stream.hpp | 65 +++++++++++++++--------------- 6 files changed, 54 insertions(+), 36 deletions(-) diff --git a/.gitignore b/.gitignore index 3e99768..dd87127 100644 --- a/.gitignore +++ b/.gitignore @@ -3,5 +3,6 @@ *tempfile* .ccls-cache/ .cache/ +build/ poetry.lock compile_commands.json diff --git a/docs/build.rst b/docs/build.rst index d837005..6eeddd6 100644 --- a/docs/build.rst +++ b/docs/build.rst @@ -1,5 +1,5 @@ =========================== -QuickStart - +QuickStart =========================== .. contents:: diff --git a/docs/conf.py b/docs/conf.py index 21aa8d8..8e60c83 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -54,7 +54,7 @@ # version to be the same. For your own projects, you would NOT do this! version = "0.0.1" # exhale.__version__ # The full version, including alpha/beta/rc tags. -release = "rc" # exhale.__version__ +# release = "rc" # exhale.__version__ # -- Options for HTML output ------------------------------------------------- @@ -77,6 +77,23 @@ # "donate.html", # ] # } +html_theme_options = { + "header_links_before_dropdown": 4, + "icon_links": [ + { + # Label for this link + "name": "GitHub", + # URL where the link will redirect + "url": "https://github.com/srbhp/nrgplusplus", # required + # Icon class (if "type": "fontawesome"), or path to local image (if "type": "local") + "icon": "fa-brands fa-square-github", + # The type of image to be used (see below for details) + "type": "fontawesome", + } + ], +} +html_theme_options = {} + # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, diff --git a/docs/docnrgcore.rst b/docs/docnrgcore.rst index 1ff24ec..a78932f 100644 --- a/docs/docnrgcore.rst +++ b/docs/docnrgcore.rst @@ -1,4 +1,4 @@ -Core class of the ``nrgcore`` system +``nrgcore`` class ================ .. doxygenclass:: nrgcore diff --git a/docs/index.rst b/docs/index.rst index 70e24bd..3b7d47d 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -1,3 +1,4 @@ +========================================================= nrgplusplus ========================================================= diff --git a/nrgcore/include/utils/h5stream.hpp b/nrgcore/include/utils/h5stream.hpp index dab7d31..1f37f02 100644 --- a/nrgcore/include/utils/h5stream.hpp +++ b/nrgcore/include/utils/h5stream.hpp @@ -12,7 +12,7 @@ * along with this program. If not, see . */ #pragma once -#include "H5Cpp.h" +#include #include #include #include @@ -81,16 +81,16 @@ namespace h5stream { class dspace { public: H5::DataSet dataset; - explicit dspace(const H5::DataSet &datasetx) : dataset(datasetx){}; + explicit dspace(const H5::DataSet &datasetx) : dataset(datasetx) {}; /** * @brief Write Metadata * - * @tparam T - * @param data - * @param dataname + * @tparam T : Type of the array + * @param data : Array that needs to stored + * @param dataname : DataSet name */ template - void write_atr(const T data, const H5std_string &dataname) { + void write_atr(const T &data, const H5std_string &dataname) { auto type = get_datatype_for_hdf5(); H5::DataSpace attr_dataspace = H5::DataSpace(H5S_SCALAR); H5::Attribute attribute = @@ -100,9 +100,9 @@ class dspace { /** * @brief Read Metadata * - * @tparam T - * @param data - * @param dataname + * @tparam T : Type of the array + * @param data : Array that needs to stored + * @param dataname : DataSet name */ template void read_atr(T &data, const H5std_string &dataname) { // auto type = get_datatype_for_hdf5(); @@ -121,13 +121,13 @@ class dspace { class gspace { // for group public: H5::Group dataset; - explicit gspace(const H5::Group &datasetx) : dataset(datasetx){}; + explicit gspace(const H5::Group &datasetx) : dataset(datasetx) {}; /** * @brief Write Metadata * - * @tparam T - * @param data - * @param dataname + * @tparam T : Type of the array + * @param data : Array that needs to stored + * @param dataname : DataSet name */ template void write_atr(const T data, const H5std_string &dataname) { @@ -140,9 +140,9 @@ class gspace { // for group /** * @brief Read Metadata * - * @tparam T - * @param data - * @param dataname + * @tparam T : Type of the array + * @param data : Array that needs to stored + * @param dataname : DataSet name */ template void read_atr(T &data, const H5std_string &dataname) { // auto type = get_datatype_for_hdf5(); @@ -302,9 +302,9 @@ class h5stream { /** * @brief * - * @param datasetName - * @param data - * @param data_size + * @tparam T : Type of the array + * @param data : Array that needs to stored + * @param dataname : DataSet name */ template void write(const H5std_string &datasetName, const T *data, @@ -331,8 +331,8 @@ class h5stream { /** * @brief * - * @param data - * @param datasetName + * @param data : Array that needs to stored + * @param dataname : DataSet name */ template class vec = std::vector> void read(vec &data, const H5std_string &datasetName) { @@ -359,8 +359,8 @@ class h5stream { /** * @brief Read the data * - * @param data - * @param datasetName + * @param data : Array of data + * @param datasetName : dataset name */ template class vec> void read(std::vector> &data, const H5std_string &datasetName) { @@ -402,7 +402,7 @@ class h5stream { /** * @brief * - * @param dataset_name + * @param dataset_name : dataset name * @return */ dspace getDataspace(const H5std_string &dataset_name) { @@ -411,7 +411,7 @@ class h5stream { /** * @brief * - * @param dataset_name + * @param dataset_name : DataSet name * @return */ gspace getGroup(const H5std_string &dataset_name) { @@ -420,7 +420,7 @@ class h5stream { /** * @brief Create a group name * - * @param group_name + * @param group_name : Group name * @return */ auto createGroup(const H5std_string &group_name) { @@ -430,10 +430,9 @@ class h5stream { // write metadata at the root label /** * @brief Write Metadata - * - * @tparam T `datatype` - * @param data - * @param label + * @tparam T : Type of the array + * @param data : Array that needs to stored + * @param dataname : DataSet name */ template void writeMetadata(const T &data, const H5std_string &label) { @@ -443,10 +442,10 @@ class h5stream { } /** * @brief + * @tparam T : Type of the array + * @param data : Array that needs to stored + * @param dataname : DataSet name * - * @tparam T - * @param data - * @param label */ template void readMetadata(T &data, const H5std_string &label) { //