Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
136 commits
Select commit Hold shift + click to select a range
05b58c3
Comments out previous server setup
dyld-w Sep 29, 2024
b398e82
Updates to latest SMILE
dyld-w Sep 29, 2024
d45724b
Adds versioning + SubjectID to the Windows exe packaging
dyld-w Sep 29, 2024
c45afbb
Adds SubjectID reading from exe & a Label to display it
dyld-w Sep 29, 2024
26d6298
Refactors for pep8 compliance
dyld-w Sep 29, 2024
23e1fb8
Removes 'inscructions' directory w/ duplicate contents as 'instructions'
dyld-w Sep 29, 2024
cc33f2d
Fixes expected types
dyld-w Sep 29, 2024
47537db
Adds edit_exe_subject_id utility function
dyld-w Sep 29, 2024
6f0a4e6
Updates SubjectID field length to 54 char
dyld-w Sep 30, 2024
93d09c1
Changes exe file name
dyld-w Sep 30, 2024
e475767
RF: Edits Mac specfile to bundle to app
dyld-w Oct 3, 2024
0d225bb
RF NF: Renames to backend_executables_utils & adds macOS SubjectID ed…
dyld-w Oct 3, 2024
e3998d6
Unignores .spec files
dyld-w Oct 4, 2024
f8b9bce
Renames spec files
dyld-w Oct 4, 2024
f057e79
Adds Makefile for packaging
dyld-w Oct 4, 2024
c8d0ae7
Adds UPX for Windows; UPX not compatible with MacOS 13+
dyld-w Oct 4, 2024
7decd87
Revert "Adds UPX for Windows; UPX not compatible with MacOS 13+"
dyld-w Oct 4, 2024
90a844b
Ignores .DS_Store
dyld-w Oct 4, 2024
74c4507
Adds UPX for Windows; UPX not supported on MacOS 13+
dyld-w Oct 4, 2024
3d0b89d
Imports pefile & fixes formatting
dyld-w Oct 4, 2024
37e6988
Adds util functions for reading SubjectID from within executables
dyld-w Oct 4, 2024
94d8864
Adds OS detection to config & SubjectID retrieval to main
dyld-w Oct 4, 2024
fca9d47
Fixes path handling within the bundle and adds custom exception when …
dyld-w Oct 5, 2024
5c3a247
Add files via upload
libbywoodson Oct 7, 2024
b7d0147
Add files via upload
libbywoodson Oct 7, 2024
8e991c4
Add files via upload
libbywoodson Oct 7, 2024
8236bd8
Add files via upload
libbywoodson Oct 9, 2024
43397d7
Create ex.py
libbywoodson Oct 9, 2024
0e32e71
Add files via upload
libbywoodson Oct 9, 2024
86461ab
Switches from SubjectID to WorkerID
dyld-w Oct 9, 2024
72933f8
Changes subject id to worker id
dyld-w Oct 9, 2024
0a14d0c
Initial API integration implementation, yet to be tested
dyld-w Oct 10, 2024
a705f27
Merge pull request #5 from compmem/2024-task-graphic-updates
dyld-w Oct 14, 2024
d5a1bf5
Removes pyperclip
dyld-w Oct 14, 2024
930c469
Add files via upload
libbywoodson Oct 14, 2024
f725691
Fixes imports
dyld-w Oct 14, 2024
fc1178b
Fixes image source path for borders & background
dyld-w Oct 14, 2024
705feda
Deletes .DS_Store
dyld-w Oct 14, 2024
1e1b826
Removes code for calculating & presenting score; Reformats for PEP8
dyld-w Oct 14, 2024
294f297
Modifies get_stim to only extract needed files instead of extracting …
dyld-w Oct 14, 2024
4183e2a
Ignores generated AssBind stim directory
dyld-w Oct 14, 2024
2b69e07
Add files via upload
libbywoodson Oct 15, 2024
95fc296
Update list_gen.py
libbywoodson Oct 15, 2024
58f0930
Create create_folder.py
libbywoodson Oct 15, 2024
6a41c99
Add files via upload
libbywoodson Oct 15, 2024
007efc5
Adapts to API's block defintion formatting; Adds RUNNING_FROM_EXECUTA…
dyld-w Oct 16, 2024
f64fea3
Removes old block generation
dyld-w Oct 16, 2024
07ac6c2
Changes log names to match task names from API
dyld-w Oct 16, 2024
492063c
Switches from printf to logging for reading worker id functions
dyld-w Oct 16, 2024
46b0b99
Add files via upload
libbywoodson Oct 16, 2024
d736586
Add files via upload
libbywoodson Oct 16, 2024
43210f6
Adds initial implementation of data upload after the task
dyld-w Oct 16, 2024
b9eb0f1
Adds TODOs and reformats
dyld-w Oct 16, 2024
6c35078
Adds log_name argument to BARTSub to distinguish practice vs actual logs
dyld-w Oct 17, 2024
27e2709
Corrects slog_file_name naming, same log file used for every block
dyld-w Oct 17, 2024
a919b45
Removes unused imports; adds TODO
dyld-w Oct 17, 2024
0d9a917
Add files via upload
libbywoodson Oct 18, 2024
f68c45b
Adds initial implementation of error handling
dyld-w Oct 21, 2024
64797c8
Uses one logging config
dyld-w Oct 22, 2024
9bfa72b
Moves WORKER_ID_PLACEHOLDER_VALUE to the config
dyld-w Oct 22, 2024
2f2a46a
Fixes error screen for failed GET request
dyld-w Oct 23, 2024
ab6ab7b
Removes unnecessary KeyPress
dyld-w Oct 23, 2024
b35daec
Restructures return values for API call functions
dyld-w Oct 23, 2024
b2a9539
Restructures worker_id retrieval and returning
dyld-w Oct 23, 2024
6a00f8f
Corrects logging message
dyld-w Oct 23, 2024
d33cff3
Fixes 'Uploading data...' screen
dyld-w Oct 23, 2024
2e614ec
Removes unused variables
dyld-w Oct 24, 2024
e7a7adb
Fixes Makefile
dyld-w Oct 24, 2024
e6d5f74
Disables console
dyld-w Oct 24, 2024
74f0a5b
Disables debugging
dyld-w Oct 24, 2024
4c23990
Improves get_blocks_to_run error handling
dyld-w Oct 24, 2024
f93db3e
Improves error screen formatting
dyld-w Oct 24, 2024
71092c4
Makes all tasks use same happy.py
dyld-w Oct 24, 2024
73e87cc
Uses happy.py in main
dyld-w Oct 24, 2024
5480b45
Consolidates happy question config into a single file & establishes t…
dyld-w Oct 24, 2024
2958d20
Adds requirements.txt
dyld-w Oct 29, 2024
88da7fc
Adds GitHub Actions workflow to build executables
dyld-w Oct 29, 2024
8773adc
Updates actions versions
dyld-w Oct 29, 2024
1185b0c
Adjusts paths
dyld-w Oct 29, 2024
56f92e2
Adds caching & adjusts pip install path
dyld-w Oct 29, 2024
8fbfc4e
Adds recursive checkout to load
dyld-w Oct 29, 2024
d8c3086
Replaces make with pyinstaller calls
dyld-w Oct 29, 2024
de7226b
Adds Homebrew sdl2 install & Mesa3d for Windows
dyld-w Oct 29, 2024
eec9ff9
Specifies universal binaries
dyld-w Oct 29, 2024
2a8e62c
Restructures MacOS pip install
dyld-w Oct 29, 2024
edd0617
Adds --only-binary=:all:
dyld-w Oct 29, 2024
1898e10
Removes architecture: x64
dyld-w Oct 29, 2024
084d438
Adds --target .
dyld-w Oct 29, 2024
d70ef4e
Update instruct.py
libbywoodson Oct 30, 2024
4380ce9
Add files via upload
libbywoodson Oct 30, 2024
99a4b15
Add files via upload
libbywoodson Oct 30, 2024
7496f10
Add files via upload
libbywoodson Oct 30, 2024
472be5a
Add files via upload
libbywoodson Oct 31, 2024
4de9899
Merge branch '2024-task-graphic-updates' into 2024-data-collection-up…
dyld-w Oct 31, 2024
a853c2f
Defaults happy_mid to False
dyld-w Oct 31, 2024
ba549e6
Refactors visual updates to work when running from outermost main.py
dyld-w Oct 31, 2024
7c69e69
Removes conditional task retrieval
dyld-w Oct 31, 2024
d7413f2
fix builds
Shotgunosine Nov 6, 2024
8af799a
add tmate for build debugging
Shotgunosine Nov 6, 2024
c53ae9b
add tmate for build debugging
Shotgunosine Nov 6, 2024
7047942
always tmate
Shotgunosine Nov 6, 2024
7acba8b
try conda
Shotgunosine Nov 6, 2024
f9aaff4
try conda with python 3.10
Shotgunosine Nov 6, 2024
40b554c
try conda with setup-miniconda@v3
Shotgunosine Nov 6, 2024
e4a54f0
quotes on 3.10
Shotgunosine Nov 6, 2024
0ffe5e6
kivy to 2.3
Shotgunosine Nov 6, 2024
0ce4122
mac runner to 13 fix specfile name
Shotgunosine Nov 6, 2024
90c3a84
fix specfile name
Shotgunosine Nov 6, 2024
9978461
fix specfile name
Shotgunosine Nov 6, 2024
8b10137
revert mac to dw code
Shotgunosine Nov 6, 2024
b928c40
revert mac to dw code
Shotgunosine Nov 6, 2024
fde835e
debug mac version
Shotgunosine Nov 6, 2024
693b1be
explicitly set python path
Shotgunosine Nov 6, 2024
90ce0cd
debug mac build
Shotgunosine Nov 6, 2024
8c53bd1
pin pyinstaller version till they fix an icon bug
Shotgunosine Nov 6, 2024
62ddc22
fix pip install
Shotgunosine Nov 6, 2024
82ddf51
PTYHON_PATH -> PYTHONPATH
Shotgunosine Nov 6, 2024
c54bc9d
don't run tmate by default
Shotgunosine Nov 6, 2024
0411309
Delete tasks/flanker/stim/fish_left.png
libbywoodson Nov 7, 2024
21364eb
Delete tasks/flanker/stim/fish_right.png
libbywoodson Nov 7, 2024
2edc262
Add files via upload
libbywoodson Nov 7, 2024
f7ff38a
Add files via upload
libbywoodson Nov 7, 2024
ce52d17
Add files via upload
libbywoodson Nov 8, 2024
c735e9e
Add files via upload
libbywoodson Nov 8, 2024
6a1edb8
Create stim.zip
libbywoodson Nov 8, 2024
e4a26c8
Update list_gen.py
libbywoodson Nov 11, 2024
d237cc5
Add files via upload
libbywoodson Nov 11, 2024
9ff6001
Update main.py
libbywoodson Nov 11, 2024
ec26156
Merge branch '2024-task-graphic-updates' into 2024-data-collection-up…
dyld-w Nov 12, 2024
ca8b2dd
Adds updates to isntruct.py from instruct-copy & re-deletes instruct-…
dyld-w Nov 12, 2024
9fd4a15
Fixes background during practice
dyld-w Nov 12, 2024
272a2a1
Removes unused image
dyld-w Nov 12, 2024
a74a156
Updates README install instructions for Makefile
dyld-w Nov 12, 2024
8bbc775
add fixation cross to practice
Shotgunosine Nov 13, 2024
bdbc1c7
update action to run on master
Shotgunosine Nov 13, 2024
73db4d6
clean up actions
Shotgunosine Nov 13, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
118 changes: 118 additions & 0 deletions .github/workflows/build_executables.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
name: Build Executables

