Skip to content

Commit 12c348c

Browse files
authored
[MAINT] Use Github Actions for docs (nbara#67)
1 parent 30de2e7 commit 12c348c

File tree

9 files changed

+45
-52
lines changed

9 files changed

+45
-52
lines changed
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: docs
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
branches:
9+
- master
10+
11+
# workflow_dispatch: # Uncomment line to be able to trigger action manually
12+
13+
jobs:
14+
sphinx_docs_to_gh-pages:
15+
runs-on: ubuntu-latest
16+
name: deploy to gh-pages
17+
steps:
18+
- uses: actions/checkout@v3
19+
- name: Set up Python 3.10
20+
uses: actions/setup-python@v4
21+
with:
22+
python-version: "3.10"
23+
cache: "pip"
24+
- name: Install meegkit and dependencies
25+
run: |
26+
python -m pip install --upgrade pip
27+
pip install -r requirements.txt
28+
pip install -e .[docs]
29+
- name: Build HTML
30+
run: |
31+
cd doc/
32+
make html
33+
- name: Run ghp-import
34+
run: |
35+
ghp-import -n -p -f doc/_build/html
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: unit-tests
1+
name: tests
22

33
on:
44
push:
@@ -14,7 +14,7 @@ jobs:
1414
strategy:
1515
max-parallel: 4
1616
matrix:
17-
python-version: [3.7, 3.8, 3.9]
17+
python-version: ["3.9", "3.10", "3.11"]
1818

1919
steps:
2020
- uses: actions/checkout@v1

.travis.yml

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

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
[![unit-tests](https://github.com/nbara/python-meegkit/workflows/unit-tests/badge.svg?style=flat)](https://github.com/nbara/python-meegkit/actions?workflow=unit-tests)
2-
[![documentation](https://img.shields.io/travis/nbara/python-meegkit.svg?label=documentation&logo=travis)](https://www.travis-ci.com/github/nbara/python-meegkit)
1+
[![tests](https://github.com/nbara/python-meegkit/workflows/tests/badge.svg?style=flat)](https://github.com/nbara/python-meegkit/actions?workflow=tests)
2+
[![docs](https://github.com/nbara/python-meegkit/workflows/docs/badge.svg?style=flat)](https://github.com/nbara/python-meegkit/actions?workflow=docs)
33
[![codecov](https://codecov.io/gh/nbara/python-meegkit/branch/master/graph/badge.svg)](https://codecov.io/gh/nbara/python-meegkit)
44
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/nbara/python-meegkit/master)
55
[![DOI](https://zenodo.org/badge/117451752.svg)](https://zenodo.org/badge/latestdoi/117451752)

citation.cff

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ authors:
55
given-names: "Nicolas"
66
orcid: "https://orcid.org/0000-0003-1495-561X"
77
title: "MEEGkit"
8-
version: 0.1.1
8+
version: 0.1.3
99
doi: 10.5281/zenodo.5643659
1010
date-released: 2021-10-15
1111
url: "https://github.com/nbara/python-meegkit"

doc/requirements.txt

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

setup.cfg

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,5 @@ upload-dir = doc/_build/html
2020

2121
[options.extras_require]
2222
extra = pymanopt
23-
docs = sphinx;sphinx-gallery;sphinx-bootstrap_theme;sphinx-copybutton;sphinxemoji;numpydoc;pydata-sphinx-theme;pillow;jupyter-sphinx;meegkit[extra]
23+
docs = sphinx;sphinx-gallery;sphinx-bootstrap_theme;sphinx-copybutton;sphinxemoji;numpydoc;pydata-sphinx-theme;pillow;jupyter-sphinx;ghp-import;meegkit[extra]
2424
tests = pytest;pytest-cov;codecov;codespell;flake8;pydocstyle;meegkit[extra]
25-

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"Tracker": "https://github.com/nbara/python-meegkit/issues/",
2323
},
2424
platforms="any",
25-
python_requires=">=3.7",
25+
python_requires=">=3.8",
2626
install_requires=["numpy", "scipy", "scikit-learn", "joblib", "pandas",
2727
"matplotlib", "tqdm", "pyriemann", "statsmodels"],
2828
zip_safe=False)

tests/test_asr.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -243,8 +243,8 @@ def test_asr_class(method, reref, show=False):
243243
plt.show()
244244

245245
# TODO: the transform() process is stochastic, so Y and Y2 are not going to
246-
# be entirely idetntical but close enough
247-
assert np.all(np.abs(Y - Y2) < 5), np.max(np.abs(Y - Y2)) # < 5uV diff
246+
# be entirely identical but close enough
247+
assert np.all(np.abs(Y - Y2) < 6), np.max(np.abs(Y - Y2)) # < 6uV diff
248248
assert np.all(np.isreal(Y)), "output should be real-valued"
249249
assert np.all(np.isreal(Y2)), "output should be real-valued"
250250

@@ -261,5 +261,5 @@ def test_asr_class(method, reref, show=False):
261261
pytest.main([__file__])
262262
# test_yulewalk(250, True)
263263
# test_asr_functions(True)
264-
# test_asr_class(method='riemann', reref=False, show=True)
264+
# test_asr_class(method='riemann', reref=True, show=False)
265265
# test_yulewalk_filter(16, True)

0 commit comments

Comments
 (0)