Skip to content

Commit 4b75f15

Browse files
author
Joseph Hamman
committed
Merge branch 'main' of github.com:pangeo-data/xbatcher into accessor
2 parents 2b5d8a4 + f9d40fd commit 4b75f15

19 files changed

+396
-206
lines changed

.github/dependabot.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: pip
4+
directory: "/"
5+
schedule:
6+
interval: daily
7+
- package-ecosystem: "github-actions"
8+
directory: "/"
9+
schedule:
10+
interval: "daily"

.github/workflows/main.yaml

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: "*"
6+
pull_request:
7+
branches: main
8+
schedule:
9+
- cron: "0 0 * * *"
10+
11+
jobs:
12+
lint:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/[email protected]
16+
- uses: actions/[email protected]
17+
- uses: pre-commit/[email protected]
18+
19+
test:
20+
name: ${{ matrix.python-version }}-build
21+
runs-on: ubuntu-latest
22+
strategy:
23+
matrix:
24+
python-version: [3.7, 3.8, 3.9]
25+
steps:
26+
- uses: actions/[email protected]
27+
- name: Setup Python
28+
uses: actions/[email protected]
29+
with:
30+
python-version: ${{ matrix.python-version }}
31+
architecture: x64
32+
- uses: actions/[email protected]
33+
with:
34+
path: ~/.cache/pip
35+
key: ${{ runner.os }}-pip-${{ hashFiles('**/dev-requirements.txt') }}
36+
restore-keys: |
37+
${{ runner.os }}-pip-
38+
- run: |
39+
python -m pip install -r dev-requirements.txt
40+
python -m pip install --no-deps -e .
41+
python -m pip list
42+
- name: Running Tests
43+
run: |
44+
python -m pytest --verbose
45+
46+
test-upstream:
47+
name: ${{ matrix.python-version }}-dev-build
48+
runs-on: ubuntu-latest
49+
strategy:
50+
matrix:
51+
python-version: [3.8, 3.9]
52+
steps:
53+
- uses: actions/[email protected]
54+
- name: Setup Python
55+
uses: actions/[email protected]
56+
with:
57+
python-version: ${{ matrix.python-version }}
58+
architecture: x64
59+
- uses: actions/[email protected]
60+
with:
61+
path: ~/.cache/pip
62+
key: ${{ runner.os }}-pip-${{ hashFiles('**/dev-requirements.txt') }}
63+
restore-keys: |
64+
${{ runner.os }}-pip-
65+
- run: |
66+
python -m pip install -r dev-requirements.txt
67+
python -m pip install --no-deps --upgrade \
68+
git+https://github.com/dask/dask \
69+
git+https://github.com/pydata/xarray
70+
python -m pip install --no-deps -e .
71+
python -m pip list
72+
- name: Running Tests
73+
run: |
74+
python -m pytest --verbose

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ var/
2222
*.egg-info/
2323
.installed.cfg
2424
*.egg
25+
doc/_build/
2526

2627
# PyInstaller
2728
# Usually these files are written by a python script from a template

.pre-commit-config.yaml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
repos:
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: v4.0.1
4+
hooks:
5+
- id: trailing-whitespace
6+
- id: end-of-file-fixer
7+
- id: check-docstring-first
8+
- id: check-json
9+
- id: check-yaml
10+
- id: double-quote-string-fixer
11+
12+
- repo: https://github.com/ambv/black
13+
rev: 21.5b2
14+
hooks:
15+
- id: black
16+
args: ["--line-length", "80", "--skip-string-normalization"]
17+
18+
- repo: https://gitlab.com/pycqa/flake8
19+
rev: 3.9.2
20+
hooks:
21+
- id: flake8
22+
- repo: https://github.com/asottile/seed-isort-config
23+
rev: v2.2.0
24+
hooks:
25+
- id: seed-isort-config
26+
- repo: https://github.com/pre-commit/mirrors-isort
27+
rev: v5.8.0
28+
hooks:
29+
- id: isort
30+
31+
- repo: https://github.com/pre-commit/mirrors-prettier
32+
rev: v2.2.0
33+
hooks:
34+
- id: prettier
35+
language_version: system

.travis.yml

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

README.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@ such as Keras_. View the |docs| for more info.
1111
.. _Keras: https://keras.io/
1212

1313

14-
.. |Build Status| image:: https://travis-ci.com/rabernat/xbatcher.svg?branch=master
15-
:target: https://travis-ci.com/rabernat/xbatcher
16-
:alt: travis-ci build status
17-
.. |codecov| image:: https://codecov.io/gh/rabernat/xbatcher/branch/master/graph/badge.svg
18-
:target: https://codecov.io/gh/rabernat/xbatcher
14+
.. |Build Status| image:: https://github.com/pangeo-data/xbatcher/workflows/CI/badge.svg
15+
:target: https://github.com/pangeo-data/xbatcher/actions
16+
:alt: github actions build status
17+
.. |codecov| image:: https://codecov.io/gh/pangeo-data/xbatcher/branch/master/graph/badge.svg
18+
:target: https://codecov.io/gh/pangeo-data/xbatcher
1919
:alt: code coverage
2020
.. |docs| image:: http://readthedocs.org/projects/xbatcher/badge/?version=latest
2121
:target: http://xbatcher.readthedocs.org/en/latest/?badge=latest
2222
.. |license| image:: https://img.shields.io/github/license/mashape/apistatus.svg
23-
:target: https://github.com/rabernat/xbatcher
23+
:target: https://github.com/pangeo-data/xbatcher
2424
:alt: license

conftest.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import pytest
2+
3+
4+
@pytest.fixture(autouse=True)
5+
def add_standard_imports(doctest_namespace, tmpdir):
6+
import numpy as np
7+
8+
# always seed numpy.random to make the examples deterministic
9+
np.random.seed(0)

dev-requirements.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
pytest
2+
coverage
3+
-r requirements.txt

0 commit comments

Comments
 (0)