Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
K
kwant
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Joseph Weston
kwant
Commits
da454d64
Commit
da454d64
authored
6 years ago
by
Christoph Groth
Browse files
Options
Downloads
Plain Diff
Merge branch 'refname' into stable
parents
3db8bc41
025a8255
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
.gitlab-ci.yml
+1
-1
1 addition, 1 deletion
.gitlab-ci.yml
RELEASE.rst
+1
-1
1 addition, 1 deletion
RELEASE.rst
doc/source/conf.py
+17
-6
17 additions, 6 deletions
doc/source/conf.py
doc/source/reference/kwant.rst
+14
-0
14 additions, 0 deletions
doc/source/reference/kwant.rst
with
33 additions
and
8 deletions
.gitlab-ci.yml
+
1
−
1
View file @
da454d64
...
@@ -38,7 +38,7 @@ check for dependencies installed:
...
@@ -38,7 +38,7 @@ check for dependencies installed:
build documentation
:
build documentation
:
stage
:
test
stage
:
test
script
:
script
:
-
make -C doc realclean; make -C doc html SPHINXOPTS='-A website_deploy=True -n -W'
REFNAME="${CI_COMMIT_TAG:-$CI_COMMIT_SHA}" SOURCE_URL
="$CI_PROJECT_URL"/blob
-
make -C doc realclean; make -C doc html SPHINXOPTS='-A website_deploy=True -n -W'
SOURCE_LINK_TEMPLATE
="$CI_PROJECT_URL"/blob
/$$r/$$f
artifacts
:
artifacts
:
paths
:
paths
:
-
doc/build/html/
-
doc/build/html/
...
...
This diff is collapsed.
Click to expand it.
RELEASE.rst
+
1
−
1
View file @
da454d64
...
@@ -112,7 +112,7 @@ Building the documentation requires 'sphinx' and a Latex installation.
...
@@ -112,7 +112,7 @@ Building the documentation requires 'sphinx' and a Latex installation.
First build the HTML and PDF documentation::
First build the HTML and PDF documentation::
./setup.py build
./setup.py build
make -C doc realclean html latex SPHINXOPTS='-A website_deploy=True -n -W'
REFNAME="<version>"
make -C doc realclean html latex SPHINXOPTS='-A website_deploy=True -n -W'
cd doc/build/latex
cd doc/build/latex
make all-pdf
make all-pdf
...
...
This diff is collapsed.
Click to expand it.
doc/source/conf.py
+
17
−
6
View file @
da454d64
...
@@ -11,8 +11,9 @@
...
@@ -11,8 +11,9 @@
# All configuration values have a default; values that are commented out
# All configuration values have a default; values that are commented out
# serve to show the default.
# serve to show the default.
import
sys
,
os
import
sys
import
os
import
string
from
distutils.util
import
get_platform
from
distutils.util
import
get_platform
sys
.
path
.
insert
(
0
,
"
../../build/lib.{0}-{1}.{2}
"
.
format
(
sys
.
path
.
insert
(
0
,
"
../../build/lib.{0}-{1}.{2}
"
.
format
(
get_platform
(),
*
sys
.
version_info
[:
2
]))
get_platform
(),
*
sys
.
version_info
[:
2
]))
...
@@ -298,8 +299,18 @@ def linkcode_resolve(domain, info):
...
@@ -298,8 +299,18 @@ def linkcode_resolve(domain, info):
filename
=
'
kwant/%s#L%d-%d
'
%
find_source
()
filename
=
'
kwant/%s#L%d-%d
'
%
find_source
()
except
Exception
:
except
Exception
:
filename
=
info
[
'
module
'
].
replace
(
'
.
'
,
'
/
'
)
+
'
.py
'
filename
=
info
[
'
module
'
].
replace
(
'
.
'
,
'
/
'
)
+
'
.py
'
source_branch
=
os
.
environ
.
get
(
'
REFNAME
'
,
'
master
'
)
url
=
os
.
environ
.
get
(
'
SOURCE_URL
'
,
"
https://gitlab.kwant-project.org/kwant/kwant/blob
"
)
return
"
{}/{}/{}
"
.
format
(
url
,
source_branch
,
filename
)
# The following relies on the documented format of kwant.__version__.
rel
=
release
.
rstrip
(
'
.dirty
'
)
if
'
.dev
'
in
rel
:
try
:
refname
=
rel
[
rel
.
index
(
'
+g
'
)
+
2
:]
except
ValueError
:
return
else
:
refname
=
'
v
'
+
rel
templ
=
os
.
environ
.
get
(
"
SOURCE_LINK_TEMPLATE
"
,
"
https://gitlab.kwant-project.org/kwant/kwant/blob/$r/$f
"
)
return
string
.
Template
(
templ
).
safe_substitute
(
r
=
refname
,
f
=
filename
)
This diff is collapsed.
Click to expand it.
doc/source/reference/kwant.rst
+
14
−
0
View file @
da454d64
...
@@ -9,7 +9,21 @@ Otherwise, this package has only very limited functionality of its own.
...
@@ -9,7 +9,21 @@ Otherwise, this package has only very limited functionality of its own.
Generic functionality
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__``.
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.
.. autosummary::
.. autosummary::
:toctree: generated/
:toctree: generated/
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment