Commit 016b9647 authored by Anton Akhmerov's avatar Anton Akhmerov
Browse files

Merge branch 'dependency-fixes' into 'master'

Dependency fixes

Closes #386

See merge request kwant/kwant!370
parents 5ce0bfe7 2754a59e
......@@ -21,9 +21,6 @@ variables:
image:
name: gcr.io/kaniko-project/executor:debug-v0.16.0
entrypoint: [""]
artifacts:
untracked: true
expire_in: 1 hour
before_script:
- mkdir -p /kaniko/.docker
- echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
......@@ -219,7 +216,8 @@ build documentation:
- build:latest
stage: test
script:
- make -C doc clean; make -C doc html SPHINXOPTS='-A website_deploy=True -n -W -D jupyter_execute_default_kernel=kwant-latest' SOURCE_LINK_TEMPLATE="$CI_PROJECT_URL"/blob/\$\$r/\$\$f
- python -c 'from matplotlib import pyplot' # Pre-generate font cache
- make -C doc clean; make -C doc html SPHINXOPTS='-A website_deploy=True -n -D jupyter_execute_default_kernel=kwant-latest' SOURCE_LINK_TEMPLATE="$CI_PROJECT_URL"/blob/\$\$r/\$\$f
artifacts:
paths:
- doc/build/html/
......@@ -231,7 +229,8 @@ build PDF documentation:
- build:latest
stage: test
script:
- make -C doc latex SPHINXOPTS='-n -W -D jupyter_execute_default_kernel=kwant-latest'
- python -c 'from matplotlib import pyplot' # Pre-generate font cache
- make -C doc latex SPHINXOPTS='-n -D jupyter_execute_default_kernel=kwant-latest'
- cd doc/build/latex
- make all-pdf
artifacts:
......
......@@ -8,8 +8,8 @@ The principal developers of Kwant are
* `Christoph Groth <mailto:christoph.groth@cea.fr>`_ (CEA Grenoble)
* `Michael Wimmer <https://michaelwimmer.org>`_ (TU Delft)
* `Anton Akhmerov <http://antonakhmerov.org>`_ (TU Delft)
* `Xavier Waintal <http://inac.cea.fr/Pisp/xavier.waintal>`_ (CEA Grenoble)
* `Anton Akhmerov <https://antonakhmerov.org>`_ (TU Delft)
* `Xavier Waintal <https://www.pheliqs.fr/en/Pages/Portrait/Xavier-Waintal.aspx>`_ (CEA Grenoble)
* `Joseph Weston <https://joseph.weston.cloud>`_ (TU Delft)
Contributors to Kwant include
......@@ -34,7 +34,7 @@ Contributors to Kwant include
We thank Christoph Gohlke for the creation of installers for Microsoft Windows.
`CEA <http://www.cea.fr>`_ is the French Commissariat à l'énergie atomique et aux
`CEA <https://www.cea.fr>`_ is the French Commissariat à l'énergie atomique et aux
énergies alternatives. The CEA is the copyright holder for the contributions of
C. W. Groth, X. Waintal, and its other employees involved in Kwant.
......
......@@ -15,7 +15,7 @@ cite the main paper that introduces Kwant:
C. W. Groth, M. Wimmer, A. R. Akhmerov, X. Waintal,
*Kwant: a software package for quantum transport*,
`New J. Phys. 16, 063065 (2014)
<https://iopscience.iop.org/1367-2630/16/6/063065/article>`_.
<https://doi.org/10.1088/1367-2630/16/6/063065>`_.
Other references we ask you to consider
......@@ -26,7 +26,7 @@ also cite the upcoming paper that describes the relevant algorithms. The
reference will also be added here once it is available.
Kwant owes much of its current performance to the use of the `MUMPS
<http://graal.ens-lyon.fr/MUMPS/>`_ library for solving systems of sparse linear
<https://graal.ens-lyon.fr/MUMPS/>`_ library for solving systems of sparse linear
equations. If you have done high-performance calculations, we suggest citing
P. R. Amestoy, I. S. Duff, J. S. Koster, J. Y. L’Excellent, SIAM. J. Matrix
......
......@@ -20,7 +20,7 @@ Obtaining the source code
Source distributions of Kwant (and Tinyarray) are available at the `downloads
section of the Kwant website <https://downloads.kwant-project.org/kwant/>`_ as well
as `PyPI <https://pypi.python.org/pypi/kwant>`_. The sources may be also
as `PyPI <https://pypi.org/project/kwant>`_. The sources may be also
cloned directly from the `official Kwant git repository
<https://gitlab.kwant-project.org/kwant/kwant>`_.
......@@ -29,13 +29,12 @@ Prerequisites
=============
Building Kwant requires
* `Python <https://www.python.org/>`_ 3.6 or above (Kwant 1.1 is the last
version to support Python 2),
* `NumPy <http://numpy.org/>`_ 1.13.3 or newer,
* `SciPy <https://www.scipy.org/>`_ 0.19.1 or newer,
* `LAPACK <http://netlib.org/lapack/>`_ and `BLAS <http://netlib.org/blas/>`_,
* `Python <https://www.python.org/>`_ 3.7 or above,
* `NumPy <https://numpy.org/>`_ 1.16.2 or newer,
* `SciPy <https://www.scipy.org/>`_ 1.1.0 or newer,
* `LAPACK <https://netlib.org/lapack/>`_ and `BLAS <https://netlib.org/blas/>`_,
(For best performance we recommend the free `OpenBLAS
<http://www.openblas.net/>`_ or the nonfree `MKL
<https://www.openblas.net/>`_ or the nonfree `MKL
<https://software.intel.com/en-us/intel-mkl>`_.)
* `Tinyarray <https://gitlab.kwant-project.org/kwant/tinyarray>`_ 1.2 or newer,
a NumPy-like Python package optimized for very small arrays,
......@@ -43,19 +42,20 @@ a NumPy-like Python package optimized for very small arrays,
C++.
The following software is highly recommended though not strictly required:
* `matplotlib <http://matplotlib.org/>`_ 2.1.1 or newer, for the module `kwant.plotter` and the tutorial,
* `SymPy <http://sympy.org/>`_ 1.1.1 or newer, for the subpackage `kwant.continuum`.
* `Qsymm <https://pypi.org/project/qsymm/>`_ 1.2.6 or newer, for the subpackage `kwant.qsymm`.
* `MUMPS <http://graal.ens-lyon.fr/MUMPS/>`_, a sparse linear algebra library
* `matplotlib <https://matplotlib.org/>`_ 3.0.2 or newer, for the module `kwant.plotter` and the tutorial,
* `plotly <https://plotly.com/>`_ 3.6.1 or newer, for the module `kwant.plotter` and the tutorial,
* `SymPy <https://sympy.org/>`_ 1.3.0 or newer, for the subpackage `kwant.continuum`.
* `Qsymm <https://pypi.org/project/qsymm/>`_ 1.3.0 or newer, for the subpackage `kwant.qsymm`.
* `MUMPS <https://graal.ens-lyon.fr/MUMPS/>`_, a sparse linear algebra library
that will in many cases speed up Kwant several times and reduce the memory
footprint. (Kwant uses only the sequential, single core version
of MUMPS. The advantages due to MUMPS as used by Kwant are thus independent
of the number of CPU cores of the machine on which Kwant runs.)
* The `py.test testing framework <http://pytest.org/>`_ 3.3.2 or newer for running the
* The `py.test testing framework <https://docs.pytest.org/>`_ 3.3.2 or newer for running the
tests included with Kwant.
In addition, to build a copy of Kwant that has been checked-out directly from
version control, you will also need `Cython <http://cython.org/>`_ 0.26.1 or
version control, you will also need `Cython <https://cython.org/>`_ 0.26.1 or
newer. You do not need Cython to build Kwant that has been unpacked from a
source .tar.gz-file.
......@@ -128,7 +128,7 @@ The section ``[kwant.linalg._mumps]`` may be used to adapt the build process.
Example ``build.conf`` for linking Kwant against a self-compiled MUMPS, `SCOTCH
<http://www.labri.fr/perso/pelegrin/scotch/>`_ and `METIS
<https://www.labri.fr/perso/pelegrin/scotch/>`_ and `METIS
<http://glaros.dtc.umn.edu/gkhome/metis/metis/overview>`_::
[mumps]
......@@ -143,7 +143,7 @@ Building the documentation
==========================
To build the documentation, the `Sphinx documentation generator
<http://www.sphinx-doc.org/en/stable/>`_ is required with ``numpydoc`` extension
<https://www.sphinx-doc.org/en/stable/>`_ is required with ``numpydoc`` extension
(version 0.5 or newer), as well as ``jupyter-sphinx`` (version 0.2 or newer).
If PDF documentation is to be built, the tools
from the `libRSVG <https://wiki.gnome.org/action/show/Projects/LibRsvg>`_
......@@ -195,72 +195,6 @@ By default the package will be installed under ``/usr/local``. Run ``python3
setup.py --help install`` for installation options.
Mac OS X: MacPorts
==================
The following instructions are valid for Kwant 1.1 with Python 2.7. They need
to be updated for Kwant 1.2. (Help is welcome.)
The required dependencies of Kwant are best installed with one of the packaging
systems. Here we only consider the case of `MacPorts
<https://www.macports.org>`_ in detail. Some remarks for homebrew are given
below.
1. Install a recent version of MacPorts, as explained in the `installation
instructions of MacPorts <https://www.macports.org/install.php>`_.
2. Install the required dependencies::
sudo port install gcc47 python27 py27-numpy py27-scipy py27-matplotlib mumps_seq
sudo port select --set python python27
3. Unpack Tinyarray, enter its directory, build and install::
python setup.py build
sudo python setup.py install
4. Unpack Kwant, go to the Kwant directory, and edit ``build.conf`` to read::
[mumps]
include_dirs = /opt/local/include
library_dirs = /opt/local/lib
libraries = zmumps_seq mumps_common_seq pord_seq esmumps scotch scotcherr mpiseq gfortran
5. Then, build and install Kwant. ::
CC=gcc-mp-4.7 LDSHARED='gcc-mp-4.7 -shared -undefined dynamic_lookup' python setup.py build
sudo python setup.py install
You might note that installing Kwant on Mac OS X is somewhat more involved than
installing on Linux. Part of the reason is that we need to mix Fortran and C
code in Kwant: While C code is usually compiled using Apple compilers,
Fortran code must be compiled with the Gnu Fortran compiler (there is
no Apple Fortran compiler). For this reason we force the Gnu compiler suite
with the environment variables ``CC`` and ``LDSHARED`` as shown above.
Mac OS X: homebrew
==================
The following instructions are valid for Kwant 1.1 with Python 2.7. They need
to be updated for Kwant 1.2. (Help is welcome.)
It is also possible to build Kwant using homebrew. The dependencies can be
installed as ::
brew install gcc python
brew tap homebrew/science
brew tap homebrew/python
brew tap kwant-project/kwant
pip install pytest pytest-runner six
brew install numpy scipy matplotlib
Note that during the installation you will be told which paths to add when you
want to compile/link against scotch/metis/mumps; you need to add these to the
build.conf file. Also, when linking against MUMPS, one needs also to link
against METIS (in addition to the libraries needed for MacPorts).
Microsoft Windows
=================
......
......@@ -28,12 +28,12 @@ Kwant can calculate
Other computations involving tight-binding Hamiltonians can be implemented
easily.
See the `Kwant web site <http://kwant-project.org/>`_ for the latest stable
See the `Kwant website <https://kwant-project.org/>`_ for the latest stable
version. The current development version is available via the `Kwant gitlab
instance <https://gitlab.kwant-project.org/kwant/kwant>`_. Contributions are
welcome.
A `mailing list <http://kwant-project.org/community>`_ exists for general
A `mailing list <https://kwant-project.org/community>`_ exists for general
discussions related to Kwant. Please report bugs and other issues using the
`issue tracker <https://gitlab.kwant-project.org/kwant/kwant/issues>`_.
......
......@@ -338,7 +338,7 @@ Push the tag to the official Kwant repository::
PyPI
----
Install `twine <https://pypi.python.org/pypi/twine>`_ and run the following
Install `twine <https://pypi.org/project/twine>`_ and run the following
(this requires a file ~/.pypirc with a valid username and password: ask
Christoph Groth to add you as a maintainer on PyPI, if you are not already)::
......@@ -382,7 +382,7 @@ sure to update the codenames and the versions)::
Version: 9.0
Architectures: i386 amd64 source
Components: main
Description: Unofficial Debian package repository of http://kwant-project.org/
Description: Unofficial Debian package repository of https://kwant-project.org/
SignWith: C3F147F5980F3535
Origin: Kwant project
......@@ -391,7 +391,7 @@ sure to update the codenames and the versions)::
Version: 10.0
Architectures: i386 amd64 source
Components: main
Description: Unofficial Debian package repository of http://kwant-project.org/
Description: Unofficial Debian package repository of https://kwant-project.org/
SignWith: C3F147F5980F3535
If the config had to be updated execute::
......
......@@ -2,9 +2,9 @@
#
# This file is part of Kwant. It is subject to the license terms in the file
# LICENSE.rst found in the top-level directory of this distribution and at
# http://kwant-project.org/license. A list of Kwant authors can be found in
# https://kwant-project.org/license. A list of Kwant authors can be found in
# the file AUTHORS.rst at the top-level directory of this distribution and at
# http://kwant-project.org/authors.
# https://kwant-project.org/authors.
"""Pytest plugin to ignore packages that have uninstalled dependencies.
This ignores packages on test collection, which is required when the
......
......@@ -38,7 +38,7 @@ sys.path.insert(0, os.path.abspath('../sphinxext'))
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.autosummary',
'sphinx.ext.todo', 'sphinx.ext.mathjax', 'numpydoc',
'kwantdoc', 'sphinx.ext.linkcode', 'jupyter_sphinx.execute',
'kwantdoc', 'sphinx.ext.linkcode', 'jupyter_sphinx',
'sphinxcontrib.rsvgconverter']
# Add any paths that contain templates here, relative to this directory.
......@@ -198,7 +198,6 @@ htmlhelp_basename = 'kwantdoc'
# -- Options for LaTeX output --------------------------------------------------
# http://thread.gmane.org/gmane.comp.python.sphinx.devel/4220/focus=4238
latex_elements = {'papersize': 'a4paper',
'release': '',
'releasename': '',
......@@ -271,7 +270,7 @@ class BoundMethodDocumenter(autodoc.FunctionDocumenter):
@classmethod
def can_document_member(cls, member, membername, isattr, parent):
# Return True iff `member` is a bound method. Taken from
# <http://stackoverflow.com/a/1260881>.
# <https://stackoverflow.com/a/1260881>.
return (isinstance(member, types.MethodType) and
member.__self__ is not None and
not issubclass(member.__self__.__class__, type) and
......
......@@ -3,7 +3,7 @@
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:cc="https://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
......
......@@ -3,7 +3,7 @@
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:cc="https://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
......
......@@ -3,7 +3,7 @@
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:cc="https://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
......
......@@ -21,7 +21,7 @@ New MUMPS-based solver
----------------------
The code for sparse matrix solvers has been reorganized and a new solver has
been added next to `kwant.solvers.sparse`: `kwant.solvers.mumps`. The new
solver uses the `MUMPS <http://graal.ens-lyon.fr/MUMPS/>`_ software package and
solver uses the `MUMPS <https://graal.ens-lyon.fr/MUMPS/>`_ software package and
is much (typically several times) faster than the UMFPACK-based old solver.
In addition, MUMPS uses considerably less memory for a given system while at
the same time it is able to take advantage of more than 2 GiB of RAM.
......
......@@ -122,7 +122,7 @@ Improving or adding to Kwant's tutorial is now much simpler. Now
the text and code for each tutorial is kept in the same file, making
it easy to see where changes need to be made, and images generated by
the code are inserted directly into the document thanks to the magic of
`jupyter-sphinx <https://github.com/jupyter-widgets/jupyter-sphinx/>`_.
`jupyter-sphinx <https://github.com/jupyter/jupyter-sphinx/>`_.
It has never been easier to get started contributing to Kwant by
helping us improve our documentation.
......
......@@ -9,21 +9,8 @@ Otherwise, this package has only very limited functionality of its own.
Generic functionality
---------------------
..
TODO: Once we depend on Sphinx 1.8, the documentation of __version__ can be
put into the "docstring": https://github.com/sphinx-doc/sphinx/issues/344
The version of Kwant is available under the name ``__version__``.
This string respects `PEP 440 <https://www.python.org/dev/peps/pep-0440/>`_
and has the following format
- Released version: '1.3.0', '1.3.1', etc.
- Alpha version: '1.2.0a0', '1.2.0a1', etc.
- Beta version: '1.1.0b0', '1.1.0b1', etc.
- Development version (derived from ``git describe --first-parent --dirty``):
'1.3.2.dev27+gdecf6893', '1.1.1.dev10+gabcd012.dirty', etc.
- Development version with incomplete information: 'unknown',
'unknown+g0123abc', etc.
.. autodata:: kwant.__version__
.. autosummary::
:toctree: generated/
......
......@@ -3,7 +3,7 @@
.. module:: kwant.solvers.mumps
This solver uses `MUMPS <http://graal.ens-lyon.fr/MUMPS/>`_. (Only the
This solver uses `MUMPS <https://graal.ens-lyon.fr/MUMPS/>`_. (Only the
sequential, single core version of MUMPS is used.) MUMPS is a very efficient
direct sparse solver that can take advantage of memory beyond 3GiB for the
solution of large problems. Furthermore, it offers a choice of several
......
......@@ -150,7 +150,7 @@ Printing the Builder produced by ``discretize`` shows the source code of its ons
When working interactively in `Jupyter notebooks <https://jupyter.org/>`_
it can be useful to use this to see a symbolic representation of
the discretized Hamiltonian. This works best when combined with ``sympy``
`Pretty Printing <http://docs.sympy.org/latest/tutorial/printing.html#setting-up-pretty-printing>`_.
`Pretty Printing <https://docs.sympy.org/latest/tutorial/printing.html#setting-up-pretty-printing>`_.
- The symbolic result of discretization obtained with
``discretize_symbolic`` can be converted into a
......
......@@ -750,7 +750,7 @@ Finally, we use the following standard Python construct [#]_ to execute
.. jupyter-execute::
# Call the main function if the script gets executed (as opposed to imported).
# See <http://docs.python.org/library/__main__.html>.
# See <https://docs.python.org/library/__main__.html>.
if __name__ == '__main__':
main()
......
......@@ -105,7 +105,7 @@ This gives the result:
:hide-code:
# Call the main function if the script gets executed (as opposed to imported).
# See <http://docs.python.org/library/__main__.html>.
# See <https://docs.python.org/library/__main__.html>.
if __name__ == '__main__':
main()
......
......@@ -36,11 +36,11 @@ Here :math:`\sigma_{x,y,z}` denote the Pauli matrices.
It turns out that this well studied Rashba-Hamiltonian has some peculiar
properties in (ballistic) nanowires: It was first predicted theoretically
in `Phys. Rev. Lett. 90, 256601 (2003)
<http://prl.aps.org/abstract/PRL/v90/i25/e256601>`_ that such a system should
<https://doi.org/10.1103/PhysRevLett.90.256601>`_ that such a system should
exhibit non-monotonic conductance steps due to a spin-orbit gap. Only
very recently, this non-monotonic behavior has been supposedly
observed in experiment: `Nature Physics 6, 336 (2010)
<http://www.nature.com/nphys/journal/v6/n5/abs/nphys1626.html>`_. Here
<https://doi.org/10.1038/nphys1626>`_. Here
we will show that a very simple extension of our previous examples will
exactly show this behavior (Note though that no care was taken to choose
realistic parameters).
......@@ -48,7 +48,7 @@ realistic parameters).
The tight-binding model corresponding to the Rashba-Hamiltonian naturally
exhibits a 2x2-matrix structure of onsite energies and hoppings. In order to
use matrices in our program, we import the Tinyarray package. (`NumPy
<http://www.numpy.org/>`_ would work as well, but Tinyarray is much faster
<https://numpy.org/>`_ would work as well, but Tinyarray is much faster
for small arrays.)
.. jupyter-execute::
......@@ -61,9 +61,9 @@ for small arrays.)
# ------------------
# Gaps in quantum wires with spin-orbit coupling and Zeeman splititng,
# as theoretically predicted in
# http://prl.aps.org/abstract/PRL/v90/i25/e256601
# https://doi.org/10.1103/PhysRevLett.90.256601
# and (supposedly) experimentally oberved in
# http://www.nature.com/nphys/journal/v6/n5/abs/nphys1626.html
# https://doi.org/10.1038/nphys1626
#
# Kwant features highlighted
# --------------------------
......
......@@ -2,9 +2,9 @@
#
# This file is part of Kwant. It is subject to the license terms in the file
# LICENSE.rst found in the top-level directory of this distribution and at
# http://kwant-project.org/license. A list of Kwant authors can be found in
# https://kwant-project.org/license. A list of Kwant authors can be found in
# the file AUTHORS.rst at the top-level directory of this distribution and at
# http://kwant-project.org/authors.
# https://kwant-project.org/authors.
"""Simple sphinx extension that allows for a section that can be
hidden/shown on click using javascript"""
......
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