Skip to content

Commit

Permalink
Merge pull request #50 from phausamann/develop
Browse files Browse the repository at this point in the history
Release 0.4
  • Loading branch information
phausamann authored Jun 18, 2020
2 parents aee4f6b + 7f8d9f3 commit dedf70f
Show file tree
Hide file tree
Showing 66 changed files with 2,364 additions and 1,904 deletions.
10 changes: 10 additions & 0 deletions .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[bumpversion]
current_version = 0.4.0

[bumpversion:file:setup.py]
search = version="{current_version}"
replace = version="{new_version}"

[bumpversion:file:sklearn_xarray/__init__.py]
search = __version__ = "{current_version}"
replace = __version__ = "{new_version}"
22 changes: 11 additions & 11 deletions .github/CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -125,23 +125,23 @@ tools:

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

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

- No pyflakes warnings, check with::
- No flake8 warnings, check with::

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

- No PEP8 warnings, check with::
- Format code with black::

$ pip install pep8
$ pep8 path/to/module.py
$ pip install black==19.10b0
$ black .

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

$ pip install autopep8
$ autopep8 path/to/pep8.py
$ pip install pre-commit
$ pre-commit install


Filing bugs
Expand Down
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Make sure you have:
- [ ] added the necessary updates to `doc/content/whatsnew.rst`
- [ ] added documentation for new features
- [ ] updated sklearn_xarray/version.py if you are preparing a new release
- [ ] run bumpversion and reset conda build number if you are preparing a new release
8 changes: 3 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
makepip.cmd
makedoc.cmd
.idea/
data/
doc/modules/
doc/_build/
doc/auto_examples/
docs/modules/
docs/_build/
docs/auto_examples/
coverage/

# So far, all html files are auto-generated
Expand Down
12 changes: 12 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
repos:
- repo: https://github.com/psf/black
rev: 19.10b0
hooks:
- id: black

- repo: https://gitlab.com/pycqa/flake8
rev: 3.7.9
hooks:
- id: flake8
exclude: sklearn_xarray/externals
args: ['--ignore=E203,W503,W504']
58 changes: 39 additions & 19 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,32 +1,51 @@
# Config file for automatic testing at travis-ci.org
os: linux
dist: bionic
language: python

cache:
apt: true
directories:
- "$HOME/.cache/pip"
- "$HOME/download"
- "$HOME/.cache/pip"
- "$HOME/download"

env:
global:
- TEST_DIR=/tmp/test_dir/
- MODULE=sklearn_xarray
matrix:
- DISTRIB="conda" PYTHON_VERSION="2.7"
- DISTRIB="conda" PYTHON_VERSION="3.5" COVERAGE="true"
- TEST_DIR=/tmp/test_dir/
- PKG_NAME=sklearn-xarray
- MODULE=sklearn_xarray
- USER=phausamann

jobs:
include:
- python: 3.6
env: COVERAGE="true" BLACK="true" FLAKE8="true"
- python: 3.7
- python: 3.8
- env: CONDA_BLD_PATH=~/conda-bld
install:
- source build_tools/travis/install_conda.sh
- conda install -y conda-build anaconda-client
- conda config --set anaconda_upload no
script:
- conda build -c conda-forge build_tools/conda
after_success:
- chmod +x build_tools/travis/conda_upload.sh

install:
- source build_tools/travis/install_conda.sh
- source build_tools/travis/install.sh

install: source build_tools/travis/install.sh
script:
- bash build_tools/travis/test.sh
- bash build_tools/travis/make_docs.sh

after_success:
- source build_tools/travis/success.sh
# - chmod +x build_tools/travis/deploy_anaconda.sh
- bash build_tools/travis/success.sh

deploy:

- provider: pages
local-dir: doc/_build/html
local-dir: docs/_build/html
skip-cleanup: true
github-token: $GITHUB_TOKEN # Set in the settings page of your repository, as a secure variable
keep-history: true
Expand All @@ -35,16 +54,17 @@ deploy:

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

# - provider: script
# script: build_tools/travis/deploy_anaconda.sh
# on:
# branch: master
# tags: true
# skip_cleanup: true
- provider: script
script: build_tools/travis/conda_upload.sh
on:
condition: "$CONDA_BLD_PATH = $HOME/conda-bld"
branch: master
tags: true
skip_cleanup: true
29 changes: 11 additions & 18 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
.. -*- mode: rst -*-
|Travis|_ |AppVeyor|_ |Coverage|_ |PyPI|_
|Travis|_ |Coverage|_ |PyPI|_ |Black|_

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

.. |AppVeyor| image:: https://ci.appveyor.com/api/projects/status/qe6ytlg0ja2mqcxr/branch/master?svg=true
.. _AppVeyor: https://ci.appveyor.com/project/phausamann/sklearn-xarray/branch/master

.. |Coverage| image:: https://coveralls.io/repos/github/phausamann/sklearn-xarray/badge.svg?branch=master
.. _Coverage: https://coveralls.io/github/phausamann/sklearn-xarray?branch=master

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

.. |Black| image:: https://img.shields.io/badge/code%20style-black-000000.svg
.. _Black: https://github.com/psf/black

sklearn-xarray
==============

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


Highlights
-------------
Features
----------

- Makes sklearn estimators compatible with xarray DataArrays and Datasets.
- Allows for estimators to change the number of samples.
Expand All @@ -45,28 +45,21 @@ Highlights
Installation
-------------

Required dependencies:

- Python 2.7, 3.4, 3.5, or 3.6
- scikit-learn (0.19 or later, depends on numpy & scipy)
- xarray (0.10 or later)
- pandas (0.20 or later)

The package can be installed from ``pip``::
The package can be installed with ``pip``::

$ pip install sklearn-xarray

For the latest version, you can also install from source::
or with ``conda``::

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


Example
-------

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

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

Expand Down
97 changes: 0 additions & 97 deletions appveyor.yml

This file was deleted.

Loading

0 comments on commit dedf70f

Please sign in to comment.