diff --git a/docs/source/conf.py b/docs/source/conf.py index 0f2756a1..ea10b71a 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -13,15 +13,15 @@ # All configuration values have a default; values that are commented out # serve to show the default. -import os, sys +import os +import re +import sys # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. sys.path.insert(0, os.path.abspath('../..')) -import gprMax - # -- General configuration ------------------------------------------------ # If your documentation needs a minimal Sphinx version, state it here. @@ -72,7 +72,9 @@ author = 'Craig Warren and Antonis Giannopoulos' # built documents. # # The short X.Y version. -version = gprMax.__version__ +with open('../../gprMax/_version.py', 'r') as fd: + version = re.search(r'^__version__\s*=\s*[\'"]([^\'"]*)[\'"]', + fd.read(), re.MULTILINE).group(1) # The full version, including alpha/beta/rc tags. release = version diff --git a/gprMax/xdmf.py b/gprMax/xdmf.py index 9ee09953..b6d734ef 100644 --- a/gprMax/xdmf.py +++ b/gprMax/xdmf.py @@ -1,7 +1,7 @@ import copy import h5py -#from lxml import etree +from lxml import etree import numpy as np from gprMax.grid import Grid