Skip to content

Commit

Permalink
Merge pull request #561 from JoostJM/3.0-release
Browse files Browse the repository at this point in the history
3.0 release
  • Loading branch information
JoostJM authored Feb 11, 2020
2 parents 9883f66 + a0c3875 commit ae1e14c
Show file tree
Hide file tree
Showing 11 changed files with 102 additions and 281 deletions.
41 changes: 7 additions & 34 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,37 +21,21 @@ jobs:
command: echo -e "Host github.com\n\tStrictHostKeyChecking no\n" > /etc/ssh/ssh_config
- checkout
- run:
# Jupyter datascience notebook does not support python 2 anymore, install it manually.
# See also https://github.com/jupyter/docker-stacks/issues/432
# Next, install python 2 kernel globally, so it can be found from the root
name: Install Python 2 Kernel
name: Install pyradiomics in Python 3
command: |
conda create -n python2 python=2 ipykernel
pip install kernda --no-cache
$CONDA_DIR/envs/python2/bin/python -m ipykernel install
kernda -o -y /usr/local/share/jupyter/kernels/python2/kernel.json
pip uninstall kernda -y
- run:
name: Install pyradiomics in Python 2 and 3
command: |
source activate python2
python -m pip install --no-cache-dir -r requirements.txt
python -m pip install --no-cache-dir -r requirements-dev.txt
python setup.py install
source activate root
python -m pip install --no-cache-dir -r requirements.txt
python -m pip install --no-cache-dir -r requirements-dev.txt
python setup.py install
- run:
name: test notebooks in python 2 and 3
name: test notebooks in python 3
command: |
jupyter nbconvert --ExecutePreprocessor.kernel_name=python2 --ExecutePreprocessor.timeout=-1 --to notebook --output-dir /tmp --execute notebooks/helloRadiomics.ipynb notebooks/helloFeatureClass.ipynb notebooks/PyRadiomicsExample.ipynb
jupyter nbconvert --ExecutePreprocessor.kernel_name=python3 --ExecutePreprocessor.timeout=-1 --to notebook --output-dir /tmp --execute notebooks/helloRadiomics.ipynb notebooks/helloFeatureClass.ipynb notebooks/PyRadiomicsExample.ipynb
build-2.7: &build_template
build-3.5: &build_template
working_directory: /pyradiomics
docker:
- image: circleci/python:2.7-jessie
- image: circleci/python:3.5-jessie
user: root
steps:
- checkout
Expand All @@ -75,12 +59,6 @@ jobs:
root: .
paths: dist

build-3.5:
<<: *build_template
docker:
- image: circleci/python:3.5-jessie
user: root

build-3.6:
<<: *build_template
docker:
Expand Down Expand Up @@ -163,7 +141,6 @@ jobs:
name: Build Conda packages
command: |
mkdir /conda-bld
conda build ./conda --python=2.7 --croot /conda-bld
conda build ./conda --python=3.5 --croot /conda-bld
conda build ./conda --python=3.6 --croot /conda-bld
conda build ./conda --python=3.7 --croot /conda-bld
Expand All @@ -176,26 +153,22 @@ workflows:
version: 2
build_and_deploy:
jobs:
- build-2.7: &build_job_template
- build-3.5: &build_job_template
filters:
tags:
only:
- /^v?[0-9]+(\.[0-9]+)*(rc[0-9]+)?/
- build-3.5:
<<: *build_job_template
- build-3.6:
<<: *build_job_template
- build-3.7:
<<: *build_job_template
- test-notebooks:
requires:
- build-2.7
- build-3.5
- build-3.6
- build-3.7
- build-3.7:
<<: *build_job_template
- deploy: &deploy_template
requires:
- build-2.7
- build-3.5
- build-3.6
- build-3.7
Expand Down
7 changes: 0 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,6 @@ language: python
matrix:
include:

- os: osx
language: generic
env:
- PYTHON_VERSION=2.7.12
- PYTHON_SHORT_VERSION=2.7

- os: osx
language: generic
env:
Expand All @@ -34,7 +28,6 @@ cache:
- $HOME/.pyenv/versions/3.7.2
- $HOME/.pyenv/versions/3.6.5
- $HOME/.pyenv/versions/3.5.5
- $HOME/.pyenv/versions/2.7.12
- $HOME/downloads

before_install:
Expand Down
52 changes: 41 additions & 11 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,51 @@
Release Notes
=============

.. note::
**Upcoming changes in 3.0 release**

- Removal of deprecated code (e.g. ``commandlinebatch.py``, ``calculateFeatures()`` function in feature classes);
deprecated radiomics features are retained.
- End of official python 2.7 support

