Skip to content

Commit

Permalink
Address PR issues
Browse files Browse the repository at this point in the history
  • Loading branch information
tab-cmd committed Dec 10, 2024
1 parent 5a7c8a4 commit 51e028d
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 86 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@


[![BciPy](https://github.com/CAMBI-tech/BciPy/actions/workflows/main.yml/badge.svg)](https://github.com/CAMBI-tech/BciPy/actions/workflows/main.yml)
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/96e31da4b0554dae9db7a1356556b0d5)](https://app.codacy.com/gh/CAMBI-tech/BciPy/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade)
[![contributions welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg)](https://github.com/CAMBI-tech/BciPy/fork)
[![Follow on Twitter](https://img.shields.io/twitter/follow/cambi_tech?label=Follow&style=social)](https://twitter.com/cambi_tech)

Expand All @@ -18,7 +19,7 @@ Memmott, T., Koçanaoğulları, A., Lawhead, M., Klee, D., Dudy, S., Fried-Oken,

## Dependencies
---------------
This project requires Python 3.8, 3.9 or 3.10. Please see notes below for additional OS specific dependencies before installation can be completed and reference our documentation/FAQs for more information: https://bcipy.github.io/hardware-os-config/
This project requires Python 3.8, 3.9 or 3.10. Please see notes below for additional OS specific dependencies before installation. See our documentation/FAQs for more information [here](https://bcipy.github.io/hardware-os-config/).

### Linux

Expand Down Expand Up @@ -46,8 +47,8 @@ In order to run BciPy on your computer, after following the dependencies above,
To install for use locally and use of the GUI:
1. Git clone https://github.com/BciPy/BciPy.git
2. Change directory in your terminal to the repo directory.
4. [Optional] Install the kenlm language model package. `pip install kenlm==0.1 --global-option="--max_order=12"`.
5. Install BciPy in development mode. `pip install -e .`
3. [Optional] Install the kenlm language model package. `pip install kenlm==0.1 --global-option="--max_order=12"`.
4. Install BciPy in development mode. `pip install -e .`


If wanting the latest version from PyPi and to build using modules:
Expand Down
24 changes: 3 additions & 21 deletions bcipy/core/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import json
import os
import sqlite3
import subprocess
from dataclasses import dataclass, fields
from typing import Any, Dict, List, Optional

Expand All @@ -17,12 +16,10 @@
BLACK = COLOR_INDEX[0]
WHITE = COLOR_INDEX[1]
YELLOW = COLOR_INDEX[5]
from bcipy.config import (BCIPY_ROOT, DEFAULT_ENCODING,
DEFAULT_PARAMETERS_FILENAME, EXPERIMENT_DATA_FILENAME,
from bcipy.config import (DEFAULT_ENCODING,
DEFAULT_PARAMETERS_FILENAME,
SESSION_DATA_FILENAME, SESSION_SUMMARY_FILENAME)
from bcipy.io.load import (load_experiment_fields, load_experiments,
load_json_parameters)
from bcipy.helpers.validate import validate_field_data_written
from bcipy.io.load import load_json_parameters
from bcipy.task.data import Session


Expand All @@ -46,21 +43,6 @@ def session_data(data_dir: str) -> Dict:
return data


def collect_experiment_field_data(experiment_name: str,
save_path: str,
file_name: str = EXPERIMENT_DATA_FILENAME) -> None:
experiment = load_experiments()[experiment_name]
experiment_fields = load_experiment_fields(experiment)

if experiment_fields:
cmd = (f'python {BCIPY_ROOT}/gui/experiments/ExperimentField.py -e'
f' "{experiment_name}" -p "{save_path}" -f "{file_name}"')
subprocess.check_call(cmd, shell=True)
# verify data was written before moving on
if not validate_field_data_written(save_path, file_name):
raise Exception('Field data not collected!')


@dataclass(frozen=True)
class EvidenceRecord:
"""Record summarizing Inquiry evidence."""
Expand Down
57 changes: 0 additions & 57 deletions bcipy/helpers/demo/demo_copy_phrase_wrapper.py

This file was deleted.

1 change: 1 addition & 0 deletions bcipy/helpers/offset.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ def calculate_latency(raw_data: RawData,
if value < 1 and diode_enc:
diode_enc = False

trigger_diodes_timestamps = []
# Plot triggers.txt data if present; vertical line for each value.
if triggers:
trigger_diodes_timestamps = [
Expand Down
2 changes: 0 additions & 2 deletions bcipy/task/demo/control/demo_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@ def _demo_decision_maker():

conjugator = EvidenceFusion(evidence_names, len_dist=len_alp)
decision_maker = DecisionMaker(
min_num_inq=1,
max_num_inq=10,
state='',
alphabet=alp)

Expand Down
6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ classifiers = [
dependencies = [
"attrdict3==2.0.2",
"EDFlib-Python==1.0.8",
"transformers==4.26.0",
"torch==2.0.0",
"transformers==4.36.0",
"torch==2.2.0",
"construct==2.8.14",
"mne==1.6.1",
"mne-bids==0.14.0",
Expand All @@ -46,7 +46,7 @@ dependencies = [
"pylsl==1.16.2",
"pandas==2.0.3",
"psutil==5.7.2",
"Pillow==9.4.0",
"Pillow==10.2.0",
"py-cpuinfo==9.0.0",
"pyopengl==3.1.7",
"PyQt6==6.7.1",
Expand Down

0 comments on commit 51e028d

Please sign in to comment.