on:

workflow_dispatch:
inputs:
debug_enabled:
type: boolean
description: 'Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)'
required: false
default: false

push:
branches: [master]
pull_request:
branches: [master]

jobs:
build-windows:
runs-on: windows-latest
steps:
- name: Setup tmate session
uses: mxschmitt/action-tmate@v3
with:
detached: true
if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug_enabled }}
- uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: true
activate-environment: kivy20
python-version: "3.10"
channels: conda-forge
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: recursive # Initializes and updates submodules
- name: create env
shell: bash -l {0}
run: conda install -y kivy=2.3 pyinstaller=4.10 requests glfw
- name: pip installs
shell: bash -l {0}
run: pip install kivy-deps.sdl2 kivy-deps.glew pyo
- name: install smile
shell: bash -l {0}
run: pip install -e smile
- name: create files
shell: bash -l {0}
run: echo $SI > serverinfo.txt && echo $ULCRT > cert.pem
- name: package cogmood
shell: bash -l {0}
run: |
cd package
export KIVY_GL_BACKEND=angle_sdl2
python -m PyInstaller cogmood_windows.spec
- name: save exe
uses: actions/upload-artifact@v3
with:
name: SUPREME
path: package/dist/SUPREME.exe


build-macos:
runs-on: macos-14
steps:
- name: Setup tmate session
uses: mxschmitt/action-tmate@v3
with:
detached: true
if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug_enabled }}

