-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- pyproject.toml to allow pip install - ci: initially using pip on windows only - pytest test that just checks that we can import psychopy - add install instructions to readme - add pre-commit config
- Loading branch information
Showing
8 changed files
with
128 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.2.0 | ||
hooks: | ||
- id: check-yaml | ||
- id: end-of-file-fixer | ||
- id: trailing-whitespace | ||
- id: requirements-txt-fixer | ||
- id: mixed-line-ending | ||
- id: check-toml | ||
|
||
- repo: https://github.com/psf/black | ||
rev: 22.3.0 | ||
hooks: | ||
- id: black | ||
- id: black-jupyter | ||
|
||
- repo: https://github.com/kynan/nbstripout | ||
rev: 0.5.0 | ||
hooks: | ||
- id: nbstripout | ||
|
||
- repo: https://github.com/pre-commit/mirrors-prettier | ||
rev: v2.6.2 | ||
hooks: | ||
- id: prettier | ||
additional_dependencies: | ||
- [email protected] | ||
- "prettier-plugin-toml" | ||
|
||
- repo: https://github.com/python-jsonschema/check-jsonschema | ||
rev: 0.16.0 | ||
hooks: | ||
- id: check-github-workflows | ||
- id: check-readthedocs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,36 @@ | ||
# motor-task-prototype | ||
|
||
Prototype for motor task application | ||
|
||
## Installation | ||
|
||
### Pre-requisites | ||
|
||
The only dependency is [psychopy](https://www.psychopy.org/index.html). | ||
Unfortunately, psychopy itself has a lot of dependencies, some of which are system libraries. | ||
|
||
- on Ubuntu 22.04 with Python 3.10 I needed to do | ||
- `sudo apt-get install swig libasound2-dev portaudio19-dev libpulse-dev libusb-1.0-0-dev libsndfile1-dev libportmidi-dev liblo-dev libgtk-3-dev` | ||
- `pip install wxPython` (which took a long time to complete) | ||
- on windows | ||
- with python 3.8 pip install on CI just worked without any further dependencies | ||
- note: this has not been verified on a clean Windows machine | ||
|
||
### User installation | ||
|
||
To install using pip: | ||
|
||
``` | ||
pip install git+https://github.com/ssciwr/motor-task-prototype | ||
``` | ||
|
||
### Developer install | ||
|
||
To clone the repo, make an editable installation and run the tests: | ||
|
||
``` | ||
git clone https://github.com/ssciwr/motor-task-prototype.git | ||
cd motor-task-prototype | ||
pip install -e .[tests] | ||
pytest | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
[build-system] | ||
requires = ["setuptools>=61.0", "wheel"] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[project] | ||
name = "motor_task_prototype" | ||
description = "Motor task prototype" | ||
readme = "README.md" | ||
license = { text = "MIT" } | ||
authors = [{ name = "Liam Keegan", email = "[email protected]" }] | ||
requires-python = ">=3.6" | ||
classifiers = [ | ||
"Topic :: Scientific/Engineering :: Bio-Informatics", | ||
"License :: OSI Approved :: MIT License", | ||
"Intended Audience :: Science/Research", | ||
"Intended Audience :: Education", | ||
"Natural Language :: English", | ||
"Operating System :: MacOS :: MacOS X", | ||
"Operating System :: Microsoft :: Windows", | ||
"Operating System :: POSIX :: Linux", | ||
"Programming Language :: Python :: 3 :: Only", | ||
"Programming Language :: Python :: 3.6", | ||
"Programming Language :: Python :: 3.7", | ||
"Programming Language :: Python :: 3.8", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.10", | ||
] | ||
dependencies = ["psychopy", "numpy"] | ||
dynamic = ["version"] | ||
|
||
[project.urls] | ||
Github = "https://github.com/ssciwr/motor-task-prototype" | ||
Issues = "https://github.com/ssciwr/motor-task-prototype/issues" | ||
|
||
[project.optional-dependencies] | ||
tests = ["pytest", "pytest-cov"] | ||
docs = ["sphinx>=4.5.0", "sphinx_rtd_theme>=1.0.0"] | ||
|
||
[tool.setuptools.dynamic] | ||
version = { attr = "motor_task_prototype.__version__" } | ||
|
||
[tool.pytest.ini_options] | ||
testpaths = ["tests"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
__version__ = "0.0.1" |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
from psychopy.gui import DlgFromDict | ||
from psychopy.visual import Window | ||
from psychopy.core import Clock, quit, wait | ||
from psychopy.event import Mouse | ||
from psychopy.hardware.keyboard import Keyboard | ||
|
||
|
||
def test_psychopy(): | ||
return |