Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
41e2e5f
add pyproject.toml to ensure pip builds have Cython and numpy
dmeliza Dec 28, 2020
de591d9
Merge branch 'mariomulansky:master' into master
dmeliza Feb 23, 2023
889b1c7
add setuptools req to setup.py
dmeliza Mar 10, 2023
5a3edeb
remove some cruft from setup.py not needed with PEP518 build system
dmeliza Jul 27, 2023
cbfb6f7
Merge remote-tracking branch 'upstream'
dmeliza Sep 23, 2025
81ff7c3
remove some setup.py stuff that was causing PEP518 builds to fail
dmeliza Sep 23, 2025
0019476
use importlib instead of deprecated pkg_resources
dmeliza Sep 23, 2025
14dabc3
migrate to pyproject.toml; give the fork another name since upstream …
dmeliza Nov 23, 2025
48259a4
redo the test workflow to use uv
dmeliza Nov 23, 2025
2b2ca3e
try installing system dependencies for pypy tests
dmeliza Nov 23, 2025
141913a
try skipping the scipy-dependent tests
dmeliza Nov 23, 2025
6547a12
another try to skip scipy dependency on pypy
dmeliza Nov 23, 2025
c68823c
ruff format to clear up an encoding warning [ci skip]
dmeliza Nov 23, 2025
4fe7346
ruff check
dmeliza Nov 23, 2025
427138f
add build wheel workflow
Nov 23, 2025
47a85e6
some small fixes to workflows, bump version
dmeliza Nov 23, 2025
40de4ca
try fixing error in cibuild env
dmeliza Nov 23, 2025
4fd50a5
remove unsupported py39 wheel
dmeliza Nov 23, 2025
591f447
fix an error in the readme
dmeliza Nov 23, 2025
dde12e2
try to fix workflow not being triggered by tag
dmeliza Nov 23, 2025
a0ebc5e
fix readme link [ci skip]
dmeliza May 1, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Set update schedule for GitHub Actions

version: 2
updates:

- package-ecosystem: "github-actions"
directory: "/"
schedule:
# Check for updates to GitHub Actions every week
interval: "weekly"
163 changes: 163 additions & 0 deletions .github/workflows/build_wheels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,163 @@
name: Build wheels and publish to pypi

on:
push:
branches:
- master
tags:
- '*'

jobs:
build_wheels:
name: ${{ matrix.os }} • ${{ matrix.python }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-15-intel, macos-latest]
python: [cp310, cp311, cp312, cp313, cp314, pp311]
exclude:
# Skip PyPy on Windows
- os: windows-latest
python: pp311
steps:
- uses: actions/checkout@v5
- name: Set version suffix for TestPyPI
id: set_version
run: |
if [[ ! "${{ github.ref }}" =~ ^refs/tags/ ]]; then
BUILD_NUM=${{ github.run_number }}
VERSION=$(grep '^version = ' pyproject.toml | sed -E 's/version = "(.*)"/\1/')
sed -i -e "s/^version = \"${VERSION}\"/version = \"${VERSION}.dev${BUILD_NUM}\"/" pyproject.toml
fi
shell: bash
- name: Build wheels
uses: pypa/cibuildwheel@v3.2
env:
CIBW_BUILD: ${{ matrix.python }}-*
CIBW_ARCHS_MACOS: auto
with:
package-dir: .
output-dir: wheelhouse
config-file: "{package}/pyproject.toml"
- name: Verify clean directory
if: startsWith(github.ref, 'refs/tags/')
run: git diff --exit-code
shell: bash
- uses: actions/upload-artifact@v5
with:
name: artifact-${{ matrix.os }}-${{ matrix.python }}
path: ./wheelhouse/*.whl

build_sdist:
name: Build source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Set version suffix for TestPyPI
id: set_version
run: |
if [[ ! "${{ github.ref }}" =~ ^refs/tags/ ]]; then
BUILD_NUM=${{ github.run_number }}
VERSION=$(grep '^version = ' pyproject.toml | sed -E 's/version = "(.*)"/\1/')
sed -i -e "s/^version = \"${VERSION}\"/version = \"${VERSION}.dev${BUILD_NUM}\"/" pyproject.toml
fi
- name: Build sdist
run: pipx run build --sdist

- uses: actions/upload-artifact@v5
with:
name: artifact-source
path: dist/*.tar.gz

merge_artifacts:
name: Merge artifacts
needs: [build_wheels, build_sdist]
runs-on: ubuntu-latest
steps:
- name: Merge artifacts
uses: actions/upload-artifact/merge@v5
with:
name: all-files
pattern: artifact-*

publish-to-pypi:
name: >-
Publish Python distribution to PyPI
if: startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes
needs: [merge_artifacts]
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/melizalab-pyspike
permissions:
id-token: write # IMPORTANT: mandatory for trusted publishing
steps:
- name: Download all the dists
uses: actions/download-artifact@v6
with:
name: all-files
path: dist/
- name: Publish distribution to PyPI
uses: pypa/gh-action-pypi-publish@release/v1

github-release:
name: >-
Sign the Python distribution with Sigstore
and to GitHub Release
needs: [publish-to-pypi]
runs-on: ubuntu-latest
permissions:
contents: write # IMPORTANT: mandatory for making GitHub Releases
id-token: write # IMPORTANT: mandatory for sigstore
steps:
- name: Download all the dists
uses: actions/download-artifact@v6
with:
name: all-files
path: dist/
- name: Sign the dists with Sigstore
uses: sigstore/gh-action-sigstore-python@v3.1.0
with:
inputs: >-
./dist/*.tar.gz
./dist/*.whl
- name: Create GitHub Release
env:
GITHUB_TOKEN: ${{ github.token }}
run: >-
gh release create
'${{ github.ref_name }}'
--repo '${{ github.repository }}'
--notes ""
- name: Upload artifact signatures to GitHub Release
env:
GITHUB_TOKEN: ${{ github.token }}
# Upload to GitHub Release using the `gh` CLI.
# `dist/` contains the built packages, and the
# sigstore-produced signatures and certificates.
run: >-
gh release upload
'${{ github.ref_name }}' dist/**
--repo '${{ github.repository }}'

publish-to-testpypi:
name: Publish Python distribution to TestPyPI
needs: [merge_artifacts]
runs-on: ubuntu-latest
environment:
name: testpypi
url: https://test.pypi.org/p/melizalab-pyspike
permissions:
id-token: write # IMPORTANT: mandatory for trusted publishing
steps:
- name: Download all the dists
uses: actions/download-artifact@v6
with:
name: all-files
path: dist/
- name: Publish distribution 📦 to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/
verbose: true
51 changes: 0 additions & 51 deletions .github/workflows/python-package.yml

This file was deleted.

28 changes: 28 additions & 0 deletions .github/workflows/python_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: Python tests

on: [push, pull_request]

jobs:
build:
strategy:
fail-fast: false
matrix:
os: [macos-15-intel, macos-latest, ubuntu-latest, windows-latest]
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14", "pypy3.10", "pypy3.11"]
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v5
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
enable-cache: true
version: "latest"
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: uv sync --frozen
- name: Run tests on python ${{ matrix.python-version }}
run: uv run pytest
65 changes: 7 additions & 58 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,59 +1,8 @@
HELP.md
.gradle
build/
!gradle/wrapper/gradle-wrapper.jar
!**/src/main/**/build/
!**/src/test/**/build/

