From a3548f5fbc6b41af5fe4edb645185509f5362acc Mon Sep 17 00:00:00 2001 From: Joseph Weston <joseph@weston.cloud> Date: Mon, 15 Jul 2019 13:26:44 +0200 Subject: [PATCH] unpin sphinx version Modify tutorial to remove warnings. --- doc/source/conf.py | 6 +++++- doc/source/tutorial/kpm.rst | 4 ++-- doc/source/tutorial/magnetic_field.rst | 2 +- doc/source/tutorial/plotting.rst | 3 +++ docker/kwant-latest.yml | 2 +- 5 files changed, 12 insertions(+), 5 deletions(-) diff --git a/doc/source/conf.py b/doc/source/conf.py index 080a71ff..80dfdef1 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -226,6 +226,8 @@ latex_documents = [ latex_engine = 'xelatex' +latex_use_xindy = False # Xindy not installable in CI environment + # The name of an image file (relative to this directory) to place at the top of # the title page. #latex_logo = None @@ -245,7 +247,9 @@ latex_domain_indices = False autosummary_generate = True autoclass_content = "both" -autodoc_default_flags = ['show-inheritance'] +autodoc_default_options = { + 'show-inheritance': True, +} # -- Teach Sphinx to document bound methods like functions --------------------- import types diff --git a/doc/source/tutorial/kpm.rst b/doc/source/tutorial/kpm.rst index f1d6650c..a5b2461b 100644 --- a/doc/source/tutorial/kpm.rst +++ b/doc/source/tutorial/kpm.rst @@ -538,9 +538,9 @@ the random vectors. (spectrum.energies, spectrum.densities * 8), [ (r'Longitudinal conductivity $\sigma_{xx} / 4$', - (energies, cond_array_xx / 4)), + (energies, cond_array_xx.real / 4)), (r'Hall conductivity $\sigma_{xy}$', - (energies, cond_array_xy))], + (energies, cond_array_xy.real))], ) .. _advanced_topics: diff --git a/doc/source/tutorial/magnetic_field.rst b/doc/source/tutorial/magnetic_field.rst index 02a5b4e9..db4753cd 100644 --- a/doc/source/tutorial/magnetic_field.rst +++ b/doc/source/tutorial/magnetic_field.rst @@ -161,7 +161,7 @@ with the Landau levels shown as dashed lines. kwant.plotter.bands(syst, ax=ax, params=params) h = landau_syst.hamiltonian_submatrix(params=params) - for ev in scipy.linalg.eigvals(h): + for ev in scipy.linalg.eigvalsh(h): ax.axhline(ev, linestyle='--') The dispersion and the Landau levels diverge with increasing energy, because the real space diff --git a/doc/source/tutorial/plotting.rst b/doc/source/tutorial/plotting.rst index ea04094a..64957a54 100644 --- a/doc/source/tutorial/plotting.rst +++ b/doc/source/tutorial/plotting.rst @@ -31,6 +31,9 @@ these options can be used to achieve various very different objectives. # -------------------------- # - demonstrate different ways of plotting + import warnings + warnings.simplefilter("ignore") + from matplotlib import pyplot import kwant diff --git a/docker/kwant-latest.yml b/docker/kwant-latest.yml index 8c35dce6..acfc37dc 100644 --- a/docker/kwant-latest.yml +++ b/docker/kwant-latest.yml @@ -23,7 +23,7 @@ dependencies: - pytest-flakes - pytest-pep8 # Documentation building - - sphinx=1.7.4 # later versions seem to have problems + - sphinx - numpydoc - requests - pip: -- GitLab