- name: Checkout code
uses: actions/checkout@v4
with:
submodules: recursive # Initializes and updates submodules

- name: Install Homebrew dependencies
run: |
brew update
brew install sdl2 sdl2_image sdl2_mixer sdl2_ttf

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.10" # Specify your Python version

- name: Check if Python is a fat binary
run: |
if lipo -info $(which python3) | grep -q "Architectures in the fat file"; then
lipo -info $(which python3)
echo "Python is a fat binary."
export PATH=/Users/runner/hostedtoolcache/Python/3.10.11/arm64/bin:$PATH
else
echo "Python is NOT a fat binary."
exit 1 # Optional: Exit with error if you require a fat binary
fi

- name: Install dependencies
run: |
export PATH=/Users/runner/hostedtoolcache/Python/3.10.11/arm64/bin:$PATH
mkdir python_packages
python3 -m pip install --upgrade pip
python3 -m pip install --target $PWD/python_packages --only-binary=:all: --platform macosx_10_13_universal2 -r requirements.txt
export PYTHONPATH=$PWD/python_packages:$PYTHONPATH



- name: Build executable with PyInstaller
run: |
export PATH=/Users/runner/hostedtoolcache/Python/3.10.11/arm64/bin:$PATH
export PYTHONPATH=$PWD/python_packages:$PYTHONPATH
cd package
python3 -m PyInstaller --noconfirm cogmood_mac.spec

