Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: labstreaminglayer/pylsl
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.16.2
Choose a base ref
...
head repository: labstreaminglayer/pylsl
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v1.17.4
Choose a head ref

Commits on Nov 15, 2023

  1. add metadata setter/getter

    Mathieu Scheltienne committed Nov 15, 2023
    Copy the full SHA
    9ef5eec View commit details
  2. run isort and black

    Mathieu Scheltienne committed Nov 15, 2023
    Copy the full SHA
    04578e0 View commit details
  3. fix spelling (codespell)

    Mathieu Scheltienne committed Nov 15, 2023
    Copy the full SHA
    ee07ada View commit details
  4. better

    Mathieu Scheltienne committed Nov 15, 2023
    Copy the full SHA
    f30fbb7 View commit details

Commits on May 7, 2024

  1. Merge pull request #75 from mscheltienne/dev

    Add getter and setter for channel label/type/units to a StreamInfo
    cboulay authored May 7, 2024
    Copy the full SHA
    78122e9 View commit details

Commits on Jul 3, 2024

  1. fixed startup for PySide6 and PyQt5 and PyQt6

    Landgraf committed Jul 3, 2024
    Copy the full SHA
    6f16372 View commit details
  2. Merge pull request #83 from frankl-uni/master

    fixed startup for PySide6 and PyQt5 and PyQt6
    cboulay authored Jul 3, 2024
    Copy the full SHA
    b62de2e View commit details

Commits on Dec 7, 2024

  1. Major refactor:

    * Use uv for build
    * Separate into submodules
    * Add first test
    cboulay committed Dec 7, 2024
    Copy the full SHA
    a16d763 View commit details
  2. ruff fixes

    cboulay committed Dec 7, 2024
    Copy the full SHA
    0ae95f0 View commit details
  3. ruff format

    cboulay committed Dec 7, 2024
    Copy the full SHA
    49fed01 View commit details
  4. GHA ci syntax fix

    cboulay committed Dec 7, 2024
    Copy the full SHA
    cf55686 View commit details

Commits on Dec 10, 2024

  1. Merge pull request #92 from labstreaminglayer/91-use-uv-for-project-m…

    …anagement
    
    Major refactor:
    cboulay authored Dec 10, 2024
    Copy the full SHA
    ea1dac2 View commit details
  2. Copy the full SHA
    a0d37a6 View commit details
  3. Copy the full SHA
    394d09d View commit details
  4. Copy the full SHA
    e41bf95 View commit details
  5. Add commented-out (for now) block in StreamOutlet to rewrite source_i…

    …d to include hash of hostname.
    cboulay committed Dec 10, 2024
    Copy the full SHA
    73a2e69 View commit details
  6. Copy the full SHA
    74815d0 View commit details
  7. ruff

    cboulay committed Dec 10, 2024
    Copy the full SHA
    8bd1bc8 View commit details
  8. Fix annotation for py 3.9

    cboulay committed Dec 10, 2024
    Copy the full SHA
    6d275e8 View commit details
  9. Copy the full SHA
    6478d33 View commit details
  10. Copy the full SHA
    1aba653 View commit details

Commits on Dec 12, 2024

  1. Merge pull request #94 from labstreaminglayer/93-source_id-should-def…

    …ault-to-having-a-non-empty-value
    
    source_id defaults to a non empty value
    cboulay authored Dec 12, 2024
    Copy the full SHA
    0c0ca0f View commit details
  2. Copy the full SHA
    ac09994 View commit details
  3. Fix publish win zip dir

    cboulay committed Dec 12, 2024
    Copy the full SHA
    dc03d7d View commit details
  4. Copy the full SHA
    feb7165 View commit details
  5. Ignore more build artifacts

    cboulay committed Dec 12, 2024
    Copy the full SHA
    4516330 View commit details
  6. Copy the full SHA
    d815f20 View commit details
  7. Copy the full SHA
    60d2f6c View commit details
  8. Update publish-to-pypi.yml

    cboulay authored Dec 12, 2024
    Copy the full SHA
    6660e92 View commit details
  9. Update publish-to-pypi.yml

    cboulay authored Dec 12, 2024
    Copy the full SHA
    1ec12ca View commit details
59 changes: 59 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Continuous Integration

