Commit 32259813 authored by Viacheslav Ostroukh's avatar Viacheslav Ostroukh 🚲
Browse files

Merge branch 'test-stable-ci-fix' into 'stable'

Merge CI fixes from master

See merge request !392
parents bd41cfd2 39409e81
Pipeline #74776 passed with stages
in 9 minutes and 14 seconds
...@@ -19,20 +19,14 @@ variables: ...@@ -19,20 +19,14 @@ variables:
stage: build-env stage: build-env
when: manual when: manual
image: image:
name: gcr.io/kaniko-project/executor:debug name: gcr.io/kaniko-project/executor:debug-v0.16.0
entrypoint: [""] entrypoint: [""]
artifacts:
untracked: true
expire_in: 1 hour
before_script: before_script:
- mkdir -p /root/.docker - mkdir -p /kaniko/.docker
- echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /root/.docker/config.json - echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
build-env:ubuntu: build-env:ubuntu:
<<: *build-env <<: *build-env
only:
changes:
- docker/Dockerfile.ubuntu
script: script:
- /kaniko/executor - /kaniko/executor
--context $CI_PROJECT_DIR/docker --context $CI_PROJECT_DIR/docker
...@@ -41,9 +35,6 @@ build-env:ubuntu: ...@@ -41,9 +35,6 @@ build-env:ubuntu:
build-env:debian: build-env:debian:
<<: *build-env <<: *build-env
only:
changes:
- docker/Dockerfile.debian
script: script:
- /kaniko/executor - /kaniko/executor
--context $CI_PROJECT_DIR/docker --context $CI_PROJECT_DIR/docker
...@@ -52,10 +43,6 @@ build-env:debian: ...@@ -52,10 +43,6 @@ build-env:debian:
build-env:conda: build-env:conda:
<<: *build-env <<: *build-env
only:
changes:
- docker/Dockerfile.conda
- docker/*.yml
script: script:
- /kaniko/executor - /kaniko/executor
--context $CI_PROJECT_DIR/docker --context $CI_PROJECT_DIR/docker
...@@ -64,10 +51,6 @@ build-env:conda: ...@@ -64,10 +51,6 @@ build-env:conda:
build-env:default: build-env:default:
<<: *build-env <<: *build-env
only:
changes:
- docker/Dockerfile.conda
- docker/*.yml
script: script:
- /kaniko/executor - /kaniko/executor
--context $CI_PROJECT_DIR/docker --context $CI_PROJECT_DIR/docker
...@@ -160,6 +143,14 @@ check for dependencies installed: ...@@ -160,6 +143,14 @@ check for dependencies installed:
.test: &test .test: &test
stage: test
script:
- py.test -r w --flakes kwant --junitxml=tests.xml --durations=10
artifacts:
reports:
junit: tests.xml
.coverage: &coverage
stage: test stage: test
script: script:
- py.test -r w --cov=kwant --cov-report term --cov-report html --flakes kwant --junitxml=tests.xml --durations=10 - py.test -r w --cov=kwant --cov-report term --cov-report html --flakes kwant --junitxml=tests.xml --durations=10
...@@ -209,6 +200,14 @@ test:bleeding-edge: ...@@ -209,6 +200,14 @@ test:bleeding-edge:
- schedules - schedules
allow_failure: true allow_failure: true
coverage:latest:
<<: *coverage
<<: *latest_env
dependencies:
- build:latest
only:
- schedules
## Documentation building ## Documentation building
build documentation: build documentation:
...@@ -217,7 +216,8 @@ build documentation: ...@@ -217,7 +216,8 @@ build documentation:
- build:latest - build:latest
stage: test stage: test
script: script:
- make -C doc realclean; make -C doc html SPHINXOPTS='-A website_deploy=True -n -W' 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: artifacts:
paths: paths:
- doc/build/html/ - doc/build/html/
...@@ -229,7 +229,8 @@ build PDF documentation: ...@@ -229,7 +229,8 @@ build PDF documentation:
- build:latest - build:latest
stage: test stage: test
script: script:
- make -C doc latex SPHINXOPTS='-n -W' - 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 - cd doc/build/latex
- make all-pdf - make all-pdf
artifacts: artifacts:
...@@ -252,19 +253,18 @@ check for broken links in doc: ...@@ -252,19 +253,18 @@ check for broken links in doc:
upload coverage: upload coverage:
stage: deploy stage: deploy
only: only:
- branches@kwant/kwant - schedules
dependencies:
- coverage:latest
environment: environment:
name: coverage/$CI_BUILD_REF_NAME name: coverage/$CI_BUILD_REF_NAME
url: https://kwant-project.org/coverage/$CI_BUILD_REF_SLUG url: https://kwant-project.org/coverage/$CI_BUILD_REF_SLUG
on_stop: remove_coverage on_stop: remove_coverage
before_script:
- mkdir -p ~/.ssh
- echo $MASTER_WEBSITE_KEY | base64 -d > ~/.ssh/id_rsa && chmod 600 ~/.ssh/id_rsa
script: script:
- eval $(ssh-agent -s)
- echo $MASTER_WEBSITE_KEY | base64 -d | ssh-add -
- mv htmlcov $CI_BUILD_REF_SLUG - mv htmlcov $CI_BUILD_REF_SLUG
- rsync -rlv -e "$SSH_COMMAND" --delete --relative $CI_BUILD_REF_SLUG kwant@kwant-project.org:coverage/ - rsync -rlv -e "$SSH_COMMAND" --delete --relative $CI_BUILD_REF_SLUG kwant@kwant-project.org:coverage/
after_script:
- rm -rf ~/.ssh
remove_coverage: remove_coverage:
...@@ -275,14 +275,11 @@ remove_coverage: ...@@ -275,14 +275,11 @@ remove_coverage:
environment: environment:
name: coverage/$CI_BUILD_REF_NAME name: coverage/$CI_BUILD_REF_NAME
action: stop action: stop
before_script:
- mkdir -p ~/.ssh
- echo $MASTER_WEBSITE_KEY | base64 -d > ~/.ssh/id_rsa && chmod 600 ~/.ssh/id_rsa
script: script:
- eval $(ssh-agent -s)
- echo $MASTER_WEBSITE_KEY | base64 -d | ssh-add -
- mkdir empty/ - mkdir empty/
- rsync -rlv -e "$SSH_COMMAND" --delete empty/ kwant@kwant-project.org:coverage/$CI_BUILD_REF_SLUG - rsync -rlv -e "$SSH_COMMAND" --delete empty/ kwant@kwant-project.org:coverage/$CI_BUILD_REF_SLUG
after_script:
- rm -rf ~/.ssh
upload documentation to the test server: upload documentation to the test server:
...@@ -293,13 +290,10 @@ upload documentation to the test server: ...@@ -293,13 +290,10 @@ upload documentation to the test server:
on_stop: remove_docs on_stop: remove_docs
only: only:
- branches@kwant/kwant - branches@kwant/kwant
before_script:
- mkdir -p ~/.ssh
- echo $TEST_WEBSITE_KEY | base64 -d > ~/.ssh/id_rsa && chmod 600 ~/.ssh/id_rsa
script: script:
- eval $(ssh-agent -s)
- echo $TEST_WEBSITE_KEY | base64 -d | ssh-add -
- rsync -rlv -e "$SSH_COMMAND" --delete doc/build/html/* kwant2@test.kwant-project.org:doc/$CI_BUILD_REF_SLUG - rsync -rlv -e "$SSH_COMMAND" --delete doc/build/html/* kwant2@test.kwant-project.org:doc/$CI_BUILD_REF_SLUG
after_script:
- rm -rf ~/.ssh
remove_docs: remove_docs:
...@@ -310,14 +304,11 @@ remove_docs: ...@@ -310,14 +304,11 @@ remove_docs:
environment: environment:
name: docs review/$CI_BUILD_REF_NAME name: docs review/$CI_BUILD_REF_NAME
action: stop action: stop
before_script:
- mkdir -p ~/.ssh
- echo $TEST_WEBSITE_KEY | base64 -d > ~/.ssh/id_rsa && chmod 600 ~/.ssh/id_rsa
script: script:
- eval $(ssh-agent -s)
- echo $TEST_WEBSITE_KEY | base64 -d | ssh-add -
- mkdir empty - mkdir empty
- rsync -arv -e "$SSH_COMMAND" --delete empty/ kwant2@test.kwant-project.org:doc/$CI_BUILD_REF_SLUG/ - rsync -arv -e "$SSH_COMMAND" --delete empty/ kwant2@test.kwant-project.org:doc/$CI_BUILD_REF_SLUG/
after_script:
- rm -rf ~/.ssh
upload dev version docs: upload dev version docs:
...@@ -327,13 +318,10 @@ upload dev version docs: ...@@ -327,13 +318,10 @@ upload dev version docs:
url: https://kwant-project.org/doc/dev url: https://kwant-project.org/doc/dev
only: only:
- master@kwant/kwant - master@kwant/kwant
before_script:
- mkdir -p ~/.ssh
- echo $MASTER_WEBSITE_KEY | base64 -d > ~/.ssh/id_rsa && chmod 600 ~/.ssh/id_rsa
script: script:
- eval $(ssh-agent -s)
- echo $MASTER_WEBSITE_KEY | base64 -d | ssh-add -
- rsync -rlv -e "$SSH_COMMAND" --delete doc/build/html/* kwant@kwant-project.org:doc/dev - rsync -rlv -e "$SSH_COMMAND" --delete doc/build/html/* kwant@kwant-project.org:doc/dev
after_script:
- rm -rf ~/.ssh
## Build documentation for tagged releases ## Build documentation for tagged releases
......
...@@ -3,8 +3,8 @@ What's new in Kwant 1.0 ...@@ -3,8 +3,8 @@ What's new in Kwant 1.0
This article explains the new features in Kwant 1.0 compared to Kwant 0.2. This article explains the new features in Kwant 1.0 compared to Kwant 0.2.
Kwant 1.0 was released on 9 September 2013. Please consult the `full list of Kwant 1.0 was released on 9 September 2013. Please consult the `full list of
changes in Kwant <https://git.kwant-project.org/kwant/log/?h=v1.0.5>`_ for all changes in Kwant <https://gitlab.kwant-project.org/kwant/kwant/-/commits/v1.0.5>`_
the changes up to the most recent bugfix release. for all the changes up to the most recent bugfix release.
Lattice and shape improvements Lattice and shape improvements
......
...@@ -326,8 +326,7 @@ class SpectralDensity: ...@@ -326,8 +326,7 @@ class SpectralDensity:
if energy_resolution: if energy_resolution:
if energy_resolution <= 0: if energy_resolution <= 0:
raise ValueError("'energy_resolution' must be positive" raise ValueError("'energy_resolution' must be positive")
.format(energy_resolution))
# factor of 1.6 comes from the fact that we use the # factor of 1.6 comes from the fact that we use the
# Jackson kernel when calculating the FFT, which has # Jackson kernel when calculating the FFT, which has
# maximal slope π/2. Rounding to 1.6 ensures that the # maximal slope π/2. Rounding to 1.6 ensures that the
...@@ -1097,7 +1096,7 @@ def jackson_kernel(moments): ...@@ -1097,7 +1096,7 @@ def jackson_kernel(moments):
<https://arxiv.org/abs/cond-mat/0504627>`_. <https://arxiv.org/abs/cond-mat/0504627>`_.
""" """
n_moments, *extra_shape = moments.shape n_moments = len(moments)
m = np.arange(n_moments) m = np.arange(n_moments)
kernel_array = ((n_moments - m + 1) * kernel_array = ((n_moments - m + 1) *
np.cos(np.pi * m/(n_moments + 1)) + np.cos(np.pi * m/(n_moments + 1)) +
...@@ -1119,7 +1118,7 @@ def lorentz_kernel(moments, l=4): ...@@ -1119,7 +1118,7 @@ def lorentz_kernel(moments, l=4):
The additional parameter ``l`` controls the decay of the kernel. The additional parameter ``l`` controls the decay of the kernel.
""" """
n_moments, *extra_shape = moments.shape n_moments = len(moments)
m = np.arange(n_moments) m = np.arange(n_moments)
kernel_array = np.sinh(l * (1 - m / n_moments)) / np.sinh(l) kernel_array = np.sinh(l * (1 - m / n_moments)) / np.sinh(l)
......
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