Skip to content

Commit

Permalink
Merge pull request #31 from ccordoba12/fix-cis
Browse files Browse the repository at this point in the history
PR: Fix continuous integration services
  • Loading branch information
ccordoba12 committed Sep 23, 2018
2 parents e754896 + 2e554f9 commit 1ad4c1f
Show file tree
Hide file tree
Showing 8 changed files with 99 additions and 126 deletions.
49 changes: 49 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
version: 2

main: &main
machine: true
steps:
- checkout
- run:
command: docker pull dorowu/ubuntu-desktop-lxde-vnc:trusty
- run:
name: Install system packages
command: |
sudo apt-get -qq update
sudo apt-get install -q libegl1-mesa
- run:
command: ./.circleci/install.sh
- run:
command: ./.circleci/run_tests.sh
- run:
command: ./.circleci/coverage.sh

jobs:
python2.7:
<<: *main
environment:
- PYTHON_VERSION: "2.7"

python3.5:
<<: *main
environment:
- PYTHON_VERSION: "3.5"

python3.6:
<<: *main
environment:
- PYTHON_VERSION: "3.6"

python3.7:
<<: *main
environment:
- PYTHON_VERSION: "3.7"

workflows:
version: 2
build_and_test:
jobs:
- python2.7
- python3.5
- python3.6
- python3.7
7 changes: 7 additions & 0 deletions .circleci/coverage.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

export COVERALLS_REPO_TOKEN="NFNNbVsb3wb3uBRYljg96R74lRiRRePIU"
source $HOME/miniconda/etc/profile.d/conda.sh
conda activate test

coveralls
24 changes: 24 additions & 0 deletions .circleci/install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/bin/bash

export TRAVIS_OS_NAME="linux"
export CONDA_DEPENDENCIES_FLAGS="--quiet"
export CONDA_DEPENDENCIES="line_profiler mock pytest spyder pytest-cov"
export CONDA_DEPENDENCIES_FLAGS="-q"
export PIP_DEPENDENCIES="coveralls pytest-qt"

echo -e "PYTHON = $PYTHON_VERSION \n============"
git clone git://github.com/astropy/ci-helpers.git > /dev/null
source ci-helpers/travis/setup_conda_$TRAVIS_OS_NAME.sh
source $HOME/miniconda/etc/profile.d/conda.sh
conda activate test

# Install the package in develop mode
pip install -e .

# Used by qthelpers to close widgets after a defined time
export TEST_CI="True"
export TEST_CI_APP="True"

# Run Spyder to get it's config files
spyder --reset
spyder
7 changes: 7 additions & 0 deletions .circleci/run_tests.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

source $HOME/miniconda/etc/profile.d/conda.sh
conda activate test

# Run tests
pytest -x -vv --cov=spyder_line_profiler spyder_line_profiler
58 changes: 0 additions & 58 deletions .travis.yml

This file was deleted.

19 changes: 7 additions & 12 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@ Project information
Build information
-----------------

.. image:: https://travis-ci.org/spyder-ide/spyder-line-profiler.svg?branch=master
:target: https://travis-ci.org/spyder-ide/spyder-line-profiler

.. image:: https://ci.appveyor.com/api/projects/status/u8m20qgel4j155pn/branch/master?svg=true
:target: https://ci.appveyor.com/project/spyder-ide/spyder-line-profiler

Expand All @@ -28,16 +25,11 @@ Build information
.. image:: https://coveralls.io/repos/github/spyder-ide/spyder-line-profiler/badge.svg?branch=master
:target: https://coveralls.io/github/spyder-ide/spyder-line-profiler?branch=master

.. image:: https://www.quantifiedcode.com/api/v1/project/54e5f210a2dd4d979438fd8574650822/badge.svg
:target: https://www.quantifiedcode.com/api/project/54e5f210a2dd4d979438fd8574650822

.. image:: https://scrutinizer-ci.com/g/spyder-ide/spyder-line-profiler/badges/quality-score.png?b=master
:target: https://scrutinizer-ci.com/g/spyder-ide/spyder-line-profiler/?branch=master)

Description
-----------

This is a plugin to run the python `line profiler <https://github.com/rkern/line_profiler>`_ from within the python IDE `spyder <https://github.com/spyder-ide/spyder>`_.
This is a plugin to run the python `line profiler <https://github.com/rkern/line_profiler>`_
from within the python IDE `spyder <https://github.com/spyder-ide/spyder>`_.

The code is an adaptation of the profiler plugin integrated in spyder.

Expand All @@ -58,9 +50,12 @@ Spyder before you can use the plugin.
Usage
-----

Add a ``@profile`` decorator to the functions that you wish to profile then press Shift+F10 (line profiler default) to run the profiler on the current script, or go to ``Run > Profile line by line``.
Add a ``@profile`` decorator to the functions that you wish to profile then press Shift+F10
(line profiler default) to run the profiler on the current script, or go to
``Run > Profile line by line``.

The results will be shown in a dockwidget, grouped by function. Lines with a stronger color take more time to run.
The results will be shown in a dockwidget, grouped by function. Lines with a stronger color
take more time to run.


Screenshot
Expand Down
24 changes: 5 additions & 19 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,13 @@ environment:
# Environment variables used by astropy helpers
PYTHON: "C:\\conda"
CMD_IN_ENV: "cmd /E:ON /V:ON /C .\\ci-helpers\\appveyor\\windows_sdk.cmd"
PYTHON_ARCH: "64" # needs to be set for CMD_IN_ENV to succeed. If a mix
# of 32 bit and 64 bit builds are needed, move this
# to the matrix section.
PYTHON_ARCH: "64"
CONDA_DEPENDENCIES: "line_profiler mock pytest spyder"
PIP_DEPENDENCIES_2: "pytest-qt" # Fix when fixed upstream
PIP_DEPENDENCIES: "pytest-qt"

matrix:
# PyQt5
- PYTHON_VERSION: "3.6"
- PYTHON_VERSION: "3.5"
USE_QT_API: "PyQt5"
PYTEST_QT_API: "pyqt5"
- PYTHON_VERSION: "2.7"
USE_QT_API: "PyQt5"
PYTEST_QT_API: "pyqt5"

platform:
-x64
Expand All @@ -48,19 +41,12 @@ install:
- "powershell ci-helpers/appveyor/install-miniconda.ps1"
- "SET PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%"
- "activate test"
# Install pip dependencies.
- "pip install %PIP_DEPENDENCIES_2%"
# Install the selected Qt version
- if "%USE_QT_API%" == "PyQt5" conda install qt=5.* pyqt=5.*
- if "%USE_QT_API%" == "PySide2" conda install qt=5.* pyside2
- if "%USE_QT_API%" == "PyQt4" conda install qt=4.* pyqt=4.*
- if "%USE_QT_API%" == "PySide" conda install qt=4.* pyside
- "python setup.py develop"
- "pip install -e ."
- "spyder --reset"
- "spyder"

# Not a .NET project, we build in the install step instead
build: false

test_script:
- py.test spyder_line_profiler
- pytest -x -vv spyder_line_profiler
37 changes: 0 additions & 37 deletions circle.yml

This file was deleted.

0 comments on commit 1ad4c1f

Please sign in to comment.