- No CI-tests for python 2.7
- No pre-build binaries for python 2.7 distributed on PyPi and Anaconda Cloud
- Compatibility code using six is retained (allowing local build).

------------
Next Release
------------

---------------
PyRadiomics 3.0
---------------

.. warning::
As of this release, Python 2.7 testing is removed. Compatibility code such as it is will be left in place, but
future changes will not be checked for backwards compatibility. Moreover, no pre-built binaries for python 2.7
will be distributed on PyPi or Conda.
Finally, some deprecated code is removed (``commandlinebatch.py`` and ``calculateFeatures()``).

Bug Fixes
#########

- Fix broken Conda deployment (`51c5849 <https://github.com/Radiomics/pyradiomics/commit/51c5849>`_)
- Fix error in IBSI mapping (labs/pyradiomics-dcm) (`54d6689 <https://github.com/Radiomics/pyradiomics/commit/54d6689>`_)
- Fix resampling error when spacing is correct, but sizes are different (`ac7458e <https://github.com/Radiomics/pyradiomics/commit/ac7458e>`_)
- Fix label channel selection (`54a3782 <https://github.com/Radiomics/pyradiomics/commit/54a3782>`_)
- Use local scope of settings, preventing race conditions in parallel extraction (`43578f7 <https://github.com/Radiomics/pyradiomics/commit/43578f7>`_)
- Fix resampling for 2D input (`#545 <https://github.com/Radiomics/pyradiomics/pull/545>`_)

Internal API
############

- Update C API to use large datatype for index pointers (`#500 <https://github.com/Radiomics/pyradiomics/pull/500>`_,
`#501 <https://github.com/Radiomics/pyradiomics/pull/501>`_)
- Update docker CLI to use python 3.6.9 and fix bugs to allow integration with pyradiomics-dcm lab (`#527 <https://github.com/Radiomics/pyradiomics/pull/527>`_)
- Add option to force path to UNIX style paths, even on windows (`3c0708a <https://github.com/Radiomics/pyradiomics/commit/3c0708a>`_)
- Removed deprecated code (`fedaa5e <https://github.com/Radiomics/pyradiomics/commit/fedaa5e>`_)

Testing
#######

- Remove testing and deployment for python 2.7 (`a5a7e61 <https://github.com/Radiomics/pyradiomics/commit/a5a7e61>`_)

Documentation
#############

- Refactor documentation (`#536 <https://github.com/Radiomics/pyradiomics/pull/536>`_)
- Fix various typos/wording
- Clarify use of force2D, and add example settings file (`#558 <https://github.com/Radiomics/pyradiomics/pull/558>`_)

-----------------
PyRadiomics 2.2.0
-----------------
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# pyradiomics v2.2.0
# pyradiomics v3.0

## Build Status

