NeuroTechX / NeuroTechX/EEG-ExPy
Implement ExperimentSpec to reduce redundancy
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 575
- Forks
- 153
- Avg merge
- 6h 44m
- Merged PRs (30d)
- 3
Description
A lot of the code/experiments needs access to static information such as:
- device name
- experiment name
- subject id
- session id
- data directory
- record duration
It would probably be a good idea to add a dataclass for this, that'll be easier to pass around without having to repeat the same set of arguments every time.
The idea would be that once you've constructed a ExperimentSpec, you can:
- Run the experiment:
expspec.run() - Get an
EEGinstance:expspec.device(generated from input arguments at initialization) - Generate a savefile:
expspec.generate_output_file()(see #74) - Write new experiments by simply having their
presentfunctions accept the single argumentspecwhich contains all metadata possibly needed by the experiment.
Essentially:
@dataclass
class ExperimentSpec:
device_name: str
experiment_name: str
subject_id: int
session_id: int
device_options: dict = field(default_factory=dict, ...)
def __post_init__(self):
self.device = EEG(self.device_name, **self.device_options)
def run() -> None:
...
def get_output_file() -> Path:
...
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing how existing experiments receive device, metadata, and output-file arguments, then inspect how EEG instances are constructed and read issue #74. Done means a coherent ExperimentSpec API supports experiment execution, device access, and output-file generation while existing experiment entry points can use the single spec argument.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- developer-experience
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100