Skip to content

Commit

Permalink
Merge pull request #1 from richardkoehler/dev
Browse files Browse the repository at this point in the history
Add codecov
  • Loading branch information
richardkoehler authored Sep 19, 2022
2 parents d072982 + a1bd7cd commit f55d793
Show file tree
Hide file tree
Showing 9 changed files with 76 additions and 7 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Codecov
on:
push:
branches:
- main
- '*.x'
paths-ignore:
- 'docs/**'
- '*.md'
- '*.rst'
- '*.txt'
pull_request:
branches:
- main
- '*.x'
paths-ignore:
- 'docs/**'
- '*.md'
- '*.rst'
- '*.txt'
jobs:
run:
name: ${{ matrix.name }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- {name: 3.10 Linux, python: '3.10', os: ubuntu-latest}
steps:
- uses: actions/checkout@master
- name: Setup Python
uses: actions/setup-python@master
with:
python-version: ${{ matrix.python }}
- name: Generate coverage report
run: |
pip install -e .[dev]
pytest --cov=./ --cov-report=xml:./coverage/reports/coverage.xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
fail_ci_if_error: true
name: codecov-umbrella
21 changes: 21 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,24 @@ jobs:
restore-keys: pip|${{ runner.os }}|${{ matrix.python }}
- run: pip install tox
- run: tox -e ${{ matrix.tox }}
# runs:
# runs-on: ${{ matrix.os }}
# strategy:
# matrix:
# os: [ubuntu-latest, macos-latest, windows-latest]
# env:
# OS: ${{ matrix.os }}
# PYTHON: '3.10'
# steps:
# - name: Upload coverage to Codecov
# uses: codecov/codecov-action@v3
# with:
# token: ${{ secrets.CODECOV_TOKEN }}
# directory: ./coverage/reports/
# env_vars: OS,PYTHON
# fail_ci_if_error: true
# files: ./coverage1.xml,./coverage2.xml
# flags: unittests
# name: codecov-umbrella
# path_to_write_report: ./coverage/codecov_report.txt
# verbose: true
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[![Python Versions][python-shield]][python-url]
<!-- [![PyPi][pypi-shield]][pypi-url] -->
[![PyPi][pypi-shield]][pypi-url]
[![Tests][tests-shield]][tests-url]
[![Codecov][codecov-shield]][codecov-url]
[![License][license-shield]][license-url]
[![Contributors][contributors-shield]][contributors-url]
[![Code Style][codestyle-shield]][codestyle-url]
Expand Down Expand Up @@ -104,6 +105,8 @@ PTE Stats is licensed under the [MIT license](license-url).
[pypi-url]: https://pypi.org/project/pte-xdf/
[tests-shield]: https://github.com/richardkoehler/pte-xdf/actions/workflows/tests.yml/badge.svg
[tests-url]: https://github.com/richardkoehler/pte-xdf/actions/workflows/tests.yml
[codecov-shield]: https://codecov.io/github/richardkoehler/pte-xdf/branch/main/graph/badge.svg?token=PZU4QNK7FR
[codecov-url]: https://codecov.io/github/richardkoehler/pte-xdf
[homepage-shield]: https://img.shields.io/static/v1?label=Homepage&message=ICN&logoColor=black&labelColor=grey&color=9cf
[homepage-url]: https://www.icneuromodulation.org/
[contributors-shield]: https://img.shields.io/github/contributors/richardkoehler/pte-xdf.svg
Expand Down
2 changes: 1 addition & 1 deletion docs/contribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ For any minor additions or bugfixes, you may simply create a **pull request**.
When you then create a pull request, be sure to **link the pull request** to the open issue in order to close the issue automatically after merging.

## I want to contribute myself - how do I get started?
To contribute yourselves, create a fork of this repository and run `git clone https://github_link_to_fork` as described [above](#dev).
To contribute yourselves, create a fork of this repository and run `git clone https://github_link_to_fork` as described [here][development-version].

Then create a development branch from your fork.

Expand Down
2 changes: 1 addition & 1 deletion docs/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ $ pip install pte-xdf
```


## <a name="dev"></a>Development version
## Development version

To install the latest development version, first clone this repository:

Expand Down
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ markdown_extensions:
check_paths: true

plugins:
- autorefs
- mkdocstrings:
handlers:
python:
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ dependencies = ["mne", "numpy", "pyxdf"]

[project.optional-dependencies]
dev = ["black", "isort", "mypy", "pylint", "pytest", "pytest-cov", "tox"]
doc = ["mkdocs", "mkdocs-material", "mkdocstrings[python]"]
doc = ["mkdocs", "mkdocs-autorefs", "mkdocs-material", "mkdocstrings[python]"]
full = ["pte-xdf[dev,doc,release]"]
release = ["pip-tools"]

Expand Down
2 changes: 1 addition & 1 deletion src/pte_xdf/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@
"""

__version__ = "0.1.0.dev1"
__version__ = "0.1.0.rc1"

from .xdf import read_raw_xdf
4 changes: 2 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tox]
envlist =
py3{11,10}
py3{10, 11}
style
lint
typing
Expand All @@ -9,7 +9,7 @@ isolated_build = true

[testenv]
deps = -r requirements/dev-requirements.txt
commands = pytest -v --tb=short --basetemp={envtmpdir} {posargs:tests}
commands = pytest --cov-report xml --cov=./ -v --tb=short --basetemp={envtmpdir} {posargs:tests}

[testenv:{lint,style,typing}]
commands =
Expand Down

0 comments on commit f55d793

Please sign in to comment.