SASHLab Stress CLI
Overview
SASHLab Stress is a collection of scripts that run common stress-inducing tasks, designed for use in psychology experiments or stress-response testing. The CLI is intended to facilitate the application of various stress protocols in a streamlined manner.
Features
The current script will run the available stress task for specified durations and save the output to an easily mungable CSV file.
Current stressors
-
Mental Arithmetic Task:
- A mental subtraction task where participants subtract digits under time pressure. Task difficulty adjusts based on streaks of correct or incorrect answers (streak length is 3).
-
Negative/Neutral Speech Task:
- A speech task where participants are asked to recall either negative or neutral experiences. The task condition (negative or neutral) is determined by the user.
Planned stressors
- Digit Span
- Nonsense Syllable
Installation
Ensure you have Python 3.12 or newer. To install the CLI, run:
pip install sashlab-stress
Usage
For the best results, ensure your terminal is pointed to the folder where you'd like participant data to be stored:
cd <path/to/your/project/data>
Run the main functionality of SASHLab Stress with default options:
sashlab_stress
Examples
-
To run the mental arithmetic stress task:
sashlab_stress --time-limit 600 --trial-time 20 --path ./data
-
To run the negative/neutral speech task in neutral condition:
sashlab_stress --task-type neg-neu-speech --condition 1 --time-limit 600 --path ./data
-
To show help and view available commands:
sashlab_stress --help
Options
-
--task-type: The kind of task to run, either the mental subtraction task ('mental-subtraction') or the negative/neutral speech task ('neg-neu-speech').- Type:
str - Default:
mental-subtraction - Example:
--task-type neg-neu-speech(runs the speech task)
- Type:
-
--time-limit: Set the time limit for the entire session in seconds.- Type:
int - Default:
300seconds (5 minutes) - Example:
--time-limit 600(Sets the session duration to 10 minutes)
- Type:
-
--trial-time: Specify the maximum duration allowed for each individual trial before it times out due to lack of interaction.- Type:
int - Default:
15seconds - Example:
--trial-time 20(Sets each trial timeout to 20 seconds)
- Type:
-
--path: Provide the path where session data will be saved.- Type:
path - Default: Current working directory (
cwd) - Example:
--path ./data(Saves session data to a folder named "data" in the current directory)
- Type:
-
--condition: Set the condition for the speech task, with 0 representing negative condition and 1 representing neutral condition.- Type:
int - Default:
0(Negative condition) - Example:
--condition 1(Runs the task in neutral condition)
- Type:
Dependencies
This project relies on the following packages:
- black (>=24.8.0): For code formatting.
- inputimeout (>=1.0.4): For handling time-based input during tasks.
- keyboard (>=0.13.5): To capture keyboard events during tasks.
All dependencies will be installed automatically with the package.
Requirements
- Python 3.12 or higher
- Operating System: OS Independent
Contributing
Contributions are welcome! If you have ideas for new stress tasks or improvements, feel free to open an issue or submit a pull request on the GitHub repository.
Authors
- Kevin O'Malley - kevomalley743@gmail.com
- Sandra O'Brien - sandra.obrien@ul.ie
License
This project is licensed under the MIT License
Metadata
Release files for sashlab-stress 0.1.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| sashlab_stress-0.1.5.tar.gz | 68.1 kB | Without provenance | Details for sashlab_stress-0.1.5.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| sashlab_stress-0.1.5-py3-none-any.whl | Python 3 | none | any | Details for sashlab_stress-0.1.5-py3-none-any.whl |
Total release size: 80.6 kB
Release files / sashlab_stress-0.1.5.tar.gz
| Download URL | sashlab_stress-0.1.5.tar.gz |
|---|---|
| Size | 68.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
cc0fa19240c72e4fa54cc443c8dcab1f209dcc21a38a88b4d9381c8e5bc9dfdb
|
|
BLAKE2b-256 checksum How to use checksums |
08537c7dd3aae45f4d4751813f612934650a0755d782f3d2af442d3af81ccfcf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.7
|
Release files / sashlab_stress-0.1.5-py3-none-any.whl
| Download URL | sashlab_stress-0.1.5-py3-none-any.whl |
|---|---|
| Size | 12.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8031b7e24b87fa15e4dfae6daa26eb137e2126184c21f933eef1a5ee0521c07c
|
|
BLAKE2b-256 checksum How to use checksums |
a2635d506666aeb1f98363078d23d2e1bf9f3827f041f2a73a578a9e9ce62fab
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.7
|
Security for sashlab-stress 0.1.5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.