### STS ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache
bin/
!**/src/main/**/bin/
!**/src/test/**/bin/

### IntelliJ IDEA ###
.idea
*.iws
*.iml
*.ipr
out/
!**/src/main/**/out/
!**/src/test/**/out/

### NetBeans ###
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/

### VS Code ###
.vscode/

# Emacs backups
*~
.#*
\#*

# Log files
*.log

# MacOS does this
.DS_Store
~*

# Jacoco generated
*.exec

# KDiff3 backup files
*.orig

# C files are always generated by Cython
*.c
*.C
*.so
.DS_Store
.coverage
__pycache__/
build/
dist/
melizalab_pyspike.egg-info/
3 changes: 1 addition & 2 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
include *.rst
include *.txt
include pyspike/cython/*.c
include directionality/cython/*.c
recursive-include pyspike *.pyx *.pxd
recursive-include examples *.py *.txt
recursive-include test *.py *.txt
recursive-include doc *
22 changes: 17 additions & 5 deletions Readme.rst
Original file line number Diff line number Diff line change
@@ -1,10 +1,22 @@
PySpike
=======

.. image:: https://badge.fury.io/py/pyspike.png
:target: http://badge.fury.io/py/pyspike
.. image:: https://travis-ci.org/mariomulansky/PySpike.svg?branch=master
:target: https://travis-ci.org/mariomulansky/PySpike
|ProjectStatus|_ |Version|_ |BuildStatus|_ |License|_ |PythonVersions|_

.. |ProjectStatus| image:: https://www.repostatus.org/badges/latest/active.svg
.. _ProjectStatus: https://www.repostatus.org/#active

.. |Version| image:: https://img.shields.io/pypi/v/melizalab-pyspike.svg
.. _Version: https://pypi.python.org/pypi/melizalab-pyspike/

.. |BuildStatus| image:: https://github.com/melizalab/PySpike/actions/workflows/python_tests.yml/badge.svg
.. _BuildStatus: https://github.com/melizalab/PySpike/actions/workflows/python_tests.yml

.. |License| image:: https://img.shields.io/pypi/l/melizalab-pyspike.svg
.. _License: https://opensource.org/license/bsd-3-clause/

.. |PythonVersions| image:: https://img.shields.io/pypi/pyversions/melizalab-pyspike.svg
.. _PythonVersions: https://pypi.python.org/pypi/melizalab-pyspike/

PySpike is a Python library for the numerical analysis of spike train similarity.
Its core functionality is the implementation of the ISI_\-distance [#]_ and SPIKE_\-distance [#]_, SPIKE-Synchronization_ [#]_, as well as their adaptive generalizations [#]_.
Expand All @@ -13,7 +25,7 @@ All computation intensive parts are implemented in C via cython_ to reach a comp

PySpike provides the same fundamental functionality as the SPIKY_ framework for Matlab, which additionally contains spike-train generators, more spike train distance measures and many visualization routines.

All source codes are available on `Github <https://github.com/mariomulansky/PySpike>`_ and are published under the BSD_License_.
All source codes are available on `Github <https://github.com/mariomulansky/PySpike>`_ and are published under the BSD_License_. `This fork <https://github.com/melizalab/PySpike>`_ is maintained by the Meliza Lab for PEP518-compatible builds and CI-generated `wheels <https://pypi.org/project/melizalab-pyspike/>`_.

Citing PySpike
----------------------------
Expand Down
5 changes: 0 additions & 5 deletions SetupNoPrompt.py

This file was deleted.

Loading