Skip to content

Commit 154cfc5

Browse files
authored
[MAINT] Make package pip-installable (#61)
* [MAINT] Make package pip-installable * cleanup + pep * bump version to 0.1.3 * Update README.md * Update conf.py
1 parent 70f1294 commit 154cfc5

File tree

11 files changed

+35
-22
lines changed

11 files changed

+35
-22
lines changed

.github/workflows/pythonpackage.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
run: |
2727
python -m pip install --upgrade pip
2828
pip install -r requirements.txt
29-
pip install -e ".[extra]"
29+
pip install -e ".[tests]"
3030
- name: Lint with flake8
3131
run: |
3232
make pep

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ python:
1212
install:
1313
- sudo apt-get update
1414
- pip install -r requirements.txt
15-
- pip install -e ".[extra]"
15+
- pip install -e ".[docs]"
1616
script:
1717
- mkdir docs
1818
- cd doc

MANIFEST.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
include README.md

README.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
[![twitter](https://img.shields.io/twitter/follow/lebababa?label=Twitter&style=flat&logo=Twitter)](https://twitter.com/intent/follow?screen_name=lebababa)
77

88
# MEEGkit
9+
910
Denoising tools for M/EEG processing in Python 3.7+.
1011

1112
![meegkit-ERP](https://user-images.githubusercontent.com/10333715/176754293-eaa35071-94f8-40dd-a487-9f8103c92571.png)
1213

13-
1414
> **Disclaimer:** The project mostly consists of development code, although some modules and functions are already working. Bugs and performance problems are to be expected, so use at your own risk. More tests and improvements will be added in the future. Comments and suggestions are welcome.
1515
1616
## Documentation
@@ -21,10 +21,10 @@ This code can also be tested directly from your browser using [Binder](https://m
2121

2222
## Installation
2323

24-
This package can be installed easily using `pip+git`:
24+
This package can be installed easily using `pip`:
2525

2626
```bash
27-
pip install git+https://github.com/nbara/python-meegkit.git
27+
pip install meegkit
2828
```
2929

3030
Or you can clone this repository and run the following commands inside the `python-meegkit` directory:
@@ -47,9 +47,11 @@ pip install -e '.[extra]'
4747
or:
4848

4949
```bash
50-
pip install git+https://github.com/nbara/python-meegkit.git#egg=meegkit[extra]
50+
pip install meegkit[extra]
5151
```
5252

53+
Other available options are `[docs]` (which installs dependencies required to build the documentation), or `[tests]` (which install dependencies to run unit tests).
54+
5355
## References
5456

5557
### 1. CCA, STAR, SNS, DSS, ZapLine, and robust detrending

doc/conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323

2424
# -- Project information -----------------------------------------------------
2525

26-
project = f'MEEGkit v{meegkit.__version__}'
27-
copyright = '2021, Nicolas Barascud'
26+
project = 'MEEGkit'
27+
copyright = '2022, Nicolas Barascud'
2828
author = 'Nicolas Barascud'
2929
release = meegkit.__version__
3030
version = meegkit.__version__

meegkit/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"""M/EEG denoising utilities in python."""
2-
__version__ = '0.1.2'
2+
__version__ = '0.1.3'
33

44
from . import asr, cca, detrend, dss, sns, star, ress, trca, tspca, utils
55

meegkit/sns.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88

99
def sns(X, n_neighbors=0, skip=0, weights=np.array([])):
10-
"""Sensor Noise Suppresion.
10+
"""Sensor Noise Suppression.
1111
1212
This algorithm will replace the data from each channel by its regression on
1313
the subspace formed by the other channels. The underlying assumptions are
@@ -62,7 +62,7 @@ def sns(X, n_neighbors=0, skip=0, weights=np.array([])):
6262

6363

6464
def sns0(c, n_neighbors=0, skip=0, wc=np.array([])):
65-
"""Sensor Noise Suppresion from data covariance.
65+
"""Sensor Noise Suppression from data covariance.
6666
6767
Parameters
6868
----------
@@ -130,7 +130,7 @@ def sns0(c, n_neighbors=0, skip=0, wc=np.array([])):
130130

131131

132132
def sns1(X, n_neighbors=None, skip=0):
133-
"""Sensor Noise Suppresion 1.
133+
"""Sensor Noise Suppression 1.
134134
135135
This version of SNS first regresses out major shared components.
136136
"""

meegkit/utils/asr.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,7 @@ def polystab(a):
412412
b = a[ind[0][0]] * np.poly(v)
413413

414414
# Return only real coefficients if input was real:
415-
if not(np.sum(np.imag(a))):
415+
if not np.sum(np.imag(a)):
416416
b = np.real(b)
417417

418418
return b

requirements.txt

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,6 @@ matplotlib
44
scikit-learn
55
pandas
66
joblib
7-
flake8
8-
pytest
9-
pytest-cov
10-
codecov
11-
codespell
12-
pydocstyle
137
tqdm
148
statsmodels
159
pyriemann>=0.2.7

setup.cfg

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,6 @@ 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]
24+
tests = pytest;pytest-cov;codecov;codespell;flake8;pydocstyle;meegkit[extra]
2325

0 commit comments

Comments
 (0)