Skip to content

Commit

Permalink
Fixed install_requires (#135)
Browse files Browse the repository at this point in the history
* Removed custom install and added plugin installation to build instructions.

* test new travis script

* updated

* new travis test

* test macOS python env

* test osx python version fix

* macOS test

* another test

* updated test

* bug fix

* update

* update

* fixed miniconda version for macOS

* fixed conda update

* updated commands for macOS

* made nfft linux only

* added homebrew addons

* added matplotlib backend for macOS

* test

* added .matplotlib dir

* test echo line

* test

* new test

* try again

* test MACOSX_DEPLOYMENT_TARGET

* test

* test

* test

* added fix for sparse2d executables

* fixed mistake

* clean up

* test simplified travis commands

* Updated package version and documentation

* fixed typos

* added pysap schema and link to paper

* fixed image width for GitHub

* readded Python 3.5 for Linux only

* set astropy version cap for Python 3.5

* fixed typo

* fixed another typo

* added version cap for matplotlib
  • Loading branch information
sfarrens committed May 13, 2020
1 parent 53004a3 commit 5d1a830
Show file tree
Hide file tree
Showing 7 changed files with 205 additions and 98 deletions.
112 changes: 79 additions & 33 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,62 +1,108 @@
sudo: required
dist: xenial
language: python
sudo: required

addons:
homebrew:
packages: &macos_packages
- cmake
- pkgconfig
- cfitsio
- libomp
update: true

matrix:
include:
- python: 3.5
- python: 3.6
- python: 3.7
include:
- os: linux
dist: xenial
python: 3.5
name: "Linux Xenial Python 3.5"
- os: linux
dist: xenial
python: 3.6
name: "Linux Xenial Python 3.6"
- os: linux
dist: xenial
python: 3.7
name: "Linux Xenial Python 3.7"
- os: linux
dist: xenial
python: 3.8
name: "Linux Xenial Python 3.8"
- os: osx
osx_image: xcode11.3
language: shell
env: PYTHON_VERSION=3.6
name: "macOS 10.14 Python 3.6"
addons:
homebrew:
packages:
- *macos_packages
- os: osx
osx_image: xcode11.3
language: shell
env: PYTHON_VERSION=3.7
name: "macOS 10.14 Python 3.7"
addons:
homebrew:
packages:
- *macos_packages
- os: osx
osx_image: xcode11.3
language: shell
env: PYTHON_VERSION=3.8
name: "macOS 10.14 Python 3.8"
addons:
homebrew:
packages:
- *macos_packages

before_install:
- sudo apt-get update
- sudo updatedb
- wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;
- if [ $TRAVIS_PYTHON_VERSION == "3.5" ]; then
export CPLUS_INCLUDE_PATH=/opt/python/3.5.6/include/python3.5m;
- if [ $TRAVIS_OS_NAME = 'linux' ]; then sudo apt-get update; fi
- if [ $TRAVIS_OS_NAME = 'linux' ]; then sudo updatedb; fi
- if [ $TRAVIS_OS_NAME = 'osx' ];
then curl https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh -o miniconda.sh;
else wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;
fi
- if [ $TRAVIS_PYTHON_VERSION == "3.6" ]; then
export CPLUS_INCLUDE_PATH=/opt/python/3.6.3/include/python3.6m;
fi
- if [ $TRAVIS_PYTHON_VERSION == "3.7" ]; then
export CPLUS_INCLUDE_PATH=/opt/python/3.7.1/include/python3.7m;
- if [ $TRAVIS_OS_NAME = 'linux' ]; then
export CPLUS_INCLUDE_PATH=$(cd /opt/python/3.*/include/python3.*; pwd);
fi
- chmod +x miniconda.sh
- ./miniconda.sh -b -p $HOME/miniconda
- export PATH=$HOME/miniconda/bin:$PATH
- hash -r
- conda update --all -y
- conda update --all -y;
- conda info -a
- sudo apt install -y libnfft3-dev
- if [ $TRAVIS_OS_NAME = 'linux' ]; then sudo apt install -y libnfft3-dev; fi
- if [ $TRAVIS_OS_NAME = 'osx' ]; then echo "backend':' TkAgg" > matplotlibrc; fi
- if [ $TRAVIS_OS_NAME = 'osx' ]; then export MACOSX_DEPLOYMENT_TARGET=10.14; fi

install:
- conda create -n testenv --yes pip python=$TRAVIS_PYTHON_VERSION
- if [ $TRAVIS_OS_NAME = 'osx' ];
then conda create -n testenv --yes pip python=$PYTHON_VERSION;
else conda create -n testenv --yes pip python=$TRAVIS_PYTHON_VERSION;
fi
- source activate testenv
- pip install --upgrade pip
- python --version
- pip --version
- locate pyconfig.h
- if [ $TRAVIS_OS_NAME = 'linux' ]; then locate pyconfig.h; fi
- mkdir -p $HOME/.local/share/pysap
- git clone https://github.com/CEA-COSMIC/pysap-data.git $HOME/.local/share/pysap/pysap-data
- ln -s $HOME/.local/share/pysap/pysap-data/pysap-data/* $HOME/.local/share/pysap
- rm $HOME/.local/share/pysap/__init__.py
- ls -l $HOME/.local/share/pysap
- pip install nose nose-exclude
- pip install coverage coveralls
- pip install pycodestyle
- pip install cython numpy
- if [ $TRAVIS_OS_NAME = 'linux' ]; then pip install git+https://github.com/ghisvail/pyNFFT.git; fi
- pip install nose nose-exclude coverage coveralls pycodestyle
- pip install -b $TRAVIS_BUILD_DIR/build -t $TRAVIS_BUILD_DIR/install --no-clean --no-deps .
- ls $TRAVIS_BUILD_DIR/install
- ldd $TRAVIS_BUILD_DIR/install/pysparse.so
- export PYTHONPATH=$TRAVIS_BUILD_DIR/install:$PYTHONPATH
- if [ $TRAVIS_PYTHON_VERSION == "3.5" ]; then
export PATH=$PATH:$TRAVIS_BUILD_DIR/build/temp.linux-x86_64-3.5/extern/bin;
fi
- if [ $TRAVIS_PYTHON_VERSION == "3.6" ]; then
export PATH=$PATH:$TRAVIS_BUILD_DIR/build/temp.linux-x86_64-3.6/extern/bin;
fi
- if [ $TRAVIS_PYTHON_VERSION == "3.7" ]; then
export PATH=$PATH:$TRAVIS_BUILD_DIR/build/temp.linux-x86_64-3.7/extern/bin;
- if [ $TRAVIS_OS_NAME = 'osx' ];
then otool -L $TRAVIS_BUILD_DIR/install/pysparse.so;
else ldd $TRAVIS_BUILD_DIR/install/pysparse.so;
fi
- export PYTHONPATH=$TRAVIS_BUILD_DIR/install:$PYTHONPATH
- export PATH=$PATH:$(cd $TRAVIS_BUILD_DIR/build/temp.*/extern/bin; pwd)
- if [[ $TRAVIS_PYTHON_VERSION == '3.5' ]]; then pip install "astropy<4.0" "matplotlib<3.0.3"; fi

