Skip to content

Commit

Permalink
v1.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
tab-cmd committed Jan 28, 2021
1 parent 6f3aaa8 commit c3c4f16
Show file tree
Hide file tree
Showing 124 changed files with 8,034 additions and 3,309 deletions.
6 changes: 6 additions & 0 deletions .bcipy/experiment/experiments.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"default": {
"fields": [],
"summary": "Default experiment to test various BciPy features without registering a full experiment."
}
}
6 changes: 6 additions & 0 deletions .bcipy/field/fields.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"age": {
"help_text": "Age (in years) of user.",
"type": "int"
}
}
4 changes: 2 additions & 2 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ Link a pivotal ticket here

## Test

- Define steps used to test here. Include unit and integration test steps!
- Define the steps used to test your code here. Include unit and integration test steps!

## Documentaion
## Documentation

- Are documentation updates required? In-line, README, or [documentation](https://github.com/BciPy/bcipy.github.io)? Verify the updates you did here.
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,19 @@ data/
venv/
__pycache__/
.cache/

# BciPy files and directories
calibration.csv
rawdata.csv
buffer.db
lmwrap.log
env.txt
.idea
users.txt
.coverage
htmlcov/
bcipy.egg-info/
build/
dist/
.bcipy/*

bcipy/parameters/parameters_*
34 changes: 34 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,37 @@
# 1.5.0

## Contributions

This version contains major refactoring and tooling improvements across the codebase. In addition, it indtrocudes the concept of BciPy Experiments and Fields. Below we describe the major changes along with a PR# in github where applicable.

### Added
- Language model histogram #91
- BciPy official glossary (Sequence -> Inquiry & Epoch -> Series) #121
- System information to `system_utils` (cpu, platform, etc) #98
- BciPy Experiments and Fields: See PRs #113 #111 and #114 for more information on the additions!
- `.bcipy` system directory to support experiment and fields #100
- support for python 3.7
- `rsvp/query_mechanisms`: to model the way we build inquiries #108
- `Makefile`: contains useful install and development commands
- `convert`: a module for data conversions that will be useful for data sharing. Implemented a conversion function to the EDF format. #104
- `exceptions`: a module for BciPy core exceptions

### Updated
- `acquisition`: refactored the acquisition module to separate the concept of a device (ex. DSI-24 headset) and a connection method to that device (TCP or LSL). #122
- `setup.py`: with new repo location and CAMBI official support email
- `offline_analysis`: to pull parameters from session file #90
- `requirements.txt`: to the latest available #99 #107
- `Parameters` (added help text, removed redundant parameters). Refactored to make them immutable. #101
- `gui_main `: to use PyQt5. We will refactor all GUI code to use this in the future. After this PR, the signal viewer (WxPython) and a couple of loading functions will remain (Tk). #102
- `BCInterface` : updated to use new gui_main methods. Added user if validations. #102 #120
- `params_form`: moved into a parameters modules within GUI and updated to use PyQt5. #109
- `dev_requirements`: used to be called test_requirements. It contains more than that, so we updated the name! #99
- `README`: with relevant updates and contributors

### Removed
- `RSVPKeyboard.py`


# 1.4.2

## Contributions
Expand Down
27 changes: 27 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
install:
pip install -e .

dev-install:
pip install -r dev_requirements.txt
pip install -e .

test-all:
coverage run --branch --source=bcipy -m pytest
flake8 bcipy
coverage report

coverage-html:
coverage run --branch --source=bcipy -m pytest
coverage html

lint:
autopep8 --in-place --aggressive -r bcipy
flake8 bcipy

clean:
find . -name "*.py[co]" -o -name __pycache__ -exec rm -rf {} +
find . -path "*/*.pyo" -delete
find . -path "*/*.pyc" -delete

bci-gui:
python bcipy/gui/BCInterface.py
59 changes: 47 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@

### What is it?

It is Brain-computer interface software written in Python. It can function as a standalone or you can take the tools you need and start coding your own system.
It is Brain-computer interface software written in Python. It can function as a standalone or you can take the tools you need and start coding your own system. See our official BciPy documentation including affliations and more context information here: https://bcipy.github.io/ (in progress).

It should, based on our dependencies, work on most recent operating systems, however it has only been verified on Windows (7 & 10) and Mac OSx (High Sierra & Mojave) at this time. It won't build as is on Linux. Some additional work will be needed to install WxPython and pylsl.
It should, based on our dependencies, work on most recent operating systems, however it has only been verified on Windows (7 & 10 Pro) and Mac OSx (High Sierra & Mojave) at this time. It won't build as is on Linux. Some additional work will be needed to install WxPython and pylsl.

### Contributions Welcome!

Expand Down Expand Up @@ -55,20 +55,29 @@ To use all the goodies locally (including the GUI and demo scripts)
2. Change directory in your terminal to the repo
3. Run `pip install -e .`
4. If using Mac, you will need to install XCode and enable command line tools. `xcode-select --install`
5. If you're on Windows, you may need to uninstall pygame (`pip uninstall pygame`). Psychopy, for historical reasons, keeps pygame but it just spams your console logs if you only want to use pyglet (which we are in this repository!)
5. If you're on Windows, you may need to uninstall pygame (`pip uninstall pygame`). Psychopy, for historical reasons, keeps pygame but it just spams your console logs if you only want to use pyglet (which we use in this repository!)

To just use the built-in functions:
If wanting the latest version from PyPi:
1. `pip install bcipy`

Alternatley, if [Make](http://www.mingw.org/) is installed, you may run the follow command to install:

```sh
# install in development mode
make dev-install
```

## Usage Locally

Start by running `python bcipy/gui/BCInterface.py` in your command prompt or terminal. You may also invoke the experiment directly using command line tools for bci_main.py.

Ex.`python bci_main.py` *this will default parameters, mode, user, and types.*
Ex. `python bci_main.py` *this will use default parameters, user, experiment and task*

You can pass it attributes with flags, if desired.

Ex. `python bci_main.py --user "bci_user" --mode "RSVP"`
Ex. `python bci_main.py --user "bci_user" --task "RSVP Calibration"`

Use the help flag to see other available input options: `python bci_main.py --help`

## Example usage as a package

Expand All @@ -85,7 +94,7 @@ This a list of the major modules and their functionality. Each module will conta
- `acquisition`: acquires data, gives back desired time series, saves to file at end of session.
- `display`: handles display of stimuli on screen and passes back stimuli timing.
- `signal`: eeg signal models, filters, processing, evaluators and viewers.
- `gui`: end-user interface into registered bci tasks and parameter editing. See BCInterface.py and mode/RSVPKeyboard.py.
- `gui`: end-user interface into registered bci tasks and parameter editing. See BCInterface.py.
- `helpers`: helpful functions needed for interactions between modules, basic I/O, and data visualization.
- `language_model`: gives probabilities of next letters during typing.
- `parameters`: location of json parameters.
Expand Down Expand Up @@ -130,7 +139,7 @@ Use this resource for examples: http://docs.python-guide.org/en/latest/writing/s

When writing tests, put them in the correct module, in a tests folder, and prefix the file and test itself with `test` in order for pytest to discover it. See other module tests for examples!

Test requirements must be installed before running: `pip install test_requirements.txt`
Development requirements must be installed before running: `pip install dev_requirements.txt`

To run all tests, in the command line:

Expand All @@ -157,6 +166,12 @@ coverage report
coverage html
```

Alternatley, if Make is installed, you may run the follow command to run coverage/pytest and generate the html:

```sh
make coverage-html
```

## Linting

This project enforces `PEP` style guidelines using [flake8](http://flake8.pycqa.org/en/latest/).
Expand All @@ -173,15 +188,35 @@ autopep8 --in-place --aggressive bcipy/acquisition/processor.py

Finally, run the lint check: `flake8 bcipy`.

Alternatley, if Make is installed, you may run the follow command to run autopep8 and flake8:

```sh
make lint
```

## Glossary
-----------

***Stimuli***: A single letter, tone or image shown (generally in an inquiry). Singular = stimulus, plural = stimuli.

***Trial***: A collection of data after a stimuli is shown. A----

***Inquiry***: The set of stimuli after a fixation cross in a spelling task to gather user intent. A ---- B --- C ----

***Series***: Each series contains at least one inquiry. A letter/icon decision is made after a series in a spelling task.


## Authorship
--------------

- Tab Memmott (OHSU)
- Matthew Lawhead (OHSU)
- Aziz Kocanaogullari (NEU)
- Matthew Lawhead (OHSU- OCTRI)
- Berkan Kadioglu (NEU)
- Shiran Dudy (OHSU)
- Dani Smektala (OHSU)
- Ian Jackson (OHSU/ Reed)
- Ian Jackson (Reed)
- Alister Cedeño (OHSU)
- Berkan Kadioglu (NEU)
- Basak Celik (NEU)
- Andac Demir (NEU)
- Shaobin Xu (NEU)
- Shiran Dudy (OHSU)
Loading

0 comments on commit c3c4f16

Please sign in to comment.