Skip to content

Commit dedf70f

Browse files
authored
Merge pull request #50 from phausamann/develop
Release 0.4
2 parents aee4f6b + 7f8d9f3 commit dedf70f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+2364
-1904
lines changed

.bumpversion.cfg

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
[bumpversion]
2+
current_version = 0.4.0
3+
4+
[bumpversion:file:setup.py]
5+
search = version="{current_version}"
6+
replace = version="{new_version}"
7+
8+
[bumpversion:file:sklearn_xarray/__init__.py]
9+
search = __version__ = "{current_version}"
10+
replace = __version__ = "{new_version}"

.github/CONTRIBUTING.rst

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -125,23 +125,23 @@ tools:
125125

126126
- Code with good unittest **coverage** (at least 80%), check with::
127127

128-
$ pip install nose coverage
129-
$ nosetests --with-coverage path/to/tests_for_package
128+
$ pip install pytest pytest-cov
129+
$ pytest --cov=sklearn_xarray
130130

131-
- No pyflakes warnings, check with::
131+
- No flake8 warnings, check with::
132132

133-
$ pip install pyflakes
134-
$ pyflakes path/to/module.py
133+
$ pip install flake8
134+
$ flake8 sklearn_xarray tests --ignore=E203,W503,W504 --exclude=**/externals
135135

136-
- No PEP8 warnings, check with::
136+
- Format code with black::
137137

138-
$ pip install pep8
139-
$ pep8 path/to/module.py
138+
$ pip install black==19.10b0
139+
$ black .
140140

141-
- AutoPEP8 can help you fix some of the easy redundant errors::
141+
- pre-commit will run flake8 and black before each commit::
142142

143-
$ pip install autopep8
144-
$ autopep8 path/to/pep8.py
143+
$ pip install pre-commit
144+
$ pre-commit install
145145

146146

147147
Filing bugs

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
Make sure you have:
22
- [ ] added the necessary updates to `doc/content/whatsnew.rst`
33
- [ ] added documentation for new features
4-
- [ ] updated sklearn_xarray/version.py if you are preparing a new release
4+
- [ ] run bumpversion and reset conda build number if you are preparing a new release

.gitignore

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
1-
makepip.cmd
2-
makedoc.cmd
31
.idea/
42
data/
5-
doc/modules/
6-
doc/_build/
7-
doc/auto_examples/
3+
docs/modules/
4+
docs/_build/
5+
docs/auto_examples/
86
coverage/
97

108
# So far, all html files are auto-generated

.pre-commit-config.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
repos:
2+
- repo: https://github.com/psf/black
3+
rev: 19.10b0
4+
hooks:
5+
- id: black
6+
7+
- repo: https://gitlab.com/pycqa/flake8
8+
rev: 3.7.9
9+
hooks:
10+
- id: flake8
11+
exclude: sklearn_xarray/externals
12+
args: ['--ignore=E203,W503,W504']

.travis.yml

Lines changed: 39 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,51 @@
1+
# Config file for automatic testing at travis-ci.org
2+
os: linux
3+
dist: bionic
14
language: python
25

36
cache:
47
apt: true
58
directories:
6-
- "$HOME/.cache/pip"
7-
- "$HOME/download"
9+
- "$HOME/.cache/pip"
10+
- "$HOME/download"
811

912
env:
1013
global:
11-
- TEST_DIR=/tmp/test_dir/
12-
- MODULE=sklearn_xarray
13-
matrix:
14-
- DISTRIB="conda" PYTHON_VERSION="2.7"
15-
- DISTRIB="conda" PYTHON_VERSION="3.5" COVERAGE="true"
14+
- TEST_DIR=/tmp/test_dir/
15+
- PKG_NAME=sklearn-xarray
16+
- MODULE=sklearn_xarray
17+
- USER=phausamann
18+
19+
jobs:
20+
include:
21+
- python: 3.6
22+
env: COVERAGE="true" BLACK="true" FLAKE8="true"
23+
- python: 3.7
24+
- python: 3.8
25+
- env: CONDA_BLD_PATH=~/conda-bld
26+
install:
27+
- source build_tools/travis/install_conda.sh
28+
- conda install -y conda-build anaconda-client
29+
- conda config --set anaconda_upload no
30+
script:
31+
- conda build -c conda-forge build_tools/conda
32+
after_success:
33+
- chmod +x build_tools/travis/conda_upload.sh
34+
35+
install:
36+
- source build_tools/travis/install_conda.sh
37+
- source build_tools/travis/install.sh
1638

17-
install: source build_tools/travis/install.sh
1839
script:
1940
- bash build_tools/travis/test.sh
2041
- bash build_tools/travis/make_docs.sh
2142

2243
after_success:
23-
- source build_tools/travis/success.sh
24-
# - chmod +x build_tools/travis/deploy_anaconda.sh
44+
- bash build_tools/travis/success.sh
2545

2646
deploy:
27-
2847
- provider: pages
29-
local-dir: doc/_build/html
48+
local-dir: docs/_build/html
3049
skip-cleanup: true
3150
github-token: $GITHUB_TOKEN # Set in the settings page of your repository, as a secure variable
3251
keep-history: true
@@ -35,16 +54,17 @@ deploy:
3554