on:
push:
branches: [main]
pull_request:
branches:
- main
workflow_dispatch:

env:
LSL_RELEASE_URL: "https://github.com/sccn/liblsl/releases/download/v1.16.2"
LSL_RELEASE: "1.16.2"

jobs:

style:
name: Check style
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: astral-sh/ruff-action@v1
- uses: astral-sh/ruff-action@v1
with:
args: "format --check"

test:
needs: style
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]
os: ["ubuntu-latest", "windows-latest", "macOS-latest"]

name: Run tests (${{ matrix.os }} Python ${{ matrix.python-version }})
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Download liblsl (Windows)
if: matrix.os == 'windows-latest'
run: |
curl -L https://github.com/sccn/liblsl/releases/download/v1.16.2/liblsl-1.16.2-Win_amd64.zip -o liblsl.zip
unzip -oj liblsl.zip bin/lsl* -d src/pylsl/lib/
- name: Install liblsl (MacOS)
if: matrix.os == 'macos-latest'
run: brew install labstreaminglayer/tap/lsl
- name: Install liblsl (Ubuntu)
if: startsWith(matrix.os, 'ubuntu-')
run: |
sudo apt install -y libpugixml-dev
curl -L ${LSL_RELEASE_URL}/liblsl-${LSL_RELEASE}-$(lsb_release -sc)_amd64.deb -o liblsl.deb
sudo apt install ./liblsl.deb
- name: Install uv
uses: astral-sh/setup-uv@v4
with:
python-version: ${{ matrix.python-version }}
- name: Build
run: uv sync --all-extras
- name: Run tests
run: uv run pytest
63 changes: 28 additions & 35 deletions .github/workflows/publish-to-pypi.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
name: Build and publish Python 🐍 distributions 📦 to PyPI and TestPyPI
name: Build and publish Python 🐍 distributions 📦 to PyPI

on:
release:
types: [published]
workflow_dispatch:

env:
LSL_RELEASE_URL: 'https://github.com/sccn/liblsl/releases/download/v1.16.2/'
LSL_RELEASE: '1.16.2'
LSL_RELEASE_URL: "https://github.com/sccn/liblsl/releases/download/"
LSL_RELEASE: "1.16.2"

