From 9e2d3149c8ce43a477abfbc2811c92d321f458d4 Mon Sep 17 00:00:00 2001 From: Jason Neal Date: Tue, 25 Apr 2017 16:19:21 +0100 Subject: [PATCH 1/4] Badge Table! --- README.md | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 3db9b3f..6e991ba 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,8 @@ -# spectrum_overload [![Build Status](https://travis-ci.org/jason-neal/spectrum_overload.svg)](https://travis-ci.org/jason-neal/spectrum_overload) [![Coverage Status](https://coveralls.io/repos/github/jason-neal/spectrum_overload/badge.svg?branch=develop)](https://coveralls.io/github/jason-neal/spectrum_overload?branch=develop) +# spectrum_overload +| Branch | Docs | Build | Coverage | Code Climate | Code Issues | +| :----: | :---: | :-----: | :----: | :----------: | :---------: | +| master | [![Documentation Status](https://readthedocs.org/projects/spectrum-overload/badge/?version=latest)](http://spectrum-overload.readthedocs.io/en/latest/?badge=latest) | [![Build Status](https://travis-ci.org/jason-neal/spectrum_overload.svg?branch=master)](https://travis-ci.org/jason-neal/spectrum_overload) | [![Coverage Status](https://coveralls.io/repos/github/jason-neal/spectrum_overload/badge.svg?branch=master)](https://coveralls.io/github/jason-neal/spectrum_overload?branch=master) [![Test Coverage](https://codeclimate.com/github/jason-neal/spectrum_overload/badges/coverage.svg)](https://codeclimate.com/github/jason-neal/spectrum_overload/coverage) | [![Code Climate](https://codeclimate.com/github/jason-neal/spectrum_overload/badges/gpa.svg)](https://codeclimate.com/github/jason-neal/spectrum_overload)[![Issue Count](https://codeclimate.com/github/jason-neal/spectrum_overload/badges/issue_count.svg)](https://codeclimate.com/github/jason-neal/spectrum_overload) | [![Code Issues](https://www.quantifiedcode.com/api/v1/project/6e918445f6f344c1af9c32f50718082e/snapshot/origin:master:HEAD/badge.svg)](https://www.quantifiedcode.com/app/project/6e918445f6f344c1af9c32f50718082e?branch=origin/master) | +| develop | [![Documentation Status](https://readthedocs.org/projects/spectrum-overload/badge/?version=develop)](http://spectrum-overload.readthedocs.io/en/latest/?badge=develop) | [![Build Status](https://travis-ci.org/jason-neal/spectrum_overload.svg?branch=develop)](https://travis-ci.org/jason-neal/spectrum_overload) | [![Coverage Status](https://coveralls.io/repos/github/jason-neal/spectrum_overload/badge.svg?branch=develop)](https://coveralls.io/github/jason-neal/spectrum_overload?branch=develop) [![Test Coverage](https://codeclimate.com/github/jason-neal/spectrum_overload/badges/coverage.svg?branch=develop)](https://codeclimate.com/github/jason-neal/spectrum_overload/coverage?branch=develop) | [![Code Climate](https://codeclimate.com/github/jason-neal/spectrum_overload/badges/gpa.svg?branch=develop)](https://codeclimate.com/github/jason-neal/spectrum_overload?branch=develop)[![Issue Count](https://codeclimate.com/github/jason-neal/spectrum_overload/badges/issue_count.svg?branch=develop)](https://codeclimate.com/github/jason-neal/spectrum_overload?branch=develop) | [![Code Issues](https://www.quantifiedcode.com/api/v1/project/6e918445f6f344c1af9c32f50718082e/snapshot/origin:develop:HEAD/badge.svg)](https://www.quantifiedcode.com/app/project/6e918445f6f344c1af9c32f50718082e?branch=origin/develop) | ## Overview The purpose of this was project was to learn how to use and create Classes, and to create a Spectrum object to use within my Phd work. @@ -6,7 +10,7 @@ The purpose of this was project was to learn how to use and create Classes, and The main goals of this project are basically complete. - create a class to contain spectrum -- automatic interpolation +- automatic interpolation - overloaded operators especially - Spectral division (SpectrumA / SpectrumB ) @@ -17,7 +21,7 @@ especially Currently to install and use Spectrum class for your own projects. clone the git repository where you want it: - + https://github.com/jason-neal/spectrum_overload.git cd into the downloaded directory: @@ -31,7 +35,7 @@ and install using: ## Usage To use import the class using : - + from spectrum_overload import Spectrum ... my_spectrum = Spectrum.Spectrum(flux, xaxis) @@ -78,4 +82,3 @@ Some tasks still to do: - Improve Documentation - Generate Calibration solution (outside spectrum class)? - Push a version to pypi - From 72112b7d926a961d8c7d98165c588c94310725c6 Mon Sep 17 00:00:00 2001 From: Jason Neal Date: Tue, 25 Apr 2017 23:31:39 +0100 Subject: [PATCH 2/4] Add Badges for master and develop on hoe page. --- docs/index.rst | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/docs/index.rst b/docs/index.rst index bf4f35a..f5dc980 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -47,6 +47,50 @@ Submit `issues `_, sugge This is my first attempt at creating classes, and packaging a python project so any *helpful* feedback is appreciated. +Badges +====== +**master** + +.. image:: https://readthedocs.org/projects/spectrum-overload/badge/?version=latest + :target: http://spectrum-overload.readthedocs.io/en/latest/?badge=latest + :alt: Documentation Status +.. image:: https://travis-ci.org/jason-neal/spectrum_overload.svg?branch=master + :target: https://travis-ci.org/jason-neal/spectrum_overload + :alt: Build Status +.. image:: https://coveralls.io/repos/github/jason-neal/spectrum_overload/badge.svg?branch=master + :target: https://coveralls.io/github/jason-neal/spectrum_overload?branch=master + :alt: Test Coverage +.. image:: https://codeclimate.com/github/jason-neal/spectrum_overload/badges/gpa.svg + :target: https://codeclimate.com/github/jason-neal/spectrum_overload + :alt: Code Climate +.. image:: https://codeclimate.com/github/jason-neal/spectrum_overload/badges/issue_count.svg + :target: https://codeclimate.com/github/jason-neal/spectrum_overload + :alt: Issue Count +.. image:: https://www.quantifiedcode.com/api/v1/project/6e918445f6f344c1af9c32f50718082e/badge.svg?branch=master + :target: https://www.quantifiedcode.com/app/project/6e918445f6f344c1af9c32f50718082e + :alt: Code Issues + +**develop** + +.. image:: https://readthedocs.org/projects/spectrum-overload/badge/?version=develop + :target: http://spectrum-overload.readthedocs.io/en/develop + :alt: Documentation Status +.. image:: https://travis-ci.org/jason-neal/spectrum_overload.svg?branch=develop + :target: https://travis-ci.org/jason-neal/spectrum_overload?branch=develop + :alt: Build Status +.. image:: https://coveralls.io/repos/github/jason-neal/spectrum_overload/badge.svg?branch=develop + :target: https://coveralls.io/github/jason-neal/spectrum_overload?branch=develop + :alt: Test Coverage +.. image:: https://codeclimate.com/github/jason-neal/spectrum_overload/badges/gpa.svg?branch=develop + :target: https://codeclimate.com/github/jason-neal/spectrum_overload?branch=develop + :alt: Code Climate GPA +.. image:: https://codeclimate.com/github/jason-neal/spectrum_overload/badges/issue_count.svg?branch=develop + :target: https://codeclimate.com/github/jason-neal/spectrum_overload?branch=develop + :alt: Issue Count +.. image:: https://www.quantifiedcode.com/api/v1/project/6e918445f6f344c1af9c32f50718082e/badge.svg?branch=develop + :target: https://www.quantifiedcode.com/app/project/6e918445f6f344c1af9c32f50718082e?branch=develop + :alt: Code Issues + Indices and tables ================== From a7eb185e5a6db35ca5fe4d3defae6cb38ddb9f16 Mon Sep 17 00:00:00 2001 From: Jason Neal Date: Tue, 25 Apr 2017 23:32:02 +0100 Subject: [PATCH 3/4] Move main badges to the top. --- docs/index.rst | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/docs/index.rst b/docs/index.rst index f5dc980..5fa6dd8 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -1,17 +1,25 @@ .. Spectrum documentation master file, created by sphinx-quickstart on Sun Sep 11 23:45:23 2016. +.. image:: https://readthedocs.org/projects/spectrum-overload/badge/?version=latest + :target: http://spectrum-overload.readthedocs.io/en/latest/?badge=latest + :alt: Documentation Status + +.. image:: https://travis-ci.org/jason-neal/spectrum_overload.svg?branch=master + :target: https://travis-ci.org/jason-neal/spectrum_overload + +.. image:: https://coveralls.io/repos/github/jason-neal/spectrum_overload/badge.svg?branch=master + :target: https://coveralls.io/github/jason-neal/spectrum_overload?branch=master + +.. image:: https://codeclimate.com/github/jason-neal/spectrum_overload/badges/gpa.svg + :target: https://codeclimate.com/github/jason-neal/spectrum_overload + :alt: Code Climate + .. _home: ============================================= Welcome to spectrum_overload's documentation! ============================================= -.. image:: https://travis-ci.org/jason-neal/spectrum_overload.svg?branch=develop - :target: https://travis-ci.org/jason-neal/spectrum_overload - -.. image:: https://coveralls.io/repos/github/jason-neal/spectrum_overload/badge.svg?branch=develop - :target: https://coveralls.io/github/jason-neal/spectrum_overload?branch=develop - Spectrum_overload is to manipulate astronomical spectra in a spectrum class with :ref:`overloaded operators `. This means that you can easily divide and subtract spectra from each other using the math operators ``+``, ``-``, ``*``, ``/``, ``**`` keeping the wavelength, flux and headers together. From cd8904f17bf52bb208f6f3329c2b50feed6e77cb Mon Sep 17 00:00:00 2001 From: Jason Neal Date: Tue, 25 Apr 2017 23:58:48 +0100 Subject: [PATCH 4/4] Update .travis.yml. Add python 3.6 Add code climate test reporter Tidy away comments. --- .travis.yml | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/.travis.yml b/.travis.yml index 025cb28..2894279 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,11 +3,9 @@ python: - "2.7" - "3.4" - "3.5" - #- "3.5-dev" # 3.5 development branch - #- "nightly" # currently points to 3.6-dev -# command to install dependencies + - "3.6" -#install: "pip install -r requirements.txt" +# command to install dependencies # Setup anaconda before_install: # http://conda.pydata.org/docs/travis.html @@ -24,27 +22,20 @@ before_install: - conda update -q conda - conda info -a install: - #- conda install --yes python=$TRAVIS_PYTHON_VERSION numpy scipy matplotlib #nose atlas dateutil pandas statsmodels - # Coverage packages are on my binstar channel - #- conda install --yes -c dan_blanchard python-coveralls nose-cov - conda create -q -n test-environment python=$TRAVIS_PYTHON_VERSION numpy scipy astropy - source activate test-environment - pip install pyastronomy - python setup.py install - - pip install pytest-cov python-coveralls + - pip install pytest-cov python-coveralls codeclimate-test-reporter - pip install -r requirements.txt -# install: -# - pip install numpy -# - pip install tox -# - pip install matplotlib -# - pip install hypothesis # command to run tests script: # - py.test -cov coveralls --cov-report term-missing # - py.test --cov=spectrum_overload spectrum_overload/ --cov-report term-missing - - py.test --cov=spectrum_overload --cov-report term-missing + - pytest --cov=spectrum_overload --cov-report term-missing --durations 5 after_success: - coveralls + - codeclimate-test-reporter