Expand Down Expand Up @@ -76,8 +76,8 @@ The documentation can then be viewed in a browser by opening `PACKAGE_ROOT\build
Furthermore, an instruction video is available [here](http://radiomics.io/pyradiomics.html).

### Installation
PyRadiomics is OS independent and compatible with both Python 2.7 and Python 3.4, 3.5 and 3.6. As of version 2.0,
PyRadiomics releases are also made available on PyPi. To install PyRadiomics, ensure you have python
PyRadiomics is OS independent and compatible with Python >= 3.5. Pre-built binaries are available on
PyPi and Conda. To install PyRadiomics, ensure you have python
installed and run:

`python -m pip install pyradiomics`
Expand Down Expand Up @@ -158,7 +158,7 @@ This package is covered by the open source [3-clause BSD License](LICENSE.txt).
<sup>6</sup>Isomics

### Contact
We are happy to help you with any questions. Please contact us on the [Radiomics community section of the 3D Slicer Discourse](https://discourse.slicer.org/c/community/radiomics).
We are happy to help you with any questions. Please contact us on the [Radiomics community section of the 3D Slicer Discourse](https://discourse.slicer.org/c/community/radiomics/23).

We welcome contributions to PyRadiomics. Please read the [contributing guidelines](CONTRIBUTING.rst) on how to
contribute to PyRadiomics.
Expand Down
8 changes: 1 addition & 7 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,7 @@ version: "0.0.1.{build}"
environment:
matrix:

# Visual Studio (Python 2 & 3, 64 bit)

- PYTHON_DIR: "C:\\Python27-x64"
PYTHON_VERSION: "2.7.x"
PYTHON_SHORT_VERSION: "2.7"
PYTHON_ARCH: "64"
BLOCK: "0"
# Visual Studio (Python 3, 64 bit)

- PYTHON_DIR: "C:\\Python35-x64"
PYTHON_VERSION: "3.5.x"
Expand Down
17 changes: 8 additions & 9 deletions docs/faq.rst
Original file line number Diff line number Diff line change
Expand Up @@ -363,11 +363,11 @@ Miscellaneous
Which python versions is PyRadiomics compatible with?
#####################################################

PyRadiomics is compatible with both python 2 and python 3. However, the automated testing only uses python versions 2.7,
3.5, 3.6 and 3.7 (only 64 bits architecture). Python < 2.6 is not supported. Other python versions may be compatible with
PyRadiomics, but this is not actively tested and therefore not guaranteed to work. In the future, support for python 2.7
will also be dropped, to compatibility fixes are retained. This means that future releases of PyRadiomics will only have
pre-built wheels for Python versions >= 3.5.
PyRadiomics is compatible with python 3. Python 2 support was dropped in PyRadiomics version 3.0, though compatibility
code was retained. However, the automated testing only uses python versions 3.5, 3.6 and 3.7 (64 bits architecture).
Python < 2.6 is not supported. Other python versions may be compatible with PyRadiomics, but this is not actively tested
and therefore not guaranteed to work. Pre-built wheels are only available for the tested versions of python (3.5, 3.6
and 3.7)

A new version of PyRadiomics is available! Where can I find out what changed?
#############################################################################
Expand All @@ -390,15 +390,14 @@ I found a bug! Where do I report it?

We strive to keep PyRadiomics as bug free as possible by thoroughly testing new additions before including them in the
stable version. However, nothing is perfect, and some bugs may therefore exist. Report yours by
`opening an issue <https://github.com/Radiomics/pyradiomics/issues>`_ on the GitHub or contact us at the
`pyradiomics email list <https://groups.google.com/forum/#!forum/pyradiomics>`_. If you want to help in fixing it, we'd
welcome you to open up a `pull request <https://github.com/Radiomics/pyradiomics/pulls>`_ with your suggested fix.
`opening an issue <https://github.com/Radiomics/pyradiomics/issues>`_ on the GitHub. If you want to help in fixing it,
we'd welcome you to open up a `pull request <https://github.com/Radiomics/pyradiomics/pulls>`_ with your suggested fix.

My question is not listed here...
#################################

If you have a question that is not listed here, check the
`pyradiomics email list <https://groups.google.com/forum/#!forum/pyradiomics>`_ or the
`pyradiomics forum on 3D Slicer discourse <https://discourse.slicer.org/c/community/radiomics/23>`_ or the
`issues on GitHub <https://github.com/Radiomics/pyradiomics/issues>`_. Feel free to post a new question or issue and
we'll try to get back to you ASAP.

Expand Down
6 changes: 3 additions & 3 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,8 @@ See also the `requirements file <https://github.com/Radiomics/pyradiomics/blob/m
Installation
------------

PyRadiomics is OS independent and compatible with both Python 2.7 and Python >=3.4. As of version 2.0,
PyRadiomics releases are also made available on PyPi. To install PyRadiomics, ensure you have python
PyRadiomics is OS independent and compatible with and Python >=3.5. Pre-built binaries are available on
PyPi and Conda. To install PyRadiomics, ensure you have python
installed and run:

* ``python -m pip install pyradiomics``
Expand Down Expand Up @@ -155,7 +155,7 @@ Developers

Contact
-------
We are happy to help you with any questions. Please contact us on the `Radiomics community section of the 3D Slicer Discourse <https://discourse.slicer.org/>`_.
We are happy to help you with any questions. Please contact us on the `Radiomics community section of the 3D Slicer Discourse <https://discourse.slicer.org/c/community/radiomics/23>`_.

We'd welcome your contributions to PyRadiomics. Please read the
:ref:`contributing guidelines <radiomics-contributing-label>` on how to contribute to PyRadiomics. Information on
Expand Down
63 changes: 36 additions & 27 deletions docs/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,28 @@ There are three ways you can use pyradiomics:
1. Install via pip
------------------

As of version 2.0.0, PyRadiomics will be available for installation via pip. For the python versions
Pre-built binaries are available on PyPi for installation via pip. For the python versions
mentioned below, wheels are automatically generated for each release of PyRadiomics, allowing you to
install pyradiomics without having to compile anything. For other python versions, a source distribution
is also available, but this requires compiling the C extensions.

* Ensure that you have ``python`` installed on your machine, version 2.7, 3.4, 3.5 or 3.6 (64-bits).
* Ensure that you have ``python`` installed on your machine, version 3.5, 3.6 or 3.7 (64-bits).