defaults:
run:
@@ -16,11 +17,13 @@ jobs:
deploy:
name: ${{ matrix.config.name }}
runs-on: ${{ matrix.config.os }}
permissions:
id-token: write
strategy:
fail-fast: false
matrix:
config:
- name: "ubuntu-22.04"
- name: "ubuntu-24.04"
os: "ubuntu-latest"
pyarch: "x64"
- name: "windows-x64"
@@ -32,44 +35,34 @@ jobs:
arch: "i386"
pyarch: "x86"
steps:
- uses: actions/checkout@master
- uses: actions/checkout@v4
- name: Download liblsl (Windows)
if: matrix.config.os == 'windows-latest'
run: |
curl -L ${LSL_RELEASE_URL}/liblsl-${LSL_RELEASE}-Win_${{ matrix.config.arch}}.zip -o liblsl.zip
unzip -oj liblsl.zip bin/lsl* -d pylsl/lib
curl -L ${LSL_RELEASE_URL}/v${LSL_RELEASE}/liblsl-${LSL_RELEASE}-Win_${{ matrix.config.arch}}.zip -o liblsl.zip
unzip -oj liblsl.zip bin/lsl* -d src/pylsl/lib
- name: Set up Python 3.x
uses: actions/setup-python@v4
with:
python-version: "3.x"
architecture: ${{ matrix.config.pyarch }}
- name: Install pypa/build
- name: Install uv
uses: astral-sh/setup-uv@v4
- name: Build Package
run: uv build
- name: (Windows x64) Retarget wheel
if: matrix.config.name == 'windows-x64'
run: |
python -m pip install --upgrade pip
pip install build twine
- name: Build package
rm dist/*.tar.gz
uv run python -m ensurepip
uv run python -m pip install wheel
for f in dist/pylsl*.whl; do uv run wheel tags --platform-tag win_amd64 "$f" && rm "$f"; done
- name: (Windows 32) Retarget wheel
if: matrix.config.name == 'windows-x86'
run: |
python -m build --wheel --outdir dist/
- name: Publish using Twine (Windows)
if: matrix.config.os == 'windows-latest'
run: |
python -m twine upload dist/*
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}

# This fails because I don't have access to `pylsl` project there.
# - name: Publish distribution 📦 to Test PyPI
# if: (github.event.release.prerelease && (matrix.config.os != 'windows-latest'))
# uses: pypa/gh-action-pypi-publish@unstable/v1
# with:
# password: ${{ secrets.TEST_PYPI_API_TOKEN }}
# repository_url: https://test.pypi.org/legacy/
# skip_existing: true
#
- name: Publish distribution 📦 to PyPI
if: ((matrix.config.os != 'windows-latest') && !github.event.release.prerelease)
uses: pypa/gh-action-pypi-publish@unstable/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}
rm dist/*.tar.gz
uv run python -m ensurepip
uv run python -m pip install wheel
for f in dist/pylsl*.whl; do uv run wheel tags --platform-tag win32 "$f" && rm "$f"; done
- name: Publish package distributions to PyPI
run: uv publish
12 changes: 8 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/dist/
/.idea/
/pylsl.egg-info/
/src/pylsl.egg-info/
/build/
__pycache__
*.so
@@ -11,7 +11,11 @@ __pycache__
*.cprof
*.png
/wheelhouse/
/pylsl/include
/pylsl/lib
/pylsl/share
/src/pylsl/include
/src/pylsl/share
.DS_Store

uv.lock
/src/pylsl/__version__.py
/src/pylsl/lib/lslver.exe
liblsl.zip
4 changes: 2 additions & 2 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -3,5 +3,5 @@ include LICENSE

# If using Python 2.6 or less, then have to include package data, even though
# it's already declared in setup.py
include pylsl/lib/liblsl*.*
include pylsl/lib/lsl*.*
include src/pylsl/lib/liblsl*.*
include src/pylsl/lib/lsl*.*
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -25,7 +25,7 @@ On all non-Windows platforms and for some Windows-Python combinations, you must

This should only be necessary if you need to modify or debug pylsl.

* Download the pylsl source: `git clone https://github.com/labstreaminglayer/pylsl.git && cd pylsl`
* Download the pylsl source: `git clone https://github.com/labstreaminglayer/pylsl.git && cd pylsl`
* From the `pylsl` working directory, run `pip install .`.
* Note: You can use `pip install -e .` to install while keeping the files in-place. This is convenient for developing pylsl.

@@ -41,7 +41,7 @@ You can get a list of the examples with `python -c "import pylsl.examples; help(

If the shared object is not installed onto a standard search path (or it is but can't be found for some [other bug](https://github.com/labstreaminglayer/pylsl/issues/48)), then we recommend that you copy it to the pylsl installed module path's `lib` subfolder. i.e. `{path/to/env/}site-packages/pylsl/lib`.

* The `site-packages/pylsl` path will only exist _after_ you install `pylsl` in your Pyton environment.
* The `site-packages/pylsl` path will only exist _after_ you install `pylsl` in your Python environment.
* You may have to create the `lib` subfolder.
* Use `python -m site` to find the "site-packages" path.
* Use `cp -L` on platforms that use symlinks.
@@ -79,7 +79,7 @@ We recently stopped building binary wheels for Linux. In practice, the `manylinu
# Known Issues with Multithreading on Linux

* At least for some versions of pylsl, it has been reported that running on Linux one cannot call ``pylsl`` functions from a thread that is not the main thread. This has been reported to cause access violations, and can occur during pulling from an inlet, and also from accessing an inlets info structure in a thread.
* Recent tests with mulithreading (especially when safeguarding library calls with locks) using Python 3.7.6. with pylsl 1.14 on Linux Mint 20 suggest that this issue is solved, or at least depends on your machine. See https://github.com/labstreaminglayer/pylsl/issues/29
* Recent tests with multithreading (especially when safeguarding library calls with locks) using Python 3.7.6. with pylsl 1.14 on Linux Mint 20 suggest that this issue is solved, or at least depends on your machine. See https://github.com/labstreaminglayer/pylsl/issues/29

# Acknowledgments

13 changes: 0 additions & 13 deletions pylsl/__init__.py

This file was deleted.

Loading