Skip to content

Commit f4f5519

Browse files
authored
Merge pull request #163 from cpp-lln-lab/dev
[ENH] release 1.2.1
2 parents 6fe3612 + 4f88924 commit f4f5519

File tree

158 files changed

+382
-206
lines changed

Some content is hidden

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

158 files changed

+382
-206
lines changed

.github/workflows/check_markdown.yml

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

.github/workflows/check_md_links.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ on:
77
branches:
88
- master
99
pull_request:
10-
branches: '*'
10+
branches: ['*']
1111

1212
jobs:
1313
markdown-link-check:
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

.github/workflows/miss_hit.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
branches:
66
- master
77
pull_request:
8-
branches: '*'
8+
branches: ['*']
99

1010
jobs:
1111
build:

.github/workflows/moxunit.yml renamed to .github/workflows/run_tests.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
name: MOxUnit
1+
name: tests and coverage
22

33
on:
44
push:
55
branches:
66
- master
77
pull_request:
8-
branches: '*'
8+
branches: ['*']
99

1010
jobs:
1111
build:
@@ -16,7 +16,7 @@ jobs:
1616
submodules: true
1717
fetch-depth: 1
1818
- name: MOxUnit Action
19-
uses: joergbrech/moxunit-action@v1.1
19+
uses: joergbrech/moxunit-action@v1.2.0
2020
with:
2121
tests: tests
2222
src: src

.pre-commit-config.yaml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
repos:
2+
3+
- repo: local
4+
5+
hooks:
6+
7+
- id: mh_version
8+
name: mh_version
9+
entry: mh_style
10+
args: [-v]
11+
verbose: true
12+
language: python
13+
additional_dependencies: [miss_hit_core]
14+
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]
22+
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]
30+
31+
# - id: mh_lint
32+
# name: mh_lint
33+
# entry: mh_lint
34+
# files: ^(.*\.(m|slx))$
35+
# language: python
36+
# additional_dependencies: [miss_hit]
37+
38+
- repo: https://github.com/pre-commit/pre-commit-hooks
39+
rev: v2.0.0
40+
hooks:
41+
- id: trailing-whitespace
42+
- id: end-of-file-fixer
43+
- id: check-yaml
44+
- id: check-added-large-files

.readthedocs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@ formats:
2121

2222
# Optionally set the version of Python and requirements required to build your docs
2323
python:
24-
version: 3.7
24+
version: "3.7"
2525
install:
26-
- requirements: requirements.txt
26+
- requirements: requirements.txt

.remarkrc

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

.zenodo.json

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,14 @@
1616
"affiliation": "Université Catholique de Louvain",
1717
"name": "Battal, Ceren",
1818
"orcid": "0000-0002-9844-7630"
19+
},
20+
{
21+
"affiliation": "Université Catholique de Louvain",
22+
"name": "Falagiarda, Federica"
23+
},
24+
{
25+
"affiliation": "Université Catholique de Louvain",
26+
"name": "Shahzad, Iqra"
1927
}
2028
],
2129
"keywords": [
@@ -26,4 +34,4 @@
2634
],
2735
"license": "MIT license",
2836
"upload_type": "software"
29-
}
37+
}

README.md

Lines changed: 0 additions & 2 deletions

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: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
% (C) Copyright 2021 CPP_PTB developers
2+
3+
%% Demo showing how to use the createFramesTextureStructure and playVideoFrames functions
4+
5+
% as it is, it presents two example videos in succession
6+
7+
% add parent directory to matlab path (so we can access the CPP_PTB functions)
8+
addpath(fullfile(pwd, '..'));
9+
10+
%% start with a clean slate
11+
clear;
12+
clc;
13+
14+
%% initialize PTB % This can def be improved by using other CPP_PTB functions%
15+
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'));
21+
22+
% Set the PTB window background manually
23+
cfg.color.background = [127 127 127];
24+
25+
% Get the screen numbers and draw to the external screen if avaliable
26+
cfg.screen.idx = max(Screen('Screens'));
27+
28+
% Open an on screen window
29+
[cfg.screen.win, cfg.screen.winRect] = Screen('OpenWindow', cfg.screen.idx, cfg.color.background);
30+
31+
%% Strcuture for video related info
32+
33+
% The name of your "video" and its images format
34+
video.names = {'coffee', 'leaves'};
35+
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];
41+
42+
% The format fo the images
43+
video.frame.format = '.jpeg'; % can be any img format compatible with the "imread" function
44+
45+
% the folder where the images are (from the current folder)
46+
video.stimuli.folder = 'stimuli/';
47+
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;
53+
54+
%% present the videos in a loop
55+
56+
for trial = 1:length(video.names)
57+
58+
% select name and folder where current video is
59+
video.name = video.names{trial};
60+
video.path = fullfile(video.stimuli.folder, video.name);
61+
62+
% how many frames are going to be presented
63+
if numel(video.frame.numbers) < 1
64+
video.frame.number = size(dir([video.path, '/*', video.frame.format]), 1);
65+
66+
elseif numel(video.frame.numbers) > 1
67+
video.frame.number = video.frame.numbers(trial);
68+
69+
else
70+
video.frame.number = video.frame.numbers;
71+
end
72+
73+
% Read the images and create the stucture with their textures
74+
[video, cfg] = createFramesTextureStructure(video, cfg);
75+
76+
% Play the video
77+
playVideoFrames(video, cfg);
78+
79+
% ISI (better would be to use Flip)
80+
WaitSecs(video.isi);
81+
82+
end
83+
84+
% The end
85+
sca;
14 KB
14.1 KB
14.1 KB
14.1 KB
14.2 KB
14.2 KB
14.2 KB
14.2 KB
14.2 KB
14.2 KB
14.2 KB
14.3 KB
14.3 KB
14.3 KB
14.3 KB
14.3 KB
14.4 KB
14.3 KB
14.3 KB
14.4 KB
14.4 KB
14.4 KB
14.5 KB
14.4 KB
14.4 KB
14.4 KB
14.4 KB
14.4 KB
14.4 KB
14.4 KB
19.9 KB
19.8 KB
20 KB
20 KB
20.5 KB
20.6 KB
20.9 KB
21.3 KB
21.3 KB
21.6 KB
21.7 KB
21.5 KB
21.2 KB
21.2 KB
20.9 KB
21.2 KB
21.1 KB
21 KB
21 KB
20.8 KB
20.6 KB
20.8 KB
21.1 KB
21.1 KB
21.5 KB
22.1 KB
22.3 KB
22.3 KB
22.3 KB
22.3 KB

