diff --git a/.github/workflows/pythonpackage.yml b/.github/workflows/pythonpackage.yml index 7499ebab..8e4c8ff0 100644 --- a/.github/workflows/pythonpackage.yml +++ b/.github/workflows/pythonpackage.yml @@ -26,7 +26,7 @@ jobs: run: | python -m pip install --upgrade pip pip install -r requirements.txt - pip install -e ".[extra]" + pip install -e ".[tests]" - name: Lint with flake8 run: | make pep diff --git a/.travis.yml b/.travis.yml index efdbd043..220363e3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,7 +12,7 @@ python: install: - sudo apt-get update - pip install -r requirements.txt - - pip install -e ".[extra]" + - pip install -e ".[docs]" script: - mkdir docs - cd doc diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 00000000..bb3ec5f0 --- /dev/null +++ b/MANIFEST.in @@ -0,0 +1 @@ +include README.md diff --git a/README.md b/README.md index 953d4d60..d47052b2 100644 --- a/README.md +++ b/README.md @@ -6,11 +6,11 @@ [![twitter](https://img.shields.io/twitter/follow/lebababa?label=Twitter&style=flat&logo=Twitter)](https://twitter.com/intent/follow?screen_name=lebababa) # MEEGkit + Denoising tools for M/EEG processing in Python 3.7+. ![meegkit-ERP](https://user-images.githubusercontent.com/10333715/176754293-eaa35071-94f8-40dd-a487-9f8103c92571.png) - > **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. ## Documentation @@ -21,10 +21,10 @@ This code can also be tested directly from your browser using [Binder](https://m ## Installation -This package can be installed easily using `pip+git`: +This package can be installed easily using `pip`: ```bash -pip install git+https://github.com/nbara/python-meegkit.git +pip install meegkit ``` Or you can clone this repository and run the following commands inside the `python-meegkit` directory: @@ -47,9 +47,11 @@ pip install -e '.[extra]' or: ```bash -pip install git+https://github.com/nbara/python-meegkit.git#egg=meegkit[extra] +pip install meegkit[extra] ``` +Other available options are `[docs]` (which installs dependencies required to build the documentation), or `[tests]` (which install dependencies to run unit tests). + ## References ### 1. CCA, STAR, SNS, DSS, ZapLine, and robust detrending diff --git a/doc/conf.py b/doc/conf.py index ada6ab3c..e7d4314c 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -23,8 +23,8 @@ # -- Project information ----------------------------------------------------- -project = f'MEEGkit v{meegkit.__version__}' -copyright = '2021, Nicolas Barascud' +project = 'MEEGkit' +copyright = '2022, Nicolas Barascud' author = 'Nicolas Barascud' release = meegkit.__version__ version = meegkit.__version__ diff --git a/meegkit/__init__.py b/meegkit/__init__.py index e01b7aba..9205cfb4 100644 --- a/meegkit/__init__.py +++ b/meegkit/__init__.py @@ -1,5 +1,5 @@ """M/EEG denoising utilities in python.""" -__version__ = '0.1.2' +__version__ = '0.1.3' from . import asr, cca, detrend, dss, sns, star, ress, trca, tspca, utils diff --git a/meegkit/sns.py b/meegkit/sns.py index cb23b2ee..9ad0fe38 100644 --- a/meegkit/sns.py +++ b/meegkit/sns.py @@ -7,7 +7,7 @@ def sns(X, n_neighbors=0, skip=0, weights=np.array([])): - """Sensor Noise Suppresion. + """Sensor Noise Suppression. This algorithm will replace the data from each channel by its regression on 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([])): def sns0(c, n_neighbors=0, skip=0, wc=np.array([])): - """Sensor Noise Suppresion from data covariance. + """Sensor Noise Suppression from data covariance. Parameters ---------- @@ -130,7 +130,7 @@ def sns0(c, n_neighbors=0, skip=0, wc=np.array([])): def sns1(X, n_neighbors=None, skip=0): - """Sensor Noise Suppresion 1. + """Sensor Noise Suppression 1. This version of SNS first regresses out major shared components. """ diff --git a/meegkit/utils/asr.py b/meegkit/utils/asr.py index 9018e9eb..3a15120d 100755 --- a/meegkit/utils/asr.py +++ b/meegkit/utils/asr.py @@ -412,7 +412,7 @@ def polystab(a): b = a[ind[0][0]] * np.poly(v) # Return only real coefficients if input was real: - if not(np.sum(np.imag(a))): + if not np.sum(np.imag(a)): b = np.real(b) return b diff --git a/requirements.txt b/requirements.txt index 29ca0982..6f4d7416 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,12 +4,6 @@ matplotlib scikit-learn pandas joblib -flake8 -pytest -pytest-cov -codecov -codespell -pydocstyle tqdm statsmodels pyriemann>=0.2.7 diff --git a/setup.cfg b/setup.cfg index 33cb9db7..ea9b3246 100644 --- a/setup.cfg +++ b/setup.cfg @@ -20,4 +20,6 @@ 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] +tests = pytest;pytest-cov;codecov;codespell;flake8;pydocstyle;meegkit[extra] diff --git a/setup.py b/setup.py index 608ce40a..d6e32cbe 100644 --- a/setup.py +++ b/setup.py @@ -2,13 +2,27 @@ # from setuptools import setup, find_packages +with open("README.md", "r", encoding="utf8") as fid: + long_description = fid.read() + setup( name='meegkit', description='M/EEG denoising in Python', + long_description=long_description, + long_description_content_type="text/markdown", url='http://github.com/nbara/python-meegkit/', - author='N Barascud', + author='Nicolas Barascud', author_email='nicolas.barascud@gmail.com', - license='UNLICENSED', - version='0.1.2', + license='BSD (3-clause)', + version='0.1.3', packages=find_packages(exclude=['doc', 'tests']), + project_urls={ + "Documentation": "https://nbara.github.io/python-meegkit/", + "Source": "https://github.com/nbara/python-meegkit/", + "Tracker": "https://github.com/nbara/python-meegkit/issues/", + }, + platforms="any", + python_requires=">=3.7", + install_requires=["numpy", "scipy", "scikit-learn", "joblib", "pandas", + "matplotlib", "tqdm", "pyriemann", "statsmodels"], zip_safe=False)