From 44ec0623d6dccd91436d70907b64d839043a4d4c Mon Sep 17 00:00:00 2001 From: Lindsey Heagy Date: Thu, 21 Jul 2016 14:38:05 -0700 Subject: [PATCH] fixed formatting changes from quantified code, test links in docs --- SimPEG/Mesh/View.py | 4 ++-- docs/content/api_core/api_installing.rst | 2 +- tests/docs/test_docs.py | 16 ++++++++-------- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/SimPEG/Mesh/View.py b/SimPEG/Mesh/View.py index 0549b3ba..63a4d90c 100644 --- a/SimPEG/Mesh/View.py +++ b/SimPEG/Mesh/View.py @@ -171,7 +171,7 @@ class TensorView(object): iz = ix + iy*nX if iz < self.nCz: ax.text((ix+1)*(self.vectorNx[-1]-self.x0[0])-pad,(iy)*(self.vectorNy[-1]-self.x0[1])+pad, - '#{0:d}'.format(iz),color=annotationColor,verticalalignment='bottom',horizontalalignment='right',size='x-large') + '#{0:.0f}'.format(iz),color=annotationColor,verticalalignment='bottom',horizontalalignment='right',size='x-large') ax.set_title(vType) if showIt: plt.show() @@ -295,7 +295,7 @@ class TensorView(object): ax.set_xlabel('y' if normal == 'X' else 'x') ax.set_ylabel('y' if normal == 'Z' else 'z') - ax.set_title('Slice {0:d}'.format(ind)) + ax.set_title('Slice {0:.0f}'.format(ind)) return out diff --git a/docs/content/api_core/api_installing.rst b/docs/content/api_core/api_installing.rst index 23938dee..79d9f8e1 100644 --- a/docs/content/api_core/api_installing.rst +++ b/docs/content/api_core/api_installing.rst @@ -66,7 +66,7 @@ Numpy and Matlab Lessons in Python ----------------- -* `Software Carpentry `_ +* `Software Carpentry `_ * `Introduction to NumPy and Matplotlib `_ Editing Python diff --git a/tests/docs/test_docs.py b/tests/docs/test_docs.py index 947fba51..6381d34c 100644 --- a/tests/docs/test_docs.py +++ b/tests/docs/test_docs.py @@ -29,15 +29,15 @@ class Doc_Test(unittest.TestCase): # "%s"%(latex_path)]) # assert check == 0 - # def test_linkcheck(self): - # doctrees_path = os.path.sep.join(self.path_to_docs.split(os.path.sep) + ['_build']+['doctrees']) - # link_path = os.path.sep.join(self.path_to_docs.split(os.path.sep) + ['_build']) + def test_linkcheck(self): + doctrees_path = os.path.sep.join(self.path_to_docs.split(os.path.sep) + ['_build']+['doctrees']) + link_path = os.path.sep.join(self.path_to_docs.split(os.path.sep) + ['_build']) - # check = subprocess.call(["sphinx-build", "-nW", "-b", "linkcheck", "-d", - # "%s"%(doctrees_path), - # "%s"%(self.path_to_docs), - # "%s"%(link_path)]) - # assert check == 0 + check = subprocess.call(["sphinx-build", "-nW", "-b", "linkcheck", "-d", + "%s"%(doctrees_path), + "%s"%(self.path_to_docs), + "%s"%(link_path)]) + assert check == 0 if __name__ == '__main__': unittest.main()