Skip to content

Commit

Permalink
Merge pull request aleju#87 from Borda/master
Browse files Browse the repository at this point in the history
add CI
  • Loading branch information
aleju committed Jan 13, 2018
2 parents 3a7a1be + aba656a commit ae4f690
Show file tree
Hide file tree
Showing 6 changed files with 222 additions and 57 deletions.
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@ var/
*.manifest
*.spec

# PyCHarm
.idea/

# virtualenv
venv/

# Installer logs
pip-log.txt
pip-delete-this-directory.txt
Expand Down
33 changes: 27 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,43 @@ sudo: required

dist: trusty

language: c++ # to use system python
language:
- python
- cpp

env:
global:
- CODACY_PROJECT_TOKEN=63be83274aee4264aae7ba4c31d40677

cache:
directories:
- $HOME/.cache/pip

python:
- "2.7"
- "3.4"
- "3.5"
- "3.6"

before_install:
- sudo apt-get update -qq
- sudo apt-get install -qq -y python-virtualenv # python-opencv

install:
- sudo apt-get install -qq -y python-opencv python-virtualenv
- virtualenv venv
- cp $(python -c 'import cv2; print(cv2.__file__)') venv/lib/python2.7/site-packages
- . venv/bin/activate
- pip install -U numpy # for copied cv2
# - virtualenv venv
# - . venv/bin/activate
- pip install -r requirements.txt
- pip install coverage codecov pytest>=3.0.5 pytest-cov codacy-coverage # nose>=1.3.7
- pip install .

script:
- python tests/test.py
- coverage run --source imgaug --omit ./imgaug -m pytest tests/test.py --verbose --doctest-modules
# - nosetests tests/test.py -v --exe --with-doctest --with-xunit --with-coverage --cover-package=imgaug


after_success:
- codecov -t 1be5afbb-64c5-40e0-a31d-9661518c0fd4
- coverage xml
- python-codacy-coverage -r coverage.xml
- coverage report
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ This python library helps you with augmenting images for your machine learning p
It converts a set of input images into a new, much larger set of slightly altered images.

[![Build Status](https://travis-ci.org/aleju/imgaug.svg?branch=master)](https://travis-ci.org/aleju/imgaug)
[![codecov](https://codecov.io/gh/Borda/imgaug/branch/master/graph/badge.svg)](https://codecov.io/gh/Borda/imgaug)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/376bd45be5af418e9dcd3f2e3c7ee1dc)](https://www.codacy.com/app/Borda/imgaug?utm_source=github.com&utm_medium=referral&utm_content=Borda/imgaug&utm_campaign=Badge_Grade)

![64 quokkas](examples_grid.jpg?raw=true "64 quokkas")

Expand Down
42 changes: 42 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
#see https://github.com/codecov/support/wiki/Codecov-Yaml
codecov:
notify:
require_ci_to_pass: yes

coverage:
precision: 2 # 2 = xx.xx%, 0 = xx%
round: nearest # how coverage is rounded: down/up/nearest
range: 10...90 # custom range of coverage colors from red -> yellow -> green
status:
# https://codecov.readme.io/v1.0/docs/commit-status
project:
default:
against: auto
target: 40% # specify the target coverage for each commit status
threshold: 20% # allow this little decrease on project
# https://github.com/codecov/support/wiki/Filtering-Branches
# branches: master
if_ci_failed: error
# https://github.com/codecov/support/wiki/Patch-Status
patch:
default:
against: parent
target: 30% # specify the target "X%" coverage to hit
# threshold: 50% # allow this much decrease on patch
changes: false

parsers:
gcov:
branch_detection:
conditional: true
loop: true
macro: false
method: false
javascript:
enable_partials: false

comment:
layout: header, diff
require_changes: false
behavior: default # update if exists else create new
branches: *
5 changes: 5 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
numpy
scipy
Pillow
opencv-python
scikit-image
Loading

0 comments on commit ae4f690

Please sign in to comment.