Skip to content

Commit 6b60914

Browse files
committed
linting
1 parent 4f21c09 commit 6b60914

File tree

91 files changed

+274
-260
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

91 files changed

+274
-260
lines changed

.github/workflows/check_md_links.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ jobs:
1414
runs-on: ubuntu-latest
1515
steps:
1616
- uses: actions/checkout@master
17-
- uses: gaurav-nelson/github-action-markdown-link-check@v1
17+
- uses: gaurav-nelson/github-action-markdown-link-check@v1

.pre-commit-config.yaml

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -12,28 +12,28 @@ repos:
1212
language: python
1313
additional_dependencies: [miss_hit_core]
1414

15-
- id: mh_style
16-
name: mh_style
17-
entry: mh_style
18-
args: [--process-slx, --fix]
19-
files: ^(.*\.(m|slx))$
20-
language: python
21-
additional_dependencies: [miss_hit_core]
15+
# - id: mh_style
16+
# name: mh_style
17+
# entry: mh_style
18+
# args: [--process-slx, --fix]
19+
# files: ^(.*\.(m|slx))$
20+
# language: python
21+
# additional_dependencies: [miss_hit_core]
2222

23-
- id: mh_metric
24-
name: mh_metric
25-
entry: mh_metric
26-
args: [--ci]
27-
files: ^(.*\.(m|slx))$
28-
language: python
29-
additional_dependencies: [miss_hit_core]
23+
# - id: mh_metric
24+
# name: mh_metric
25+
# entry: mh_metric
26+
# args: [--ci]
27+
# files: ^(.*\.(m|slx))$
28+
# language: python
29+
# additional_dependencies: [miss_hit_core]
3030

31-
- id: mh_lint
32-
name: mh_lint
33-
entry: mh_lint
34-
files: ^(.*\.(m|slx))$
35-
language: python
36-
additional_dependencies: [miss_hit]
31+
# - id: mh_lint
32+
# name: mh_lint
33+
# entry: mh_lint
34+
# files: ^(.*\.(m|slx))$
35+
# language: python
36+
# additional_dependencies: [miss_hit]
3737

3838
- repo: https://github.com/pre-commit/pre-commit-hooks
3939
rev: v2.0.0

.readthedocs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,4 @@ formats:
2323
python:
2424
version: 3.7
2525
install:
26-
- requirements: requirements.txt
26+
- requirements: requirements.txt

.zenodo.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,4 @@
2626
],
2727
"license": "MIT license",
2828
"upload_type": "software"
29-
}
29+
}

demos/miss_hit.cfg

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# style guide (https://florianschanda.github.io/miss_hit/style_checker.html)
22
line_length: 100
33
regex_function_name: "CPP_[a-z]+(([A-Z]){1}[A-Za-z]+)*"
4+
regex_script_name: "CPP_[a-z]+(([A-Z]){1}[A-Za-z]+)*"
45
copyright_entity: "Sam Schwarzkopf"
56
copyright_entity: "Agah Karakuzu"
67
copyright_entity: "CPP_PTB developers"
@@ -9,4 +10,4 @@ copyright_entity: "CPP_PTB developers"
910
metric "cnest": limit 4
1011
metric "file_length": limit 500
1112
metric "cyc": limit 15
12-
metric "parameters": limit 5
13+
metric "parameters": limit 5

demos/video/CPP_playVideoFramesDemo.m

Lines changed: 39 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -4,89 +4,82 @@
44

55
% as it is, it presents two example videos in succession
66

7-
87
% add parent directory to matlab path (so we can access the CPP_PTB functions)
98
addpath(fullfile(pwd, '..'));
109

1110
%% start with a clean slate
1211
clear;
1312
clc;
1413

15-
1614
%% initialize PTB % This can def be improved by using other CPP_PTB functions%
1715

18-
% Skip the PTB sync test
19-
Screen('Preference', 'SkipSyncTests', 2);
16+
% Skip the PTB sync test
17+
Screen('Preference', 'SkipSyncTests', 2);
18+
19+
% Get the screen numbers and draw to the external screen if avaliable
20+
cfg.screen.idx = max(Screen('Screens'));
2021

21-
% Get the screen numbers and draw to the external screen if avaliable
22-
cfg.screen.idx = max(Screen('Screens'));
22+
% Set the PTB window background manually
23+
cfg.color.background = [127 127 127];
2324

24-
% Set the PTB window background manually
25-
cfg.color.background = [127 127 127];
25+
% Get the screen numbers and draw to the external screen if avaliable
26+
cfg.screen.idx = max(Screen('Screens'));
2627

