-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
25 changed files
with
4,684 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
name: lint_and_format | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.number }}-${{ github.event.ref }} | ||
cancel-in-progress: true | ||
|
||
on: | ||
push: | ||
branches: | ||
- '*' | ||
pull_request: | ||
branches: | ||
- '*' | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: ["3.10"] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
- name: Lint with isort | ||
run: | | ||
pip install isort | ||
isort $(git ls-files '*.py') --verbose | ||
- name: Format with black | ||
run: | | ||
pip install black | ||
black . --verbose | ||
- name: Lint the code with pylint | ||
run: | | ||
pip install pylint | ||
pylint --rcfile pylintrc $(git ls-files '*.py') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,135 @@ | ||
# Byte-compiled / optimized / DLL files | ||
__pycache__/ | ||
*.py[cod] | ||
*$py.class | ||
|
||
# C extensions | ||
*.so | ||
|
||
# Distribution / packaging | ||
.Python | ||
build/ | ||
develop-eggs/ | ||
dist/ | ||
downloads/ | ||
eggs/ | ||
.eggs/ | ||
lib/ | ||
lib64/ | ||
parts/ | ||
sdist/ | ||
var/ | ||
wheels/ | ||
pip-wheel-metadata/ | ||
share/python-wheels/ | ||
*.egg-info/ | ||
.installed.cfg | ||
*.egg | ||
MANIFEST | ||
|
||
# PyInstaller | ||
# Usually these files are written by a python script from a template | ||
# before PyInstaller builds the exe, so as to inject date/other infos into it. | ||
*.manifest | ||
*.spec | ||
|
||
# Installer logs | ||
pip-log.txt | ||
pip-delete-this-directory.txt | ||
|
||
# Unit test / coverage reports | ||
htmlcov/ | ||
.tox/ | ||
.nox/ | ||
.coverage | ||
.coverage.* | ||
.cache | ||
nosetests.xml | ||
coverage.xml | ||
*.cover | ||
*.py,cover | ||
.hypothesis/ | ||
.pytest_cache/ | ||
|
||
# Translations | ||
*.mo | ||
*.pot | ||
|
||
# Django stuff: | ||
*.log | ||
local_settings.py | ||
db.sqlite3 | ||
db.sqlite3-journal | ||
|
||
# Flask stuff: | ||
instance/ | ||
.webassets-cache | ||
|
||
# Scrapy stuff: | ||
.scrapy | ||
|
||
# Sphinx documentation | ||
docs/_build/ | ||
|
||
# PyBuilder | ||
target/ | ||
|
||
# Jupyter Notebook | ||
.ipynb_checkpoints | ||
|
||
# IPython | ||
profile_default/ | ||
ipython_config.py | ||
|
||
# pyenv | ||
.python-version | ||
|
||
# pipenv | ||
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. | ||
# However, in case of collaboration, if having platform-specific dependencies or dependencies | ||
# having no cross-platform support, pipenv may install dependencies that don't work, or not | ||
# install all needed dependencies. | ||
#Pipfile.lock | ||
|
||
# PEP 582; used by e.g. github.com/David-OConnor/pyflow | ||
__pypackages__/ | ||
|
||
# Celery stuff | ||
celerybeat-schedule | ||
celerybeat.pid | ||
|
||
# SageMath parsed files | ||
*.sage.py | ||
|
||
# Environments | ||
.env | ||
.venv | ||
env/ | ||
venv/ | ||
ENV/ | ||
env.bak/ | ||
venv.bak/ | ||
|
||
# Visual Studio Code | ||
.vscode | ||
|
||
# PyCharm | ||
.idea | ||
|
||
# Spyder project settings | ||
.spyderproject | ||
.spyproject | ||
|
||
# Rope project settings | ||
.ropeproject | ||
|
||
# mkdocs documentation | ||
/site | ||
|
||
# mypy | ||
.mypy_cache/ | ||
.dmypy.json | ||
dmypy.json | ||
|
||
# Pyre type checker | ||
.pyre/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) [2021-2022] [authors of PTE Decode] | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
[![Homepage][homepage-shield]][homepage-url] | ||
[![License][license-shield]][license-url] | ||
[![Contributors][contributors-shield]][contributors-url] | ||
[![Code Style][codestyle-shield]][codestyle-url] | ||
|
||
|
||
# PTE Decode - Python tools for electrophysiology | ||
|
||
PTE Decode is an open-source software package for neural decoding. | ||
|
||
It builds upon [PTE](https://github.com/richardkoehler/pte) and aims at decoding intracranial EEG (iEEG) signals such as local field potentials (LFP) electrocorticography (ECoG). | ||
|
||
PTE Decode implements sample-wise decoding and lets you define epochs based on specific events to avoid circular training. | ||
|
||
## Installing PTE Decode | ||
|
||
First, get the current development version of PTE using [git](https://git-scm.com/). Then type the following command into a terminal: | ||
|
||
```bash | ||
git clone https://github.com/richardkoehler/pte-decode | ||
``` | ||
|
||
Use the package manager [conda](https://docs.conda.io/projects/conda/en/latest/index.html) to set up a new working environment. To do so, use ``cd`` in your terminal to navigate to the PTE root directory and type: | ||
|
||
```bash | ||
conda env create -f env.yml | ||
``` | ||
|
||
This will set up a new conda environment called ``pte-decode``. | ||
|
||
To activate the environment then type: | ||
|
||
```bash | ||
conda activate pte-decode | ||
``` | ||
|
||
Finally, to install PTE Decode in an editable development version inside your conda environment type the following inside the PTE Decode root directory: | ||
|
||
```bash | ||
conda develop . | ||
``` | ||
|
||
## Usage | ||
|
||
```python | ||
import pte_decode | ||
|
||
# Examples | ||
``` | ||
|
||
## Contributing | ||
Please feel free to contribute. | ||
|
||
For any minor additions or bugfixes, you may simply create a **pull request**. | ||
|
||
For any major changes, make sure to open an **issue** first. 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. | ||
|
||
To contribute, consider installing the full conda development environment to include such tools as black, pylint and isort: | ||
|
||
```bash | ||
conda env create -f env_dev.yml | ||
conda activate pte-decode-dev | ||
``` | ||
|
||
Continuous Integration (CI) including automated testing are set up. | ||
|
||
## License | ||
PTE is licensed under the [MIT license](license-url). | ||
|
||
<!-- MARKDOWN LINKS & IMAGES --> | ||
<!-- https://www.markdownguide.org/basic-syntax/#reference-style-links --> | ||
[homepage-shield]: https://img.shields.io/static/v1?label=Homepage&message=ICN&logoColor=black&labelColor=grey&logoWidth=20&color=9cf&style=for-the-badge | ||
[homepage-url]: https://www.icneuromodulation.org/ | ||
[contributors-shield]: https://img.shields.io/github/contributors/richardkoehler/pte.svg?style=for-the-badge | ||
[contributors-url]: https://github.com/richardkoehler/pte/graphs/contributors | ||
[license-shield]: https://img.shields.io/static/v1?label=License&message=MIT&logoColor=black&labelColor=grey&logoWidth=20&color=yellow&style=for-the-badge | ||
[license-url]: https://github.com/richardkoehler/pte/blob/main/LICENSE/ | ||
[codestyle-shield]: https://img.shields.io/static/v1?label=CodeStyle&message=black&logoColor=black&labelColor=grey&logoWidth=20&color=black&style=for-the-badge | ||
[codestyle-url]: https://github.com/psf/black |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: pte-decode | ||
channels: | ||
- conda-forge | ||
- defaults | ||
dependencies: | ||
# basic dependencies | ||
- bayesian-optimization | ||
- catboost | ||
- imbalanced-learn | ||
- matplotlib | ||
- mne-bids | ||
- numba | ||
- numpy | ||
- pandas | ||
- pip | ||
- python >= 3.9 | ||
- scikit-learn | ||
- scipy | ||
- seaborn | ||
- xgboost | ||
- pip: | ||
- pte-stats | ||
- statannotations |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: pte-decode-dev | ||
channels: | ||
- conda-forge | ||
- defaults | ||
dependencies: | ||
# basic dependencies | ||
- bayesian-optimization | ||
- catboost | ||
- imbalanced-learn | ||
- matplotlib | ||
- mne-bids | ||
- numba | ||
- numpy | ||
- pandas | ||
- pip | ||
- python >= 3.9 | ||
- scikit-learn | ||
- scipy | ||
- seaborn | ||
- xgboost | ||
- pip: | ||
- pte-stats | ||
- statannotations | ||
# development dependencies | ||
- black | ||
- isort | ||
- pylint | ||
- pytest |
Oops, something went wrong.