Skip to content

Commit

Permalink
initial commit - forking cardioception v0.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
LegrandNico committed Apr 2, 2024
0 parents commit b112834
Show file tree
Hide file tree
Showing 480 changed files with 391,950 additions and 0 deletions.
Binary file added .coverage
Binary file not shown.
37 changes: 37 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Build and Deploy

on:
push:
branches:
- master
pull_request:
branches:
- master
permissions:
contents: write

jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v3

- name: Set up Python 3.9
uses: actions/setup-python@v4
with:
python-version: "3.9"

- name: Build
run: |
pip install --upgrade pip
pip install psychopy==2020.1.2 --no-deps
pip install -r requirements-docs.txt
sudo apt-get install graphviz
sphinx-build -b html docs/source docs/build/html
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: docs/build/html
BRANCH: gh-pages
33 changes: 33 additions & 0 deletions .github/workflows/linting.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Linting

on: [push, pull_request]

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- uses: actions/cache@v2
name: Configure pip caching
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
run: |
pip install isort flake8 black mypy
pip install types-setuptools
- name: Run tests and coverage
run: |
mypy ./cardioception/ --ignore-missing-imports
black ./cardioception/
isort ./cardioception/
flake8 ./cardioception/ --extend-ignore=E501
49 changes: 49 additions & 0 deletions .github/workflows/pypi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Publish Python 🐍 distributions 📦 to PyPI and TestPyPI

on: push

jobs:
build:
name: Build distribution 📦
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install pypa/build
run: >-
python3 -m
pip install
build
--user
- name: Build a binary wheel and a source tarball
run: python3 -m build
- name: Store the distribution packages
uses: actions/upload-artifact@v3
with:
name: python-package-distributions
path: dist/

publish-to-pypi:
name: >-
Publish Python 🐍 distribution 📦 to PyPI
if: startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes
needs:
- build
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/cardioception
permissions:
id-token: write # IMPORTANT: mandatory for trusted publishing
steps:
- name: Download all the dists
uses: actions/download-artifact@v3
with:
name: python-package-distributions
path: dist/
- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
14 changes: 14 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
.ipynb_checkpoints
*.pyc
.mypy_cache
.pytest_cache
/htmlcov
/dist
/cardioception.egg-info
/build
docs/source/auto_examples
docs/source/generated
docs/source/api
docs/build
docs/auto_examples
.Rproj.user
8 changes: 8 additions & 0 deletions .isort.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[settings]
known_third_party = numpy,pandas,papermill,pkg_resources,psychopy,serial,sphinx_bootstrap_theme,systole
multi_line_output = 3
include_trailing_comma = True
force_grid_wrap = 0
use_parentheses = True
ensure_newline_before_comments = True
line_length = 88
24 changes: 24 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
repos:
- repo: https://github.com/pre-commit/mirrors-isort
rev: v5.10.1
hooks:
- id: isort
files: ^cardioception/
- repo: https://github.com/ambv/black
rev: 23.11.0
hooks:
- id: black
language_version: python3
files: ^cardioception/
- repo: https://github.com/pycqa/flake8
rev: 6.1.0
hooks:
- id: flake8
files: ^cardioception/
args: [--extend-ignore=E501]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: 'v1.6.1'
hooks:
- id: mypy
files: ^cardioception/
args: [--ignore-missing-imports, --follow-imports=skip]
Loading

0 comments on commit b112834

Please sign in to comment.