Skip to content

Commit

Permalink
Merge pull request #11 from mh105/main
Browse files Browse the repository at this point in the history
SYS: update version to 0.0.4 and prepare for updating the build on PyPI
  • Loading branch information
TEParsons authored Jul 25, 2024
2 parents a0505a1 + 4248cce commit e9cff0c
Show file tree
Hide file tree
Showing 5 changed files with 58 additions and 94 deletions.
29 changes: 16 additions & 13 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,35 +5,38 @@ on: push
jobs:
build:
name: Build docs
runs-on: macos-11
runs-on: macos-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: "3.10"

- name: Install package and dependencies

- name: Prepare to build pytables for macos
if: runner.os == 'macOS'
run: |
python3 -m pip install --index-url=https://pypi.sr-research.com sr-research-pylink
python3 -m pip install -e .[docs]
brew install hdf5
export HDF5_DIR=$(brew --prefix hdf5)
python3 -m pip install numpy numexpr cython
- name: Install package and dependencies
run: python3 -m pip install -e .[docs]

- name: Build docs
run: |
sphinx-build docs_src docs -b dirhtml
run: sphinx-build docs_src docs -b dirhtml

- name: Bypass Jekyll
run: |
echo "" > docs/.nojekyll
run: echo "" > docs/.nojekyll

- name: Commit
run: |
git add --all
git commit --all -m "sys: Build documentation"
- name: Push
uses: ad-m/github-push-action@master
with:
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/pypi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,26 +17,26 @@ jobs:
- uses: actions/checkout@master

- name: Setup Python
uses: actions/setup-python@v3
uses: actions/setup-python@v5
with:
python-version: '3.10'

- name: Install packages
run: |
python -m pip install build twine
- name: Build
run: |
python -m build
- name: Attach binaries
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
files: |
dist/*
- name: Upload to PyPi
if: startsWith(github.ref, 'refs/tags/')
uses: pypa/gh-action-pypi-publish@release/v1
uses: pypa/gh-action-pypi-publish@release/v1
88 changes: 26 additions & 62 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,78 +6,42 @@ on:
branches: [ main ]

jobs:
mac-tests:
name: Run tests on Mac
runs-on: macos-11
run-tests:
name: Run tests on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: ["macos-latest", "windows-latest", "ubuntu-latest"]

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: "3.10"

- name: Install package and dependencies
run: |
python3 -m pip install --index-url=https://pypi.sr-research.com sr-research-pylink
python3 -m pip install -e .[tests]
- name: Run tests

- name: Prepare to build pytables for macos
if: runner.os == 'macOS'
run: |
pytest
windows-tests:
name: Run tests on Windows
runs-on: windows-latest
brew install hdf5
export HDF5_DIR=$(brew --prefix hdf5)
python3 -m pip install numpy numexpr cython
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Prepare to build wx for ubuntu
if: runner.os == 'Linux'
run: |
python3 -m pip install wheel six distro attrdict3
sudo apt-get update
sudo apt-get install -y -qq python3-dev libgtk-3-dev
sudo apt-get install -y -qq libgstreamer1.0-0 gstreamer1.0-plugins-base
sudo apt-get install -y -qq libwebkit2gtk-4.0-dev
sudo apt-get install -y -qq libpng-dev libjpeg-dev libtiff-dev libnotify-dev libsm-dev
sudo apt-get install -y -qq libsdl2-dev libsdl2-mixer-2.0-0 libsdl2-image-2.0-0 libsdl2-2.
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10"

- name: Install package and dependencies
run: |
python3 -m pip install --index-url=https://pypi.sr-research.com sr-research-pylink
python3 -m pip install -e .[tests]
- name: Run tests
run: |
pytest
linux-tests:
name: Run tests on Linux
runs-on: ubuntu-latest
run: python3 -m pip install -e .[tests]

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10"

- name: Prepare to build wx
run: |
python3 -m pip install wheel six distro attrdict3
sudo apt-get update
sudo apt-get install -y -qq python3-dev libgtk-3-dev
sudo apt-get install -y -qq libgstreamer1.0-0 gstreamer1.0-plugins-base
sudo apt-get install -y -qq libwebkit2gtk-4.0-dev
sudo apt-get install -y -qq libpng-dev libjpeg-dev libtiff-dev libnotify-dev libsm-dev
sudo apt-get install -y -qq libsdl2-dev libsdl2-mixer-2.0-0 libsdl2-image-2.0-0 libsdl2-2.
- name: Install package and dependencies
run: |
python3 -m pip install --index-url=https://pypi.sr-research.com sr-research-pylink
python3 -m pip install -e .[tests]
- name: Run tests
run: |
pytest
- name: Run tests
run: pytest
21 changes: 9 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,23 @@ eyetrackers (via ioHub)

## Supported Devices

Installing this package alongside PsychoPy will enable support for the following
devices:
Installing this package alongside PsychoPy will enable support for the following devices:

* Supported SR Research EyeLink devices

## Installing

First install the SR Research `pylink` Python module with the following shell command:
Install this package with the following shell command:

pip install --index-url=https://pypi.sr-research.com sr-research-pylink
pip install psychopy-eyetracker-sr-research

Then install this package with the following shell command:
You may also use PsychoPy's built-in plugin/package manager to install this package.

pip install psychopy-eyetracker-sr-research
## Alternative
There is a different plug-in package [`psychopy-eyelink`](https://pypi.org/project/psychopy-eyelink/) provided by SR Research that adds more EyeLink-specific Eyetracking components to the PsychoPy Builder view to interact with SR Research EyeLink devices directly (without using ioHub). Note that when [`psychopy-eyelink`] is used, its component implementations are independent of the [`EyeTracking` tab in the `Experiment Setting` window](https://psychopy.org/hardware/eyeTracking.html).

You may also use PsychoPy's builtin plugin/package manager to install this
package.
You may use either `psychopy-eyetracker-sr-research` or `psychopy-eyelink` (but not both) to communicate with a SR Research EyeLink eyetracker.

## Usage

Once the package is installed, PsychoPy will automatically load it when started
and the `psychopy.iohub.devices.eyetracker.hw.sr_research` namespace will
contain the loaded objects.
Once the package is installed, PsychoPy will automatically load it when started and the `psychopy.iohub.devices.eyetracker.hw.sr_research` namespace will contain the loaded objects.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "psychopy-eyetracker-sr-research"
version = "0.0.3"
version = "0.0.4"
description = "Extension package for PsychoPy which adds support for SR Research eyetrackers (via ioHub)."
readme = "README.md"
requires-python = ">= 3.7"
Expand Down

0 comments on commit e9cff0c

Please sign in to comment.