docs/Makefile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
# from the environment for the first two.
66
SPHINXOPTS ?=
77
SPHINXBUILD ?= sphinx-build
8-
SOURCEDIR = .
9-
BUILDDIR = _build
8+
SOURCEDIR = source
9+
BUILDDIR = build
1010

1111
# Put it first so that "make" without argument is like "make help".
1212
help:
@@ -18,3 +18,6 @@ help:
1818
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
1919
%: Makefile
2020
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
21+
22+
doc:
23+
@$(SPHINXBUILD) -b html "$(SOURCEDIR)" "$(BUILDDIR)"

docs/source/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
author = 'CPP_PTB developers'
2222

2323
# The full version, including alpha/beta/rc tags
24-
release = 'v1.0.0'
24+
release = 'v1.2.1'
2525

2626

2727
# -- General configuration ---------------------------------------------------

docs/source/installation.rst

Lines changed: 1 addition & 1 deletion

docs/source/set_up.rst

Lines changed: 1 addition & 1 deletion

manualTests/miss_hit.cfg

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,4 @@
11
# style guide (https://florianschanda.github.io/miss_hit/style_checker.html)
2-
line_length: 100
32
regex_function_name: "((test_[a-z]+)|[a-z]+)(([A-Z]){1}[A-Za-z]+)*"
4-
suppress_rule: "copyright_notice"
5-
6-
# metrics limit for the code quality (https://florianschanda.github.io/miss_hit/metrics.html)
7-
metric "cnest": limit 4
8-
metric "file_length": limit 500
9-
metric "cyc": limit 15
10-
metric "parameters": limit 5
3+
regex_script_name: "((test_[a-z]+)|[a-z]+)(([A-Z]){1}[A-Za-z]+)*"
4+
regex_parameter_name: "test_suite|[A-Z]{2,}|[a-z]+([A-Z]+[a-z]*)*"

manualTests/test_dotMotionSimulation.m

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
function test_suite = test_dotMotionSimulation %#ok<*STOUT>
2+
%
3+
% (C) Copyright 2020 CPP_PTB developers
24
try % assignment of 'localfunctions' is necessary in Matlab >= 2016
35
test_functions = localfunctions(); %#ok<*NASGU>
46
catch % no problem; early Matlab versions can use initTestSuite fine

manualTests/test_getResponse.m

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
%
2+
% (C) Copyright 2020 CPP_PTB developers
3+
14
addpath(fullfile(pwd, '..'));
25

36
clear;

manualTests/test_radialMotion.m

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
%
2+
% (C) Copyright 2020 CPP_PTB developers
3+
14
% ensure that dot density contrast is not too low when we kill dots often enough
25

36
% There is an actual official unit test in the tests folder so this here is more

miss_hit.cfg

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# style guide (https://florianschanda.github.io/miss_hit/style_checker.html)
22
line_length: 100
33
regex_function_name: "[a-z]+(([A-Z]){1}[A-Za-z]+)*"
4+
regex_script_name: "[a-z]+(([A-Z]){1}[A-Za-z]+)*"
5+
regex_parameter_name: "[A-Z]{2,}|[a-z]+([A-Z]+[a-z]*)*"
46
copyright_entity: "Sam Schwarzkopf"
57
copyright_entity: "Agah Karakuzu"
68
copyright_entity: "CPP_PTB developers"
@@ -9,4 +11,4 @@ copyright_entity: "CPP_PTB developers"
911
metric "cnest": limit 4
1012
metric "file_length": limit 500
1113
metric "cyc": limit 15
12-
metric "parameters": limit 5
14+
metric "parameters": limit 5

npm-requirements.txt

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

requirements.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@ Sphinx
22
sphinxcontrib-matlabdomain
33
sphinxcontrib-napoleon
44
sphinx_rtd_theme
5-
miss_hit==0.9.15
5+
miss_hit==0.9.29
6+
pre-commit

0 commit comments

Comments
 (0)