3655
- provider: pypi
3756
skip_cleanup: true
38-
user: phausamann
57+
user: $USER
3958
password:
4059
secure: cRtfmsupJcyrZ1EU+NJ1eng0Abn9LeDVHLf1xZ1/1sg3qq6PwJwxNFJHTMin0sIJXERFAGG3btRnFqiwYsrxF7OdWObDYZN3G9riKKhS2Z5bSanWyrQk4XF/s9haONHKv2falsZ6nnux9GDMod+ojPzedNGagISLsLixHMRZmYFnUAJtdzDOm6PoNTui0+0C3bHoAIPu+FZJ1rPV1xmGM+4YGLg/j3yFt6SIY0XYY9d2torXSwD1E0+8V/kPxTcyNCQVE9LlFP3v9xLt2wYq7ehjGbetehSZyJxjchjtgABBMBkGTKqBwb3pgagaRmC9KVatpRVVVSLJRZAbFOmfK3QkZzrVzDVwOEloVhhUxUAm3rZDbZHmvHO0maS5VkpDAb3lE1edLziLiD0qqLBSuy5Tru+uELa6IO6gO8r/dA8usnKAcNWHIjrpLd3W7P+btjrmrSx8ReYs9PitKFiCLgleoAJGZFoSN0sOIAimCzvIsCvJyjlbHOvDyb+ziqvxu66yz/hBmupGibIT2529pyVW713gBOyrIvsLqzX3uDw6aYMTSi4aYp5+sfkCA5RE8Fc6PEPnqj6LbWjBF6bgelj3wUc9J4ZniuSWFMDKmBhk/p/j9CRg7RYQ5g+lK5E0oJma0vThqx8MKDivVk4oOMD8txcA0g1DJn8oE6i4ptc=
4160
on:
4261
branch: master
4362
tags: true
4463

45-
# - provider: script
46-
# script: build_tools/travis/deploy_anaconda.sh
47-
# on:
48-
# branch: master
49-
# tags: true
50-
# skip_cleanup: true
64+
- provider: script
65+
script: build_tools/travis/conda_upload.sh
66+
on:
67+
condition: "$CONDA_BLD_PATH = $HOME/conda-bld"
68+
branch: master
69+
tags: true
70+
skip_cleanup: true

README.rst

Lines changed: 11 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
.. -*- mode: rst -*-
22
3-
|Travis|_ |AppVeyor|_ |Coverage|_ |PyPI|_
3+
|Travis|_ |Coverage|_ |PyPI|_ |Black|_
44

55
.. |Travis| image:: https://travis-ci.org/phausamann/sklearn-xarray.svg?branch=master
66
.. _Travis: https://travis-ci.org/phausamann/sklearn-xarray
77

8-
.. |AppVeyor| image:: https://ci.appveyor.com/api/projects/status/qe6ytlg0ja2mqcxr/branch/master?svg=true
9-
.. _AppVeyor: https://ci.appveyor.com/project/phausamann/sklearn-xarray/branch/master
10-
118
.. |Coverage| image:: https://coveralls.io/repos/github/phausamann/sklearn-xarray/badge.svg?branch=master
129
.. _Coverage: https://coveralls.io/github/phausamann/sklearn-xarray?branch=master
1310

1411
.. |PyPI| image:: https://badge.fury.io/py/sklearn-xarray.svg
1512
.. _PyPI: https://badge.fury.io/py/sklearn-xarray
1613

14+
.. |Black| image:: https://img.shields.io/badge/code%20style-black-000000.svg
15+
.. _Black: https://github.com/psf/black
16+
1717
sklearn-xarray
1818
==============
1919

@@ -34,8 +34,8 @@ The package documentation can be found at
3434
https://phausamann.github.io/sklearn-xarray/
3535

3636

37-
Highlights
38-
-------------
37+
Features
38+
----------
3939

4040
- Makes sklearn estimators compatible with xarray DataArrays and Datasets.
4141
- Allows for estimators to change the number of samples.
@@ -45,28 +45,21 @@ Highlights
4545
Installation
4646
-------------
4747

48-
Required dependencies:
49-
50-
- Python 2.7, 3.4, 3.5, or 3.6
51-
- scikit-learn (0.19 or later, depends on numpy & scipy)
52-
- xarray (0.10 or later)
53-
- pandas (0.20 or later)
54-
55-
The package can be installed from ``pip``::
48+
The package can be installed with ``pip``::
5649

5750
$ pip install sklearn-xarray
5851

59-
For the latest version, you can also install from source::
52+
or with ``conda``::
6053

61-
$ pip install https://github.com/phausamann/sklearn-xarray/archive/master.zip
54+
$ conda install -c phausamann -c conda-forge sklearn-xarray
6255

6356

6457
Example
6558
-------
6659

6760
The `activity recognition example`_ demonstrates how to use the
68-
package for cross-validated grid search for an activity recognition task. The
69-
example is also present as a jupyter notebook.
61+
package for cross-validated grid search for an activity recognition task.
62+
You can also download the example as a jupyter notebook.
7063

7164
.. _activity recognition example: https://phausamann.github.io/sklearn-xarray/auto_examples/plot_activity_recognition.html
7265

appveyor.yml

Lines changed: 0 additions & 97 deletions
This file was deleted.

0 commit comments

Comments
 (0)