diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml new file mode 100644 index 00000000..06dd8d47 --- /dev/null +++ b/.github/workflows/documentation.yml @@ -0,0 +1,35 @@ +name: docs + +on: + push: + branches: + - master + pull_request: + branches: + - master + +# workflow_dispatch: # Uncomment line to be able to trigger action manually + +jobs: + sphinx_docs_to_gh-pages: + runs-on: ubuntu-latest + name: deploy to gh-pages + steps: + - uses: actions/checkout@v3 + - name: Set up Python 3.10 + uses: actions/setup-python@v4 + with: + python-version: "3.10" + cache: "pip" + - name: Install meegkit and dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt + pip install -e .[docs] + - name: Build HTML + run: | + cd doc/ + make html + - name: Run ghp-import + run: | + ghp-import -n -p -f doc/_build/html diff --git a/.github/workflows/pythonpackage.yml b/.github/workflows/testing.yml similarity index 93% rename from .github/workflows/pythonpackage.yml rename to .github/workflows/testing.yml index 8e4c8ff0..6ce5194a 100644 --- a/.github/workflows/pythonpackage.yml +++ b/.github/workflows/testing.yml @@ -1,4 +1,4 @@ -name: unit-tests +name: tests on: push: @@ -14,7 +14,7 @@ jobs: strategy: max-parallel: 4 matrix: - python-version: [3.7, 3.8, 3.9] + python-version: ["3.9", "3.10", "3.11"] steps: - uses: actions/checkout@v1 diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 220363e3..00000000 --- a/.travis.yml +++ /dev/null @@ -1,32 +0,0 @@ -branches: - only: - - master -notifications: - email: false -language: python -os: linux -dist: xenial -python: - # We don't actually use the Travis Python, but this keeps it organized. - - "3.8" -install: - - sudo apt-get update - - pip install -r requirements.txt - - pip install -e ".[docs]" -script: - - mkdir docs - - cd doc - - pip install -r requirements.txt - # - sphinx-autogen *.rst - - make html - - touch _build/html/.nojekyll -deploy: - provider: pages - token: $GITHUB_TOKEN - edge: true # opt in to dpl v2 - cleanup: false - keep_history: false - local_dir: _build/html - target_branch: gh-pages - on: - branch: master diff --git a/README.md b/README.md index 4c29f2f7..d5dc75bd 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ -[![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) -[![documentation](https://img.shields.io/travis/nbara/python-meegkit.svg?label=documentation&logo=travis)](https://www.travis-ci.com/github/nbara/python-meegkit) +[![tests](https://github.com/nbara/python-meegkit/workflows/tests/badge.svg?style=flat)](https://github.com/nbara/python-meegkit/actions?workflow=tests) +[![docs](https://github.com/nbara/python-meegkit/workflows/docs/badge.svg?style=flat)](https://github.com/nbara/python-meegkit/actions?workflow=docs) [![codecov](https://codecov.io/gh/nbara/python-meegkit/branch/master/graph/badge.svg)](https://codecov.io/gh/nbara/python-meegkit) [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/nbara/python-meegkit/master) [![DOI](https://zenodo.org/badge/117451752.svg)](https://zenodo.org/badge/latestdoi/117451752) diff --git a/citation.cff b/citation.cff index 3106a231..c2dec4cb 100644 --- a/citation.cff +++ b/citation.cff @@ -5,7 +5,7 @@ authors: given-names: "Nicolas" orcid: "https://orcid.org/0000-0003-1495-561X" title: "MEEGkit" -version: 0.1.1 +version: 0.1.3 doi: 10.5281/zenodo.5643659 date-released: 2021-10-15 url: "https://github.com/nbara/python-meegkit" diff --git a/doc/requirements.txt b/doc/requirements.txt deleted file mode 100644 index 6c33dbdb..00000000 --- a/doc/requirements.txt +++ /dev/null @@ -1,9 +0,0 @@ -sphinx -sphinx-copybutton -sphinxemoji -pydata-sphinx-theme -numpydoc -matplotlib -pillow -sphinx-gallery -jupyter-sphinx diff --git a/setup.cfg b/setup.cfg index ea9b3246..748a351d 100644 --- a/setup.cfg +++ b/setup.cfg @@ -20,6 +20,5 @@ upload-dir = doc/_build/html [options.extras_require] extra = pymanopt -docs = sphinx;sphinx-gallery;sphinx-bootstrap_theme;sphinx-copybutton;sphinxemoji;numpydoc;pydata-sphinx-theme;pillow;jupyter-sphinx;meegkit[extra] +docs = sphinx;sphinx-gallery;sphinx-bootstrap_theme;sphinx-copybutton;sphinxemoji;numpydoc;pydata-sphinx-theme;pillow;jupyter-sphinx;ghp-import;meegkit[extra] tests = pytest;pytest-cov;codecov;codespell;flake8;pydocstyle;meegkit[extra] - diff --git a/setup.py b/setup.py index d6e32cbe..66737f48 100644 --- a/setup.py +++ b/setup.py @@ -22,7 +22,7 @@ "Tracker": "https://github.com/nbara/python-meegkit/issues/", }, platforms="any", - python_requires=">=3.7", + python_requires=">=3.8", install_requires=["numpy", "scipy", "scikit-learn", "joblib", "pandas", "matplotlib", "tqdm", "pyriemann", "statsmodels"], zip_safe=False) diff --git a/tests/test_asr.py b/tests/test_asr.py index 326e99cb..d698cad6 100644 --- a/tests/test_asr.py +++ b/tests/test_asr.py @@ -243,8 +243,8 @@ def test_asr_class(method, reref, show=False): plt.show() # TODO: the transform() process is stochastic, so Y and Y2 are not going to - # be entirely idetntical but close enough - assert np.all(np.abs(Y - Y2) < 5), np.max(np.abs(Y - Y2)) # < 5uV diff + # be entirely identical but close enough + assert np.all(np.abs(Y - Y2) < 6), np.max(np.abs(Y - Y2)) # < 6uV diff assert np.all(np.isreal(Y)), "output should be real-valued" assert np.all(np.isreal(Y2)), "output should be real-valued" @@ -261,5 +261,5 @@ def test_asr_class(method, reref, show=False): pytest.main([__file__]) # test_yulewalk(250, True) # test_asr_functions(True) - # test_asr_class(method='riemann', reref=False, show=True) + # test_asr_class(method='riemann', reref=True, show=False) # test_yulewalk_filter(16, True)