- name: Upload macOS executable
uses: actions/upload-artifact@v4
with:
name: SUPREME
path: package/dist/SUPREME
43 changes: 0 additions & 43 deletions .github/workflows/mac-build.yml

This file was deleted.

36 changes: 0 additions & 36 deletions .github/workflows/windows-build.yml

This file was deleted.

7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Stimuli extracted for AssBind
tasks/AssBind/stim/

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
Expand Down Expand Up @@ -31,7 +34,6 @@ MANIFEST
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
Expand Down Expand Up @@ -127,3 +129,6 @@ dmypy.json

# Pyre type checker
.pyre/

# MacOS
.DS_Store
39 changes: 37 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,40 @@
# SUPREMEMOOD

## Updated Non-Conda Build Instructions
**Note:** Must use Git Bash or WSL on Windows for compatibility with Make


Create virtual environment:
```bash
python -m venv .venv
```

Activate venv:
- Windows:
```bash
source .venv/Scripts/activate
```

- Mac:
```bash
source .venv/bin/activate
```

Install requirements:
```bash
pip install -r requirements.txt
```

Go to package directory:
```bash
cd package
```

Use Makefile to call PyInstaller (The Makefile will check for MacOS or Windows or other & call PyInstaller or output message if OS not supported):
```bash
make
```

## Windows build instructions
### Kivy 2.0
Pysinstaller 5.0 took out some tk hooks that kivy 2.0 depends on. kivy 2.1 fixes that, and could be used with pyinstaller 5.0, but there's a mouse issue with kivy 2.1.
Expand All @@ -8,7 +43,7 @@ After cloning this repo
```commandline
conda create -p ./env_kivy20 -c conda-forge python=3.9 kivy=2.0 pyinstaller=4.10 requests
conda activate ./env_kivy20
pip install kivy-deps.sdl2 kivy-deps.glew pyo pyperclip
pip install kivy-deps.sdl2 kivy-deps.glew pyo
pip install -e cogmood/smile
cd cogmood/package
python -m PyInstaller cogmood_winkivy20.spec
Expand All @@ -20,7 +55,7 @@ After cloning this repo
```commandline
conda create -p ./env_kivy20 -c conda-forge python=3.9 kivy=2.0 pyinstaller=4.10 requests
conda activate ./env_kivy20
pip install pyo pyperclip
pip install pyo
pip install -e cogmood/smile
cd cogmood/package
python -m PyInstaller cogmood_mackivy20.spec
Expand Down
Loading
Loading