Skip to content

Commit

Permalink
Merge pull request #29 from goanpeca/feature/circle-ciocheck
Browse files Browse the repository at this point in the history
PR: Add CircleCI basic integration
  • Loading branch information
ccordoba12 authored Jan 16, 2017
2 parents fcd366b + d4555ec commit 3c9a40b
Show file tree
Hide file tree
Showing 2 changed files with 153 additions and 0 deletions.
108 changes: 108 additions & 0 deletions .ciocheck
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
# -----------------------------------------------------------------------------
# ciocheck
# https://github.com/ContinuumIO/ciocheck
# -----------------------------------------------------------------------------
[ciocheck]
branch = origin/master
diff_mode = commited
file_mode = all
check = pep8

# Python (pyformat)
add_copyright = true
add_header = true
add_init = true

# -----------------------------------------------------------------------------
# pep8
# http://pep8.readthedocs.io/en/latest/intro.html#configuration
# -----------------------------------------------------------------------------
[pep8]
exclude = */tests/*,*/external/*
ignore = E126,
max-line-length = 79

# -----------------------------------------------------------------------------
# pydocstyle
# http://www.pydocstyle.org/en/latest/usage.html#example
# -----------------------------------------------------------------------------
[pydocstyle]
add-ignore = D203
inherit = false

# -----------------------------------------------------------------------------
# Flake 8
# http://flake8.readthedocs.io/en/latest/config.html
# -----------------------------------------------------------------------------
[flake8]
exclude = */tests/*,
ignore = E126,
max-line-length = 79
max-complexity = 64

# -----------------------------------------------------------------------------
# pylint
# https://pylint.readthedocs.io/en/latest/
# -----------------------------------------------------------------------------
#[pylint:messages]

# -----------------------------------------------------------------------------
# isort
# https://github.com/timothycrosley/isort/wiki/isort-Settings
# -----------------------------------------------------------------------------
[isort]
from_first = true
import_heading_stdlib = Standard library imports
import_heading_firstparty = Local imports
import_heading_thirdparty = Third party imports
indent = ' '
known_first_party = spyder_notebook
known_third_party = qtpy, spyder
known_standard_library = mimetypes
line_length = 79
sections = FUTURE,STDLIB,THIRDPARTY,FIRSTPARTY,LOCALFOLDER

# -----------------------------------------------------------------------------
# yapf
# https://github.com/google/yapf#formatting-style
# -----------------------------------------------------------------------------
[yapf:style]
based_on_style = pep8
column_limit = 79
spaces_before_comment = 2

# -----------------------------------------------------------------------------
# autopep8
# http://pep8.readthedocs.io/en/latest/intro.html#configuration
# -----------------------------------------------------------------------------
[autopep8]
exclude =
*/tests/*
ignore = E126,
max-line-length = 79

# -----------------------------------------------------------------------------
# Coverage
# http://coverage.readthedocs.io/en/latest/config.html
# -----------------------------------------------------------------------------
[coverage:run]
omit =
*/tests/*
*/build/*

[coverage:report]
fail_under = 0
show_missing = true
skip_covered = true
exclude_lines =
pragma: no cover
def test():
if __name__ == .__main__.:

# -----------------------------------------------------------------------------
# pytest
# http://doc.pytest.org/en/latest/usage.html
# -----------------------------------------------------------------------------
[pytest]
addopts = -rfew --durations=10
python_functions = test_*
45 changes: 45 additions & 0 deletions circle.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# https://circleci.com/gh/spyder-ide/spyder-notebook/

machine:
environment:
# Python versions to tests (Maximum of 4 different versions)
PY_VERSIONS: "3.5 3.4 2.7"

# Conda variables and aliases for commands
CMD_TEST_CIOCHECK: /home/ubuntu/miniconda/envs/test/bin/ciocheck
CMD_TEST_COVERALLS: /home/ubuntu/miniconda/envs/test/bin/coveralls
CMD_TEST_PIP: /home/ubuntu/miniconda/envs/test/bin/pip
CMD_TEST_PYTHON: /home/ubuntu/miniconda/envs/test/bin/python
MINICONDA: /home/ubuntu/miniconda
PATH: /home/ubuntu/miniconda/bin:$PATH

dependencies:
override:
# Conda install
- wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh
- bash Miniconda3-latest-Linux-x86_64.sh -b -p $MINICONDA
- conda config --set always_yes True

# Environment for tests
- export PY_VERSIONS=($PY_VERSIONS) &&
export PYTHON_VERSION=${PY_VERSIONS[$CIRCLE_NODE_INDEX]} &&
echo -e "PYTHON = $PYTHON_VERSION \n============" &&
conda create -n test python=$PYTHON_VERSION -q;
#- conda install -n test --file requirements.txt -q
- "$CMD_TEST_PIP install coveralls"

# Install python module
#- $CMD_TEST_PYTHON setup.py develop > /dev/null;

# Environment for lint checks
- conda install -n test ciocheck -c spyder-ide -q --no-update-deps

test:
override:
# Check Python style
- $CMD_TEST_CIOCHECK spyder_notebook -dt: # note the colon
parallel: true

# Run Python tests
- $CMD_TEST_CIOCHECK spyder_notebook -dl -df: # note the colon
parallel: true

0 comments on commit 3c9a40b

Please sign in to comment.