Skip to content

Commit 837dfaf

Browse files
authored
MAINT: Update and simplify the project template (#41)
* MAINT: udpate setup.py * MAINT: Update and simplify CIs * TST: improve and cover all code * FIX: use source and remove useless CI file * CI: issue of indent * FIX: install the pre-release scikit-learn * MAINT: update config setup * DOC: add more documentation structure * DOC: fix documentation building * MAINT: try different version of dependecies * MAINT: fix install * DOC: update the documentation on how to make a new estimator * CI: solve issue with version * CI: unfrooze travis * MAINT: correc the coverage * CI: correct circle ci * EHN: make module private * CI: upgrade python circleci
1 parent 509e91f commit 837dfaf

38 files changed

+881
-615
lines changed

.circleci/config.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
version: 2
2+
3+
jobs:
4+
python3:
5+
docker:
6+
- image: circleci/python:3.6.1
7+
steps:
8+
- checkout
9+
- run:
10+
command: |
11+
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh
12+
chmod +x miniconda.sh && ./miniconda.sh -b -p ~/miniconda
13+
export PATH="~/miniconda/bin:$PATH"
14+
conda update --yes --quiet conda
15+
conda create -n testenv --yes --quiet python=3
16+
source activate testenv
17+
conda install --yes pip numpy scipy scikit-learn matplotlib sphinx sphinx_rtd_theme numpydoc pillow
18+
pip install sphinx-gallery
19+
pip install .
20+
cd doc
21+
make html
22+
- store_artifacts:
23+
path: doc/_build/html
24+
destination: doc
25+
- store_artifacts:
26+
path: ~/log.txt
27+
- persist_to_workspace:
28+
root: doc/_build/html
29+
paths: .
30+
- attach_workspace:
31+
at: doc/_build/html
32+
- run: ls -ltrh doc/_build/html
33+
filters:
34+
branches:
35+
ignore: gh-pages
36+
37+
workflows:
38+
version: 2
39+
build-doc-and-deploy:
40+
jobs:
41+
- python3

.coveragerc

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Configuration for coverage.py
2+
3+
[run]
4+
branch = True
5+
source = skltemplate
6+
include = */skltemplate/*
7+
omit =
8+
*/setup.py
9+
10+
[report]
11+
exclude_lines =
12+
pragma: no cover
13+
def __repr__
14+
if self.debug:
15+
if settings.DEBUG
16+
raise AssertionError
17+
raise NotImplementedError
18+
if 0:
19+
if __name__ == .__main__.:
20+
if self.verbose:
21+
show_missing = True

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,8 @@ coverage.xml
6060
*.log
6161

6262
# Sphinx documentation
63-
docs/_build/
63+
doc/_build/
64+
doc/generated/
6465

6566
# PyBuilder
6667
target/

.nojekyll

Whitespace-only changes.

.readthedocs.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
formats:
2+
- none
3+
requirements_file: requirements.txt
4+
python:
5+
pip_install: true
6+
extra_requirements:
7+
- tests
8+
- docs

.travis.yml

Lines changed: 34 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,40 @@
1+
dist: trusty
2+
sudo: false
3+
14
language: python
25

36
cache:
4-
apt: true
5-
# We use three different cache directory
6-
# to work around a Travis bug with multi-platform cache
77
directories:
88
- $HOME/.cache/pip
9-
- $HOME/download
10-
env:
11-
global:
12-
# Directory where tests are run from
13-
- TEST_DIR=/tmp/test_dir/
14-
- MODULE=skltemplate
15-
matrix:
16-
- DISTRIB="conda" PYTHON_VERSION="2.7"
17-
NUMPY_VERSION="1.8.2" SCIPY_VERSION="0.13.03" CYTHON_VERSION="0.21"
18-
- DISTRIB="conda" PYTHON_VERSION="3.5" COVERAGE="true"
19-
NUMPY_VERSION="1.14.0" SCIPY_VERSION="1.0.0" CYTHON_VERSION="0.27.3"
209

21-
install: source ci_scripts/travis/install.sh
22-
script: bash ci_scripts/travis/test.sh
23-
after_success: source ci_scripts/travis/success.sh
10+
matrix:
11+
include:
12+
- env: PYTHON_VERSION="2.7" NUMPY_VERSION="1.13.1" SCIPY_VERSION="0.19.1"
13+
SKLEARN_VERSION="0.19.1"
14+
- env: PYTHON_VERSION="3.5" NUMPY_VERSION="1.13.1" SCIPY_VERSION="0.19.1"
15+
SKLEARN_VERSION="0.19.1"
16+
- env: PYTHON_VERSION="3.6" NUMPY_VERSION="1.13.1" SCIPY_VERSION="0.19.1"
17+
SKLEARN_VERSION="0.19.1"
18+
- env: PYTHON_VERSION="3.7" NUMPY_VERSION="*" SCIPY_VERSION="*"
19+
SKLEARN_VERSION="*"
20+
21+
install:
22+
# install miniconda
23+
- deactivate
24+
- wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh
25+
- MINICONDA_PATH=/home/travis/miniconda
26+
- chmod +x miniconda.sh && ./miniconda.sh -b -p $MINICONDA_PATH
27+
- export PATH=$MINICONDA_PATH/bin:$PATH
28+
- conda update --yes conda
29+
# create the testing environment
30+
- conda create -n testenv --yes python=$PYTHON_VERSION pip
31+
- source activate testenv
32+
- conda install --yes numpy==$NUMPY_VERSION scipy==$SCIPY_VERSION scikit-learn==$SKLEARN_VERSION nose pytest pytest-cov
33+
- pip install codecov
34+
- pip install .
35+
36+
script:
37+
- pytest -v --cov=skltemplate --pyargs skltemplate
38+
39+
after_success:
40+
- codecov

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2016, Vighnesh Birodkar
1+
Copyright (c) 2016, Vighnesh Birodkar and scikit-learn-contrib contributors
22
All rights reserved.
33

44
Redistribution and use in source and binary forms, with or without

0 commit comments

Comments
 (0)