script:
- python setup.py nosetests
Expand Down
3 changes: 1 addition & 2 deletions AUTHOR
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
Antoine Grigis <antoine.grigis@cea.fr>
Samuel Farrens <samuel.farrens@gmail.com>
Samuel Farrens <samuel.farrens@cea.fr>
Jean-Luc Starck <jl.stark@cea.fr>
Philippe Ciuciu <philippe.ciuciu@cea.fr>

28 changes: 14 additions & 14 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Contributing to pySAP
# Contributing to PySAP

pySAP is a package for sparsity with applications in astrophysics and MRI.
PySAP is a package for sparsity with applications in astrophysics and MRI.
This package has been developed in collaboration between [CosmoStat](http://www.cosmostat.org/) and [NeuroSpin](http://joliot.cea.fr/drf/joliot/Pages/Entites_de_recherche/NeuroSpin.aspx) via the [COSMIC](http://cosmic.cosmostat.org/) project.

## Contents
Expand All @@ -22,51 +22,51 @@ This package has been developed in collaboration between [CosmoStat](http://www.

## Introduction

pySAP is fully open-source and as such users are welcome to fork, clone and/or reuse the software freely. Users wishing to contribute to the development of this package, however, are kindly requested to adhere to the following guidelines and the [code of conduct](./CODE_OF_CONDUCT.md).
PySAP is fully open-source and as such users are welcome to fork, clone and/or reuse the software freely. Users wishing to contribute to the development of this package, however, are kindly requested to adhere to the following guidelines and the [code of conduct](./CODE_OF_CONDUCT.md).

## Issues

The easiest way to contribute to pySAP is by raising a "New issue". This will give you the opportunity to ask questions, report bugs or even request new features.
The easiest way to contribute to PySAP is by raising a "New issue". This will give you the opportunity to ask questions, report bugs or even request new features.

Remember to use clear and descriptive titles for issues. This will help other users that encounter similar problems find quick solutions. We also ask that you read the available documentation and browse existing issues on similar topics before raising a new issue in order to avoid repetition.

### Asking Questions

Users are of course welcome to ask any question relating to pySAP and we will endeavour to reply as soon as possible.
Users are of course welcome to ask any question relating to PySAP and we will endeavour to reply as soon as possible.

These issues should include the `help wanted` label.

### Installation Issues

If you encounter difficulties installing pySAP be sure to re-read the installation instructions provided. If you are still unable to install the package please remember to include the following details in the issue you raise:
If you encounter difficulties installing PySAP be sure to re-read the installation instructions provided. If you are still unable to install the package please remember to include the following details in the issue you raise:

* your operating system and the corresponding version (*e.g.* macOS v10.14.1, Ubuntu v16.04.1, *etc.*),
* the version of Python you are using (*e.g* v3.6.7, *etc.*),
* the python environment you are using (if any) and the corresponding version (*e.g.* virtualenv v16.1.0, conda v4.5.11, *etc.*),
* the exact steps followed while attempting to install pySAP
* the exact steps followed while attempting to install PySAP
* and the error message printed or a screen capture of the terminal output.

These issues should include the `installation` label.

### Reporting Bugs

If you discover a bug while using pySAP please provide the same information requested for installation issues. Be sure to list the exact steps you followed that lead to the bug you encountered so that we can attempt to recreate the conditions.
If you discover a bug while using PySAP please provide the same information requested for installation issues. Be sure to list the exact steps you followed that lead to the bug you encountered so that we can attempt to recreate the conditions.

If you are aware of the source of the bug we would very much appreciate if you could provide the module(s) and line number(s) affected. This will enable us to more rapidly fix the problem.

These issues should include the `bug` label.

### Requesting Features

If you believe pySAP could be improved with the addition of extra functionality or features feel free to let us know. We cannot guarantee that we will include these features, but we will certainly take your suggestions into consideration.
If you believe PySAP could be improved with the addition of extra functionality or features feel free to let us know. We cannot guarantee that we will include these features, but we will certainly take your suggestions into consideration.

In order to increase your chances of having a feature included, be sure to be as clear and specific as possible as to the properties this feature should have.

These issues should include the `enhancement` label.

## Pull Requests

If you would like to take a more active roll in the development of pySAP you can do so by submitting a "Pull request". A Pull Requests (PR) is a way by which a user can submit modifications or additions to the pySAP package directly. PRs need to be reviewed by the package moderators and if accepted are merged into the master branch of the repository.
If you would like to take a more active roll in the development of PySAP you can do so by submitting a "Pull request". A Pull Requests (PR) is a way by which a user can submit modifications or additions to the PySAP package directly. PRs need to be reviewed by the package moderators and if accepted are merged into the master branch of the repository.

Before making a PR, be sure to carefully read the following guidelines.

Expand All @@ -76,11 +76,11 @@ The following steps should be followed before making a pull request:

1. Log into your GitHub account or create an account if you do not already have one.

1. Go to the main pySAP repository page: [https://github.com/CEA-COSMIC/pysap](https://github.com/CEA-COSMIC/pysap)
1. Go to the main PySAP repository page: [https://github.com/CEA-COSMIC/pysap](https://github.com/CEA-COSMIC/pysap)

1. Fork the repository, *i.e.* press the button on the top right with this symbol <img src="https://upload.wikimedia.org/wikipedia/commons/d/dd/Octicons-repo-forked.svg" height="20">. This will create an independent copy of the repository on your account.

1. Clone your fork of pySAP.
1. Clone your fork of PySAP.

```bash
git clone https://github.com/YOUR_USERNAME/pysap
Expand Down Expand Up @@ -128,7 +128,7 @@ The following steps should be followed to make a pull request:
git commit -m "Description of commit"
```

7. Push the commits to a branch on your fork of pySAP.
7. Push the commits to a branch on your fork of PySAP.

```bash
git push origin BRANCH_NAME
Expand Down Expand Up @@ -184,7 +184,7 @@ Coverage tests are implemented via [Coveralls](https://coveralls.io/). These tes

### Style Guide

All contributions should adhere to the following style guides currently implemented in pySAP:
All contributions should adhere to the following style guides currently implemented in PySAP:

1. All code should be compatible with the Python versions listed in `README.rst`.

Expand Down
Loading

0 comments on commit 5d1a830

Please sign in to comment.