Commit 25f49c19 authored by Pierre Augier's avatar Pierre Augier

Increase the version for rtd (0.0.14)

parent 20632792e0af
The main contributors are:
- Pierre Augier (LEGI, CNRS, UGA)
- Cyrille Bonamy (LEGI, CNRS, UGA)
- Ashwin Vishnu (KTH)
......
......@@ -30,26 +30,26 @@ from fluiddyn.util.util import create_object_from_file
from fluiddyn.util import constants
from fluiddyn._version import __version__
# temporary, for compatibility with an old fluidlab...
def _verif_names_modules(name_mod, path_h5_file, key_file):
# # temporary, for compatibility with an old fluidlab...
# def _verif_names_modules(name_mod, path_h5_file, key_file):
if isinstance(name_mod, str):
name_mod = name_mod.encode('utf-8')
# if isinstance(name_mod, str):
# name_mod = name_mod.encode('utf-8')
exp_TC_old = 'fluidlab.experiments.taylorcouette_'
exp_TC_new = 'fluidlab.exp.taylorcouette.'
# exp_TC_old = 'fluidlab.experiments.taylorcouette_'
# exp_TC_new = 'fluidlab.exp.taylorcouette.'
new_names_modules = {
exp_TC_old + 'linearprofil': exp_TC_new + 'linearprofile',
exp_TC_old + 'quadprofil': exp_TC_new + 'quadprofile',
exp_TC_old + '2layers': exp_TC_new + 'twolayers',
'fluidlab.tanks': 'fluidlab.tanks'
}
# new_names_modules = {
# exp_TC_old + 'linearprofil': exp_TC_new + 'linearprofile',
# exp_TC_old + 'quadprofil': exp_TC_new + 'quadprofile',
# exp_TC_old + '2layers': exp_TC_new + 'twolayers',
# 'fluidlab.tanks': 'fluidlab.tanks'
# }
if name_mod in list(new_names_modules.keys()):
name_mod = new_names_modules[name_mod]
import h5py
with h5py.File(path_h5_file, 'r+') as f:
f.attrs[key_file] = name_mod
# if name_mod in list(new_names_modules.keys()):
# name_mod = new_names_modules[name_mod]
# import h5py
# with h5py.File(path_h5_file, 'r+') as f:
# f.attrs[key_file] = name_mod
return name_mod
# return name_mod
......@@ -11,4 +11,4 @@ http://legacy.python.org/dev/peps/pep-0386/
'a' or 'alpha' means alpha version (internal testing),
'b' or 'beta' means beta version (external testing).
"""
__version__ = '0.0.13'
__version__ = '0.0.14'
......@@ -103,7 +103,7 @@ def create_object_from_file(str_path, *args, **kwargs):
f.attrs['module_name'] = 'fluiddyn.lab.tanks'
except IOError:
pass
with h5py.File(path, 'r') as f:
class_name = f.attrs['class_name']
module_name = f.attrs['module_name']
......@@ -112,14 +112,14 @@ def create_object_from_file(str_path, *args, **kwargs):
class_name = class_name[0]
module_name = module_name[0]
# temporary... for compatibility
if class_name.startswith('<class '):
class_name = class_name[8:-2].split('.')[-1]
with h5py.File(path, 'r+') as f:
f.attrs['class_name'] = class_name
# # temporary... for compatibility
# if class_name.startswith('<class '):
# class_name = class_name[8:-2].split('.')[-1]
# with h5py.File(path, 'r+') as f:
# f.attrs['class_name'] = class_name
module_name = fld._verif_names_modules(
module_name, path, key_file='module_name')
# module_name = fld._verif_names_modules(
# module_name, path, key_file='module_name')
# fromlist has to be a not-empty so that __import__('A.B',
# ...) returns B rather than A.
......
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