27-
% Get the screen numbers and draw to the external screen if avaliable
28-
cfg.screen.idx = max(Screen('Screens'));
28+
% Open an on screen window
29+
[cfg.screen.win, cfg.screen.winRect] = Screen('OpenWindow', cfg.screen.idx, cfg.color.background);
2930

30-
% Open an on screen window
31-
[cfg.screen.win, cfg.screen.winRect] = Screen('OpenWindow', cfg.screen.idx, cfg.color.background);
32-
33-
3431
%% Strcuture for video related info
3532

36-
% The name of your "video" and its images format
37-
video.names = {'coffee','leaves'};
38-
39-
% The number of frames of your video you want to present
40-
% If left empty, all available frames are taken
41-
video.frame.numbers = [];
42-
% video.frame.numbers = 30;
43-
% video.frame.numbers = [30,15];
33+
% The name of your "video" and its images format
34+
video.names = {'coffee', 'leaves'};
4435

45-
% The format fo the images
46-
video.frame.format = '.jpeg'; % can be any img format compatible with the "imread" function
36+
% The number of frames of your video you want to present
37+
% If left empty, all available frames are taken
38+
video.frame.numbers = [];
39+
% video.frame.numbers = 30;
40+
% video.frame.numbers = [30,15];
4741

48-
% the folder where the images are (from the current folder)
49-
video.stimuli.folder = 'stimuli/';
42+
% The format fo the images
43+
video.frame.format = '.jpeg'; % can be any img format compatible with the "imread" function
5044

51-
% The frame rate at which you want to present your video
52-
video.frame.rate = 29.97;
45+
% the folder where the images are (from the current folder)
46+
video.stimuli.folder = 'stimuli/';
5347

54-
% Time bw videos in s
55-
video.isi = 1;
48+
% The frame rate at which you want to present your video
49+
video.frame.rate = 29.97;
50+
51+
% Time bw videos in s
52+
video.isi = 1;
5653

57-
5854
%% present the videos in a loop
5955

60-
for trial = 1:length(video.names)
61-
56+
for trial = 1:length(video.names)
57+
6258
% select name and folder where current video is
6359
video.name = video.names{trial};
64-
video.path = fullfile(video.stimuli.folder,video.name);
65-
66-
60+
video.path = fullfile(video.stimuli.folder, video.name);
61+
6762
% how many frames are going to be presented
6863
if numel(video.frame.numbers) < 1
69-
video.frame.number = size(dir([video.path,'/*',video.frame.format]),1);
70-
64+
video.frame.number = size(dir([video.path, '/*', video.frame.format]), 1);
65+
7166
elseif numel(video.frame.numbers) > 1
7267
video.frame.number = video.frame.numbers(trial);
73-
68+
7469
else
7570
video.frame.number = video.frame.numbers;
7671
end
77-
78-
72+
7973
% Read the images and create the stucture with their textures
8074
[video, cfg] = createFramesTextureStructure(video, cfg);
8175

8276
% Play the video
8377
playVideoFrames(video, cfg);
84-
78+
8579
% ISI (better would be to use Flip)
8680
WaitSecs(video.isi);
87-
88-
end
8981

82+
end
9083

91-
% The end
92-
sca;
84+
% The end
85+
sca;

docs/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ help:
2020
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
2121

2222
doc:
23-
@$(SPHINXBUILD) -b html "$(SOURCEDIR)" "$(BUILDDIR)"
23+
@$(SPHINXBUILD) -b html "$(SOURCEDIR)" "$(BUILDDIR)"

docs/source/installation.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ Add it as a submodule in the repo you are working on.
7676
:linenos:
7777
7878
cd fullpath_to_directory_where_to_install
79-
79+
8080
# use git to download the code
8181
git submodule add https://github.com/cpp-lln-lab/CPP_PTB.git
8282

docs/source/set_up.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ cfg.keyboard
4747
% (that of the experimenter)
4848
cfg.keyboard.responseBox = []; % device index used by the participants
4949
cfg.keyboard.responseKey = {}; % list the keys that PTB should "listen" to when
50-
% using KbQueue to collect responses ;
50+
% using KbQueue to collect responses ;
5151
% if empty PTB will listen to all key presses
5252
cfg.keyboard.escapeKey = 'ESCAPE'; % key to press to escape
5353

manualTests/miss_hit.cfg

Lines changed: 0 additions & 10 deletions
This file was deleted.

0 commit comments

Comments
 (0)