diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml new file mode 100644 index 0000000..0d3bc85 --- /dev/null +++ b/.github/workflows/python-package.yml @@ -0,0 +1,31 @@ +name: Python Package using Conda + +on: [push] + +jobs: + build-and-test: + name: Test on (${{ matrix.os }}) + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: ["ubuntu-latest"] + steps: + - uses: actions/checkout@v2 + - uses: s-weigand/setup-conda@v1 + with: + python-version: 3.8 + - name: Which python + run: | + conda --version + which python + - name: Install dependencies + run: | + pip install https://github.com/SpikeInterface/spikeextractors/archive/master.zip + pip install https://github.com/SpikeInterface/spiketoolkit/archive/master.zip + pip install https://github.com/SpikeInterface/spikecomparison/archive/master.zip + pip install . + pip install pytest + - name: Test with pytest and build coverage report + run: | + pytest diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml new file mode 100644 index 0000000..812c45d --- /dev/null +++ b/.github/workflows/python-publish.yml @@ -0,0 +1,39 @@ +# This workflow will upload a Python Package using Twine when a release is created +# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries + +name: Test and Upload Python Package + +on: + push: + tags: + - '*' + +jobs: + deploy: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - uses: s-weigand/setup-conda@v1 + with: + python-version: 3.6 + - name: Which python + run: | + conda --version + which python + - name: Install dependencies + run: | + pip install . + pip install setuptools wheel twine + pip install pytest + - name: Test with pytest and build coverage report + run: | + pytest + - name: Publish on PyPI + env: + TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} + TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} + run: | + python setup.py sdist bdist_wheel + twine upload dist/* diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 16cf787..0000000 --- a/.travis.yml +++ /dev/null @@ -1,33 +0,0 @@ -jobs: - include: - - name: "Python 3.7.0 on Xenial Linux" - os: linux - language: python - python: - - '3.7' - deploy: - provider: pypi - user: alejoe91 - on: - tags: true - password: - secure: FT32Phc8v9Vz3gV08ixJpYxg3UOvCt11ehOCDGYCNi28CGB0/wRrviN1pntVkrbeEMdvCR/dsoG21+UkO5Eea5xHqwa+WwXvbwW451L4kEhvhS9QXX4sDfXue7p7dYfXV8YSNqf+nYRaEgD1tq2rjHQF2l8Y/GkIjWowO6QhIOdiLMHx/POEqHOkk1nAOTOAsc6jAjd8QR4TQBsRm0SoloNBCj+oqf2IUOVydTCb/8XO48pl7aKyVnxFdIX74QgKoQdhp8Uu5BMsWBsHLNjv9lilY+BtXt8LFIzx1vJpkQ6B1FW/YgCmnxYQ3BPWNcgoFRKEAYRlWZPeCc9nfLz/BIofjMVVZgWX/rnfBFukBm3uDMlpBSGUeX49sNIcr6+Lc+dfILqmqGUFenGDjpirGF0SCgU6yhN6Qdx+j1FFAdr7PWVAt5n02F9RFGdi4/x2m59MzqHTXiomHzyYH7R3nOKB3aV+d0s06LfnWCFhrBrWz9Ocl4ROQkaBrauGuKck0vnTvpOiHyzBJM4YsnWnI7HSI9pUtD83klL7feDwhWH+sLIC10NLjtmbxw1jv2HnRVitz5ZBfnmSz0mmzu5lGzyLq3mRftXC+B/MGYXsoXA6KnSgK1cXEJBE1S3PKtGHPGVe9H/DC0K67ya7rlhI6YZ9jV9zfruiWho/5B/keh0= - - - name: "Python 3.7.0 on Windows" - os: windows - language: shell - before_install: - - choco install python --version 3.7.0 - - python -m pip install --upgrade pip - env: PATH=/c/Python37:/c/Python37/Scripts:$PATH - -install: -- pip install numpy>=1.20 -- pip install pandas>=1.2 -- pip install matplotlib -- pip install https://github.com/SpikeInterface/spikeextractors/archive/master.zip -- pip install https://github.com/SpikeInterface/spiketoolkit/archive/master.zip -- pip install https://github.com/SpikeInterface/spikecomparison/archive/master.zip -- pip install . -- pip install pytest -script: pytest diff --git a/setup.py b/setup.py index 6e425f8..408247c 100644 --- a/setup.py +++ b/setup.py @@ -18,8 +18,9 @@ packages=setuptools.find_packages(), install_requires=[ 'numpy', - 'spiketoolkit>=0.7.3', - 'spikecomparison>=0.3.2', + 'spikeextractors>=0.9.7', + 'spiketoolkit>=0.7.6', + 'spikecomparison>=0.3.3', 'matplotlib', 'MEAutility>=1.4.8' ], diff --git a/spikewidgets/version.py b/spikewidgets/version.py index fcc3d88..174f5f4 100644 --- a/spikewidgets/version.py +++ b/spikewidgets/version.py @@ -1 +1 @@ -version = '0.5.3' +version = '0.5.4' diff --git a/spikewidgets/widgets/correlogramswidget/correlogramswidget.py b/spikewidgets/widgets/correlogramswidget/correlogramswidget.py index 8844c5e..23ddde2 100644 --- a/spikewidgets/widgets/correlogramswidget/correlogramswidget.py +++ b/spikewidgets/widgets/correlogramswidget/correlogramswidget.py @@ -4,7 +4,7 @@ from .correlograms_phy import compute_correlograms -def plot_autocorrelograms(sorting, sampling_frequency=None, unit_ids=None, bin_size=2, window=50, +def plot_autocorrelograms(sorting, sampling_frequency=None, unit_ids=None, bin_size=0.1, window=1, figure=None, ax=None, axes=None): """ Plots spike train auto-correlograms. diff --git a/spikewidgets/widgets/unitwaveformswidget/unitwaveformswidget.py b/spikewidgets/widgets/unitwaveformswidget/unitwaveformswidget.py index d62a837..702b36f 100644 --- a/spikewidgets/widgets/unitwaveformswidget/unitwaveformswidget.py +++ b/spikewidgets/widgets/unitwaveformswidget/unitwaveformswidget.py @@ -6,7 +6,8 @@ def plot_unit_waveforms(recording, sorting, channel_ids=None, unit_ids=None, channel_locs=True, radius=None, - max_channels=None, plot_templates=True, show_all_channels=True, color='k', lw=2, axis_equal=False, + max_channels=None, plot_templates=True, show_all_channels=True, color='k', lw=2, + axis_equal=False, plot_channels=False, set_title=True, figure=None, ax=None, axes=None, **waveforms_kwargs): """ Plots unit waveforms.