Commit 8ab957a7 authored by Andrea Lorenzon's avatar Andrea Lorenzon 💬
Browse files

fixed PATH priority

parent 408ef8a9
import sys
sys.path.insert(0, './modules')
import os
from typing import *
from flask import Flask
......@@ -7,7 +9,6 @@ from h5ceric import extractDatabase, plot_dispatcher
from h5decorators import nocache
import flask
sys.path.insert(0, './modules')
if not os.path.exists("./data"):
try:
......
__name__ = "h5ceric"
from typing import Dict, Any
from typing import Dict, Any, Union
import h5py
import numpy
......@@ -8,7 +8,7 @@ import numpy
############################ helper function: hdf5 generator from iterator ############################
def traverse_datasets(hdf_file: str):
def traverse_datasets(hdf_file: h5py.File):
""" Generator for hdf5 folder traversal
Yields a generator that iterates the datasets included in an hdf5 file.
......@@ -32,7 +32,7 @@ def list_datasets(name: str, prefix: str = '') -> Dict:
output = {"core": {"data": []}}
d = []
def iterate_hdf5(h5file : h5py.File) -> Any:
def iterate_hdf5(h5file: h5py.File) -> Any:
""" hdf5 file iterator
Iterates an hdf5 file, returning a JSON formatted to be used in JSTree visualization
......@@ -86,7 +86,7 @@ def dict_datasets(name: str) -> None:
############################ helper: hdf5 iterator ############################
def h5py_dataset_iterator(file: h5py.File, prefix: object = '') -> object:
def h5py_dataset_iterator(file: Union[h5py.File,h5py.Group], prefix: object = '') -> object:
"""Hdf5 dataset iterator
Recursively iterates a dataset, returns an iterator over all datasets
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment