Skip to content

Commit

Permalink
update theme to pydata
Browse files Browse the repository at this point in the history
  • Loading branch information
srbhp committed Dec 5, 2024
1 parent fe57512 commit f7e2523
Show file tree
Hide file tree
Showing 6 changed files with 54 additions and 36 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
*tempfile*
.ccls-cache/
.cache/
build/
poetry.lock
compile_commands.json
2 changes: 1 addition & 1 deletion docs/build.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
===========================
QuickStart -
QuickStart
===========================

.. contents::
Expand Down
19 changes: 18 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 -------------------------------------------------

Expand All @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion docs/docnrgcore.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Core class of the ``nrgcore`` system
``nrgcore`` class
================

.. doxygenclass:: nrgcore
Expand Down
1 change: 1 addition & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
=========================================================
nrgplusplus
=========================================================

Expand Down
65 changes: 32 additions & 33 deletions nrgcore/include/utils/h5stream.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#include "H5Cpp.h"
#include <H5Cpp.h>
#include <iostream>
#include <stdexcept>
#include <string>
Expand Down Expand Up @@ -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 <typename T>
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<T>();
H5::DataSpace attr_dataspace = H5::DataSpace(H5S_SCALAR);
H5::Attribute attribute =
Expand All @@ -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 <typename T> void read_atr(T &data, const H5std_string &dataname) {
// auto type = get_datatype_for_hdf5<T>();
Expand All @@ -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 <typename T>
void write_atr(const T data, const H5std_string &dataname) {
Expand All @@ -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 <typename T> void read_atr(T &data, const H5std_string &dataname) {
// auto type = get_datatype_for_hdf5<T>();
Expand Down Expand Up @@ -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 <typename T = double>
void write(const H5std_string &datasetName, const T *data,
Expand All @@ -331,8 +331,8 @@ class h5stream {
/**
* @brief
*
* @param data
* @param datasetName
* @param data : Array that needs to stored
* @param dataname : DataSet name
*/
template <typename T = double, template <typename...> class vec = std::vector>
void read(vec<T> &data, const H5std_string &datasetName) {
Expand All @@ -359,8 +359,8 @@ class h5stream {
/**
* @brief Read the data
*
* @param data
* @param datasetName
* @param data : Array of data
* @param datasetName : dataset name
*/
template <typename T = double, template <typename...> class vec>
void read(std::vector<vec<T>> &data, const H5std_string &datasetName) {
Expand Down Expand Up @@ -402,7 +402,7 @@ class h5stream {
/**
* @brief
*
* @param dataset_name
* @param dataset_name : dataset name
* @return
*/
dspace getDataspace(const H5std_string &dataset_name) {
Expand All @@ -411,7 +411,7 @@ class h5stream {
/**
* @brief
*
* @param dataset_name
* @param dataset_name : DataSet name
* @return
*/
gspace getGroup(const H5std_string &dataset_name) {
Expand All @@ -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) {
Expand All @@ -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 <typename T>
void writeMetadata(const T &data, const H5std_string &label) {
Expand All @@ -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 <typename T> void readMetadata(T &data, const H5std_string &label) {
//
Expand Down

0 comments on commit f7e2523

Please sign in to comment.