Skip to content
This repository has been archived by the owner on Mar 17, 2021. It is now read-only.

Commit

Permalink
Merge pull request #318 from NifTK/release-v0.5.0
Browse files Browse the repository at this point in the history
Fixed issues in documentation before 0.5.0 release
  • Loading branch information
wyli committed Feb 5, 2019
2 parents 0641dab + 0d7c47e commit 5ced69c
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 168 deletions.
25 changes: 19 additions & 6 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ testjob:
only:
- master
- dev
- merging-github-pr-269
- tags
script:
# !!kill coverage in case of hanging processes
Expand All @@ -45,9 +44,6 @@ testjob:
- python -c "import tensorflow as tf; from tensorflow.python.client import device_lib; print device_lib.list_local_devices()"
- ls -la /dev | grep nvidia

- echo $(python tests/get_gpu_index.py)
- export CUDA_VISIBLE_DEVICES=$(python tests/get_gpu_index.py)

# removing existing testing data
- if [ -d models ]; then rm -r models; fi
- if [ -d testing_data ]; then rm -r testing_data; fi
Expand Down Expand Up @@ -80,6 +76,9 @@ testjob:

- pip install -r requirements-gpu.txt

- echo $(python tests/get_gpu_index.py)
- export CUDA_VISIBLE_DEVICES=$(python tests/get_gpu_index.py)

# check whether version command works
# Git-clone:
- python net_segment.py --version 2>&1 | grep -E 'NiftyNet.*version.*[0-9]+\.[0-9]+\.[0-9]+'
Expand Down Expand Up @@ -167,6 +166,9 @@ testjob:
- pip install coverage
- pip install -r requirements-gpu.txt

- echo $(python tests/get_gpu_index.py)
- export CUDA_VISIBLE_DEVICES=$(python tests/get_gpu_index.py)

- python net_download.py testing -r
- coverage run -a --source . net_segment.py train -c config/highres3dnet_config.ini --batch_size=1 --num_threads=2 --queue_length=40 --max_iter=10
- coverage run -a --source . net_segment.py inference -c config/highres3dnet_config.ini --batch_size 8 --spatial_window_size 64,64,64 --queue_length 64
Expand Down Expand Up @@ -230,7 +232,6 @@ quicktest:
except:
- master
- dev
- merging-github-pr-269
- tags
- 147-revise-contribution-guidelines-to-include-github
- 150-properly-format-the-bibtex-entry-to-the-ipmi-2017-paper-on-the-main-readme
Expand Down Expand Up @@ -289,6 +290,10 @@ quicktest:
- coverage erase
# run only fast tests
- pip install -r requirements-gpu.txt

- echo $(python tests/get_gpu_index.py)
- export CUDA_VISIBLE_DEVICES=$(python tests/get_gpu_index.py)

- python net_download.py testing -r
- QUICKTEST=True coverage run -a --source . -m unittest discover -s "tests" -p "*_test.py"
- coverage report --omit='niftynet-dev-test*' -m
Expand All @@ -307,7 +312,7 @@ pip-installer:
only:
- master
- dev
- merging-github-pr-269
- release-v0.5.0
- tags
script:
# get the shortened version of last commit's hash
Expand Down Expand Up @@ -343,6 +348,10 @@ pip-installer:
# NiftyNet console entries should fail gracefully if TF not installed
# i.e. check that the warning displays the TF website
- cd $niftynet_dir

- echo $(python tests/get_gpu_index.py)
- export CUDA_VISIBLE_DEVICES=$(python tests/get_gpu_index.py)

- set +e
- python -c "import niftynet" 2>&1 | grep "https://www.tensorflow.org/"
- set -e
Expand Down Expand Up @@ -443,6 +452,10 @@ pip-installer:
# NiftyNet console entries should fail gracefully if TF not installed
# i.e. check that the warning displays the TF website
- cd $niftynet_dir

- echo $(python tests/get_gpu_index.py)
- export CUDA_VISIBLE_DEVICES=$(python tests/get_gpu_index.py)

- set +e
- python -c "import niftynet" 2>&1 | grep "https://www.tensorflow.org/"
- set -e
Expand Down
5 changes: 3 additions & 2 deletions doc/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ Resources

`Model zoo repository`_

Mailing list: [email protected]
`NiftyNet Google Group / Mailing List`_

`Stack Overflow`_ (for general questions)

Expand All @@ -131,6 +131,7 @@ Mailing list: [email protected]
.. _`Source code on GitHub`: https://github.com/NifTK/NiftyNet
.. _`Model zoo repository`: https://github.com/NifTK/NiftyNetModelZoo/blob/master/README.md
.. _`Stack Overflow`: https://stackoverflow.com/questions/tagged/niftynet
.. _`NiftyNet Google Group / Mailing List`: https://groups.google.com/forum/#!forum/niftynet


APIs & reference
Expand Down Expand Up @@ -188,7 +189,7 @@ If you use NiftyNet in your work, please cite `Gibson and Li, et al. 2017`_:
E. Gibson*, W. Li*, C. Sudre, L. Fidon, D. I. Shakir, G. Wang,
Z. Eaton-Rosen, R. Gray, T. Doel, Y. Hu, T. Whyntie, P. Nachev, M. Modat,
D. C. Barratt, S. Ourselin, M. J. Cardoso^ and T. Vercauteren^ 2017.
D. C. Barratt, S. Ourselin, M. J. Cardoso and T. Vercauteren 2017.
`NiftyNet: a deep-learning platform for medical imaging.`_
Computer Methods and Programs in Biomedicine (2017).

Expand Down
158 changes: 0 additions & 158 deletions pip/long_description.rst

This file was deleted.

4 changes: 3 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# -*- coding: utf-8 -*-
from setuptools import setup, find_packages
from io import open

import versioneer
from niftynet.utilities.versioning import get_niftynet_version
Expand All @@ -12,7 +13,7 @@
' image-guided therapy'

# Get the long description
with open('pip/long_description.rst') as f:
with open('README.md', encoding='utf-8') as f:
long_description = f.read()

setup(
Expand All @@ -23,6 +24,7 @@

description=description,
long_description=long_description,
long_description_content_type='text/markdown',

url='http:https://niftynet.io/',

Expand Down
2 changes: 1 addition & 1 deletion tests/get_gpu_index.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
p3 = Popen(['sed', 's: MiB::'], stdin=p2.stdout, stdout=PIPE)
output, error = p3.communicate()

free_memory = [float(x) for x in output.split('\n')[:-1]]
free_memory = [float(x) for x in output.decode('utf-8').split('\n')[:-1]]
if free_memory[1] > free_memory[0]:
print('1')
else:
Expand Down

0 comments on commit 5ced69c

Please sign in to comment.