* Install PyRadiomics:
* Install PyRadiomics::

* ``python -m pip install pyradiomics``
python -m pip install pyradiomics

--------------------
2. Install via conda
--------------------

Besides pre-built binaries for PyPi, PyRadiomics is also available on conda cloud.
To install PyRadiomics on Conda, run::

conda install -c radiomics pyradiomics

----------------------
2. Install from source
3. Install from source
----------------------

PyRadiomics can also be installed from source code. This allows for the bleeding edge version, but does
Expand All @@ -35,21 +44,22 @@ of texture matrices and some shape features.

* Ensure you have the version control system ``git`` installed on your machine.

* Ensure that you have ``python`` installed on your machine, at least version 2.7 or 3.4 (64-bits).
* Ensure that you have ``python`` installed on your machine, at least version 3.5 (64-bits).

* Clone the repository::

* Clone the repository:
git clone git://github.com/Radiomics/pyradiomics

* ``git clone git://github.com/Radiomics/pyradiomics``

* For unix like systems (MacOSX, linux)::

* For unix like systems (MacOSX, linux):
cd pyradiomics
python -m pip install -r requirements.txt
python setup.py install

* ``cd pyradiomics``
* ``python -m pip install -r requirements.txt``
* ``python setup.py install``
* To use your build for interactive use and development::

To use your build for interactive use and development:
* ``python setup.py build_ext --inplace``
python setup.py build_ext --inplace

* If you don't have sudo/admin rights on your machine, you need to locally install numpy, nose, tqdm, PyWavelets, SimpleITK (specified in requirements.txt).
In a bash shell::
Expand All @@ -59,11 +69,11 @@ of texture matrices and some shape features.
pip install --user -r requirements.txt
export PYTHONPATH=$HOME/.local/lib64/python2.7/site-packages

* For Windows:
* For Windows::

* ``cd pyradiomics``
* ``python -m pip install -r requirements.txt``
* ``python setup.py install``
cd pyradiomics
python -m pip install -r requirements.txt
python setup.py install

* If the installation fails, check out the :ref:`radiomics-faq-label`. If your error is not listed there,
contact us by `creating an issue <https://github.com/Radiomics/pyradiomics/issues/new>`_ on the PyRadiomics
Expand All @@ -90,14 +100,14 @@ This approach may be preferred if you are interested in using pyradiomics from t
First, you will need to install Docker on your system, if it is not installed already. You can follow the instructions below to do this.

Once Docker is installed, you can issue ``docker pull radiomics/pyradiomics:CLI`` command in the shell to download the pyradiomics Docker image.
After that you can invoke pyradiomics tool as follows:
After that you can invoke pyradiomics tool as follows::

``docker run radiomics/pyradiomics:CLI --help``
docker run radiomics/pyradiomics:CLI --help

Docker containers cannot directly access the filesystem of the host. In order to pass files as arguments to pyradiomics and to access files that converters create,
an extra step is required to specify which directories will be used for file exchange using the -v argument:
an extra step is required to specify which directories will be used for file exchange using the -v argument::

``-v <HOST_DIR>:<CONTAINER_DIR>``
-v <HOST_DIR>:<CONTAINER_DIR>

The argument above will make the ``HOST_DIR`` path available within the container at ``CONTAINER_DIR`` location. The files that will be read or written by the
converter run from the docker container should be referred to via the ``CONTAINER_DIR`` path.
Expand All @@ -121,12 +131,11 @@ Note `the system requirements <https://docs.docker.com/docker-for-windows/>`_:

**IMPORTANT**: You will also need to share the drive you will be using to communicate data to and from Docker image in Docker Settings as shown in the screenshot below.

Most likely you will experience the display of an error message similar to the one shown below:

Most likely you will experience the display of an error message similar to the one shown below::

``C:\Program Files\Docker\Docker\Resources\bin\docker.exe: Error response from daemon: \``
``C: drive is not shared. Please share it in Docker for Windows Settings.``
``See 'C:\Program Files\Docker\Docker\Resources\bin\docker.exe run --help'.``
C:\Program Files\Docker\Docker\Resources\bin\docker.exe: Error response from daemon:
C: drive is not shared. Please share it in Docker for Windows Settings.
See 'C:\Program Files\Docker\Docker\Resources\bin\docker.exe run --help'.

If you have this error, make sure that the drive, where the ``HOST_DIR`` is located, is shared:

Expand Down
Loading

0 comments on commit ae1e14c

Please sign in to comment.