Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
66 commits
Select commit Hold shift + click to select a range
d5d6ea3
enh initEnv to also have an uninit case
marcobarilari Nov 20, 2022
a165b09
add at the end the uninit call to initEnv
marcobarilari Nov 20, 2022
1e74c75
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Nov 20, 2022
423b2f6
simplify README
Remi-Gau Feb 1, 2023
9a73141
update CPP PTB
Remi-Gau Feb 1, 2023
77df7ed
update CPP PTB
Remi-Gau Feb 1, 2023
32c53f7
Merge branch 'main' into marco_fix-#30_uninit-env
Remi-Gau Feb 1, 2023
d031633
update CPP PTB
Remi-Gau Feb 1, 2023
dd1db09
Merge pull request #31 from marcobarilari/marco_fix-#30_uninit-env
Remi-Gau Feb 1, 2023
79a3b1f
Update submodules
Remi-Gau Feb 1, 2023
6d2d078
Merge pull request #43 from cpp-lln-lab/create-pull-request/patch
Remi-Gau Feb 2, 2023
6d2f407
Update submodules
Remi-Gau Apr 1, 2023
bcc3ae2
Bump lib/CPP_PTB from `06fd8eb` to `fdbbfdf`
dependabot[bot] Apr 1, 2023
159ee62
Bump lib/CPP_BIDS from `f814264` to `3b23869`
dependabot[bot] Apr 1, 2023
f9c9a05
Merge pull request #46 from cpp-lln-lab/dependabot/submodules/lib/CPP…
Remi-Gau Apr 1, 2023
28d940f
Merge pull request #45 from cpp-lln-lab/dependabot/submodules/lib/CPP…
Remi-Gau Apr 1, 2023
2e4eff6
Merge pull request #44 from cpp-lln-lab/create-pull-request/patch
Remi-Gau Apr 1, 2023
89bee5c
Update submodules
Remi-Gau May 1, 2023
c75f2ab
Bump peter-evans/create-pull-request from 4 to 5
dependabot[bot] May 1, 2023
30c2d59
Bump lib/CPP_BIDS from `3b23869` to `ad68d19`
dependabot[bot] May 1, 2023
5d1300a
Merge pull request #47 from cpp-lln-lab/create-pull-request/patch
Remi-Gau May 1, 2023
bf0112e
Merge pull request #48 from cpp-lln-lab/dependabot/github_actions/pet…
Remi-Gau May 1, 2023
b04176c
Merge pull request #49 from cpp-lln-lab/dependabot/submodules/lib/CPP…
Remi-Gau May 1, 2023
be25a49
Bump lib/CPP_BIDS from `ad68d19` to `31606c3`
dependabot[bot] Jun 1, 2023
bbeba4a
Update submodules
Remi-Gau Jun 1, 2023
98f9d79
Merge pull request #50 from cpp-lln-lab/dependabot/submodules/lib/CPP…
Remi-Gau Jun 1, 2023
bc14dfe
Merge pull request #51 from cpp-lln-lab/create-pull-request/patch
Remi-Gau Jun 1, 2023
394f018
Bump lib/CPP_BIDS from `31606c3` to `28477b4`
dependabot[bot] Jul 1, 2023
a6ec612
Merge pull request #52 from cpp-lln-lab/dependabot/submodules/lib/CPP…
Remi-Gau Jul 1, 2023
6e66984
Bump lib/CPP_BIDS from `28477b4` to `0bb91e7`
dependabot[bot] Aug 1, 2023
c27bd33
Merge pull request #54 from cpp-lln-lab/dependabot/submodules/lib/CPP…
Remi-Gau Aug 1, 2023
f1f49f7
Bump lib/CPP_BIDS from `0bb91e7` to `c76f332`
dependabot[bot] Sep 1, 2023
c749895
Update submodules
Remi-Gau Sep 1, 2023
cd833ed
Merge pull request #55 from cpp-lln-lab/dependabot/submodules/lib/CPP…
Remi-Gau Sep 1, 2023
322a6de
Merge pull request #56 from cpp-lln-lab/create-pull-request/patch
Remi-Gau Sep 1, 2023
b95ad43
rem worklfow to upate submodules
Remi-Gau Sep 1, 2023
cd613fd
Bump actions/checkout from 3 to 4
dependabot[bot] Oct 1, 2023
7c8acab
Bump lib/CPP_BIDS from `c76f332` to `b71aceb`
dependabot[bot] Oct 1, 2023
4aebaae
Merge pull request #58 from cpp-lln-lab/dependabot/submodules/lib/CPP…
Remi-Gau Oct 1, 2023
9b6da82
Bump lib/CPP_BIDS from `b71aceb` to `7c37c29`
dependabot[bot] Nov 1, 2023
6a320e3
Bump lib/CPP_PTB from `fdbbfdf` to `378dcd8`
dependabot[bot] Nov 1, 2023
78a483d
Merge pull request #59 from cpp-lln-lab/dependabot/submodules/lib/CPP…
Remi-Gau Nov 6, 2023
35c658a
Merge pull request #60 from cpp-lln-lab/dependabot/submodules/lib/CPP…
Remi-Gau Nov 6, 2023
f096cde
Bump lib/CPP_BIDS from `7c37c29` to `72be3fa`
dependabot[bot] Dec 1, 2023
4b2d6ca
Merge pull request #61 from cpp-lln-lab/dependabot/submodules/lib/CPP…
Remi-Gau Dec 1, 2023
ef7c64d
Merge pull request #57 from cpp-lln-lab/dependabot/github_actions/act…
Remi-Gau Dec 6, 2023
7c0a5af
Bump lib/CPP_PTB from `378dcd8` to `48540ec`
dependabot[bot] Jan 1, 2024
cf94289
Bump lib/CPP_BIDS from `72be3fa` to `4c75747`
dependabot[bot] Jan 1, 2024
9e761cd
Bump actions/setup-python from 4 to 5
dependabot[bot] Jan 1, 2024
c3bf8e0
Merge pull request #63 from cpp-lln-lab/dependabot/submodules/lib/CPP…
Remi-Gau Jan 1, 2024
1fea09a
Merge pull request #64 from cpp-lln-lab/dependabot/github_actions/act…
Remi-Gau Jan 1, 2024
b80c10b
Merge pull request #62 from cpp-lln-lab/dependabot/submodules/lib/CPP…
Remi-Gau Jan 1, 2024
4e39911
Bump lib/CPP_BIDS from `4c75747` to `19f086c`
dependabot[bot] Feb 1, 2024
88fdbe5
Bump codecov/codecov-action from 3 to 4
dependabot[bot] Feb 1, 2024
8a0e6cb
Merge pull request #66 from cpp-lln-lab/dependabot/github_actions/cod…
Remi-Gau Feb 1, 2024
fe303ca
Merge pull request #65 from cpp-lln-lab/dependabot/submodules/lib/CPP…
Remi-Gau Feb 1, 2024
dd73b3e
Bump lib/CPP_BIDS from `19f086c` to `3b95c4f`
dependabot[bot] Mar 1, 2024
726ac60
Bump lib/CPP_PTB from `48540ec` to `ed00ab9`
dependabot[bot] Mar 1, 2024
60fa2fc
Merge pull request #67 from cpp-lln-lab/dependabot/submodules/lib/CPP…
Remi-Gau Mar 1, 2024
a0afdb5
Merge pull request #68 from cpp-lln-lab/dependabot/submodules/lib/CPP…
Remi-Gau Mar 1, 2024
75c29f0
Bump lib/CPP_BIDS from `3b95c4f` to `eeb0ad7`
dependabot[bot] Apr 1, 2024
4f9fe28
Merge pull request #69 from cpp-lln-lab/dependabot/submodules/lib/CPP…
Remi-Gau Apr 1, 2024
9a3c192
Bump lib/CPP_BIDS from `eeb0ad7` to `8536d1c` (#70)
dependabot[bot] May 1, 2024
633f2de
Bump lib/CPP_PTB from `ed00ab9` to `b5dcdff` (#71)
dependabot[bot] May 1, 2024
e91689c
Bump codecov/codecov-action from 4 to 5 (#72)
dependabot[bot] Feb 2, 2025
736acb3
Bump actions/checkout from 4 to 6
dependabot[bot] Feb 27, 2026
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
2 changes: 1 addition & 1 deletion .github/workflows/codespell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ jobs:
codespell:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v6
- uses: codespell-project/actions-codespell@master
4 changes: 2 additions & 2 deletions .github/workflows/miss_hit_quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v6
with:
submodules: true
fetch-depth: 1

- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: 3.11

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/miss_hit_style.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v6
with:
submodules: true
fetch-depth: 1

- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: 3.11

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/moxunit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:

steps:

- uses: actions/checkout@v3
- uses: actions/checkout@v6
with:
submodules: true
fetch-depth: 1
Expand All @@ -28,7 +28,7 @@ jobs:
cover_xml_file: coverage.xml

- name: Code coverage
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos
file: coverage.xml # optional
Expand Down
100 changes: 0 additions & 100 deletions .github/workflows/update_submodules.yml

This file was deleted.

42 changes: 8 additions & 34 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,77 +1,51 @@
[![](https://img.shields.io/badge/Octave-CI-blue?logo=Octave&logoColor=white)](https://github.com/cpp-lln-lab/template_PTB_experiment/actions)
![](https://github.com/Remi-gau/template_matlab_analysis/workflows/CI/badge.svg)
[![codecov](https://codecov.io/gh/Remi-gau/template_matlab_analysis/branch/master/graph/badge.svg)](https://codecov.io/gh/cpp-lln-lab/template_PTB_experiment)
[![Build Status](https://travis-ci.com/Remi-gau/template_matlab_analysis.svg?branch=master)](https://travis-ci.com/cpp-lln-lab/template_PTB_experiment)

# Template repository for matlab analysis project
# Template repository for psycthoolbox experiment

## Content

```bash
├── .git
│ ├── COMMIT_EDITMSG
│ ├── FETCH_HEAD
│ ├── HEAD
│ ├── ORIG_HEAD
│ ├── branches
│ ├── config
│ ├── description
│ ├── hooks
│ │ ├── pre-commit.sample
│ │ └── pre-push.sample
│ ├── ...
│ └── ...
├── .github # where you put anything github related
│ └── workflows # where you define your github actions
│ └── moxunit.yml # a yaml file that defines a github action
├── lib # where you put the code from external libraries (mathworks website or other github repositories)
├── lib # external libraries (mathworks website or other github repositories)
│ └── README.md
├── src # where you put your code
│ ├── README.md
│ └── miss_hit.cfg
├── tests # where you put your unit tests
| ├── README.md
| └── miss_hit.cfg
├── .travis.yml # where you define the continuous integration done by Travis
├── LICENSE
├── README.md
├── requirements.txt # list of python packages used in this repo: to install `pip install -r requirements.txt`
├── requirements.txt # python packages used: to install `pip install -r requirements.txt`
├── miss_hit.cfg # configuration file for the matlab miss hit linter
└── initEnv.m # a .m file to set up your project (adds the right folder to the path)
```

## Keeping your code stylish: miss hit linter

## Python environment

More on this
[here](https://the-turing-way.netlify.app/reproducible-research/renv/renv-package.html)

[Conda cheat sheet](https://docs.conda.io/projects/conda/en/4.6.0/_downloads/52a95608c49671267e40c689e0bc00ca/conda-cheatsheet.pdf)

## Testing your code

## Continuous integration

## How to install and use this template

By using the
[template PTB experiment repository](https://github.com/cpp-lln-lab/template_PTB_experiment):
you can create a new repository on your github account with all the basic folders,
files and submodules already set up. You only have to then clone the repository
and you are good to go.

you can create a new repository on your github account with all the basic
folders, files and submodules already set up. You only have to then clone the
repository and you are good to go.

## How to install and run

Install

```
git clone --recurse-submodules https://github.com/your_github_account/the_name_of_your_new_experiment.git
```

Set parameters in `setParameters.m`

Run

```
mainScript
```
80 changes: 59 additions & 21 deletions initEnv.m
Original file line number Diff line number Diff line change
@@ -1,18 +1,45 @@
%
% 1 - Check if version requirements
% are satisfied and the packages are
% are installed/loaded:
% Octave > 4
% - image
% - optim
% - struct
% - statistics
%
% MATLAB >= R2015b
%
% 2 - Add project to the O/M path

function initEnv
function initEnv(varargin)
%
% 1 - Check if version requirements are satisfied and the packages are are installed/loaded:
% Octave > 4
% - image
% - optim
% - struct
% - statistics
%
% MATLAB >= R2015b
%
% 2 - Add project to the O/M path
%
% USAGE::
%
% initEnv
% initEnv('init')
% initEnv('uninit')
%
% :param action:
% :type action: string
%
% :returns: - :action: (type) (dimension)
%
% Example::
%

% (C) Copyright 2022 CPP_BIDS developers

p = inputParser;

defaultAction = 'init';

addOptional(p, 'action', defaultAction, @ischar);
% addParameter(p, 'verbose', true);

parse(p, varargin{:});

action = p.Results.action;
% verbose = p.Results.verbose;

% Check Matlab and Octave version

octaveVersion = '4.0.3';
matlabVersion = '8.6.0';
Expand Down Expand Up @@ -59,7 +86,7 @@
'Try this in your terminal:', ...
' git submodule update --recursive ']);
else
addDependencies();
addDependencies(action);
end

disp('Correct matlab/octave versions and added to the path!');
Expand Down Expand Up @@ -96,13 +123,24 @@ function tryInstallFromForge(packageName)

end

function addDependencies()
function addDependencies(action)

pth = fileparts(mfilename('fullpath'));
addpath(fullfile(pth, 'lib', 'CPP_BIDS'));
addpath(genpath(fullfile(pth, 'lib', 'CPP_PTB', 'src')));
addpath(fullfile(pth, 'subfun'));

checkCppBidsDependencies();
switch lower(action)

case 'init'

run(fullfile(pth, 'lib', 'CPP_PTB', 'cpp_ptb'));
run(fullfile(pth, 'lib', 'CPP_BIDS', 'cpp_bids'));
addpath(genpath(fullfile(pth, 'src')));

case 'uninit'

cpp_ptb('uninit');
cpp_bids('uninit');
rmpath(genpath(fullfile(pth, 'src')));

end

end
4 changes: 3 additions & 1 deletion mainScript.m
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
end

% make sure we got access to all the required functions and inputs
initEnv();
initEnv('init');

% set and load all the parameters to run the experiment
cfg = setParameters;
Expand Down Expand Up @@ -125,6 +125,8 @@

cleanUp();

initEnv('uninit');

catch

cleanUp();
Expand Down
1 change: 0 additions & 1 deletion notebooks/README.md

This file was deleted.

Loading