Skip to content

Commit abb172e

Browse files
authored
Merge pull request #147 from cpp-lln-lab/release_candidate_1.2
Release candidate 1.2
2 parents 9536de7 + 6baa22e commit abb172e

Some content is hidden

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

64 files changed

+1506
-1227
lines changed

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Auto detect text files and perform LF normalization
2+
* text=auto

.github/workflows/check_markdown.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Check Markdown
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
branches: '*'
9+
10+
jobs:
11+
build:
12+
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
17+
- uses: actions/checkout@v2
18+
with:
19+
submodules: true
20+
fetch-depth: 1
21+
22+
- uses: actions/setup-node@v2
23+
with:
24+
node-version: '10'
25+
26+
- name: Install dependencies and check markdown
27+
run: |
28+
npm install `cat npm-requirements.txt`
29+
npx remark . --frail
30+
31+

.github/workflows/check_md_links.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ on:
66
push:
77
branches:
88
- master
9-
- dev
109
pull_request:
1110
branches: '*'
1211

.github/workflows/miss_hit.yml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ on:
44
push:
55
branches:
66
- master
7-
- dev
87
pull_request:
98
branches: '*'
109

@@ -28,12 +27,16 @@ jobs:
2827
- name: Install dependencies
2928
run: |
3029
python -m pip install --upgrade pip setuptools
31-
pip3 install install miss_hit
30+
pip3 install -r requirements.txt
3231
33-
- name: Miss_hit code quality
32+
- name: MISS_HIT Code style
3433
run: |
35-
mh_metric . --ci
34+
mh_style --process-slx
3635
37-
- name: Miss_hit code style
36+
- name: MISS_HIT Metrics
3837
run: |
39-
mh_style .
38+
mh_metric --ci
39+
40+
- name: MISS_HIT Bug finder
41+
run: |
42+
mh_lint

.github/workflows/moxunit.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: CI
1+
name: MOxUnit
22

33
on:
44
push:

.gitignore

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,19 @@
33
*.m~
44
*octave-workspace
55

6+
.vscode/*
7+
68
# exclude content of logfiles folders
79
*.tsv
810
*.mat
9-
check_my_code_report.txt
11+
check_my_code_report.txt
12+
13+
# exclude content of files for virtual env (mostly for the doc)
14+
cpp_ptb
15+
16+
# ignore file created by sphynx
17+
/docs/build
18+
19+
# exclude node js stuff
20+
node_modules/*
21+
package-lock.json

.readthedocs.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# .readthedocs.yml
2+
# Read the Docs configuration file
3+
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
4+
5+
# Required
6+
version: 2
7+
8+
# Build documentation in the docs/ directory with Sphinx
9+
sphinx:
10+
configuration: docs/source/conf.py
11+
builder: html
12+
fail_on_warning: true
13+
14+
# Build documentation with MkDocs
15+
#mkdocs:
16+
# configuration: mkdocs.yml
17+
18+
# Optionally build your docs in additional formats such as PDF
19+
formats:
20+
- pdf
21+
22+
# Optionally set the version of Python and requirements required to build your docs
23+
python:
24+
version: 3.7
25+
install:
26+
- requirements: requirements.txt

.travis.yml

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

.zenodo.json

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
"title": "CPP_PTB",
3+
"description": "A lightweight toolbox to facilitate setting up experiments with PsychToolBox.",
4+
"creators": [
5+
{
6+
"affiliation": "Université Catholique de Louvain",
7+
"name": "Gau, Rémi",
8+
"orcid": "0000-0002-1535-9767"
9+
},
10+
{
11+
"affiliation": "Université Catholique de Louvain",
12+
"name": "Barilari, Marco",
13+
"orcid": "0000-0002-3313-3120"
14+
},
15+
{
16+
"affiliation": "Université Catholique de Louvain",
17+
"name": "Battal, Ceren",
18+
"orcid": "0000-0002-9844-7630"
19+
}
20+
],
21+
"keywords": [
22+
"PsychToolBox",
23+
"neuroscience",
24+
"MATLAB",
25+
"Octave"
26+
],
27+
"license": "MIT license",
28+
"upload_type": "software"
29+
}

README.md

Lines changed: 17 additions & 131 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,24 @@
1+
<!-- lint disable -->
2+
3+
**Documentation**
4+
5+
[![Documentation Status: stable](https://readthedocs.org/projects/cpp-ptb/badge/?version=stable)](https://cpp-ptb.readthedocs.io/en/stable/?badge=stable)
6+
7+
**Cite it**
8+
9+
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.4007672.svg)](https://doi.org/10.5281/zenodo.4007672)
10+
11+
**Unit tests and coverage**
12+
113
[![](https://img.shields.io/badge/Octave-CI-blue?logo=Octave&logoColor=white)](https://github.com/cpp-lln-lab/CPP_PTB/actions)
214
![](https://github.com/cpp-lln-lab/CPP_PTB/workflows/CI/badge.svg)
315

416
[![Build Status](https://travis-ci.com/cpp-lln-lab/CPP_PTB.svg?branch=master)](https://travis-ci.com/cpp-lln-lab/CPP_PTB)
517

618
[![codecov](https://codecov.io/gh/cpp-lln-lab/CPP_PTB/branch/master/graph/badge.svg)](https://codecov.io/gh/cpp-lln-lab/CPP_PTB)
719

20+
**Contributors**
21+
822
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
923

1024
[![All Contributors](https://img.shields.io/badge/all_contributors-3-orange.svg?style=flat-square)](#contributors-)
@@ -13,20 +27,11 @@
1327

1428
# CPP_PTB
1529

16-
<!-- lint disable -->
17-
1830
<!-- TOC -->
1931

2032
- [CPP_PTB](#cpp_ptb)
21-
- [Requirements](#requirements)
2233
- [Documentation](#documentation)
2334
- [Content](#content)
24-
- [How to install](#how-to-install)
25-
- [Download with git](#download-with-git)
26-
- [Add as a submodule](#add-as-a-submodule)
27-
- [Example for submodule usage](#example-for-submodule-usage)
28-
- [Direct download](#direct-download)
29-
- [Add CPP_PTB globally to the matlab path](#add-cpp_ptb-globally-to-the-matlab-path)
3035
- [Code style guide](#code-style-guide)
3136
- [Unit tests](#unit-tests)
3237
- [Contributors ✨](#contributors-)
@@ -41,36 +46,15 @@ toolbox.
4146
Those functions are mostly wrappers around some PTB functions to facilitate
4247
their use and their reuse (#DontRepeatYourself)
4348

44-
## Requirements
45-
46-
Make sure that the following toolboxes are installed and added to the matlab /
47-
octave path.
48-
49-
For instructions see the following links:
50-
51-
<!-- lint disable -->
52-
53-
| Requirements | Used version |
54-
| -------------------------------------------------------- | ------------ |
55-
| [PsychToolBox](http://psychtoolbox.org/) | >=3.0.14 |
56-
| [Matlab](https://www.mathworks.com/products/matlab.html) | >=2015b |
57-
| or [Octave](https://www.gnu.org/software/octave/) | 4.? |
58-
59-
<!-- lint enable -->
60-
61-
Tested:
62-
63-
- matlab 2015b or octave 4.2.2 and PTB 3.0.14.
64-
6549
## Documentation
6650

67-
All the documentation is accessible [here](./docs/00-index.md).
51+
All the documentation and installtion information is accessible
52+
[here](https://cpp-ptb.readthedocs.io/en/stable/index.html#).
6853

6954
## Content
7055

7156
```bash
7257
├── demos # quick demo of how to use some functions
73-
├── dev # templates for experiment (will be moved out soon)
7458
├── docs # documentation
7559
├── manualTests # all the tests that cannot be automated (yet)
7660
├── src # actual code of the CPP_PTB
@@ -84,104 +68,6 @@ All the documentation is accessible [here](./docs/00-index.md).
8468
└── tests # all the tests that that can be run by github actions
8569
```
8670

87-
## How to install
88-
89-
### Download with git
90-
91-
```bash
92-
cd fullpath_to_directory_where_to_install
93-
# use git to download the code
94-
git clone https://github.com/cpp-lln-lab/CPP_PTB.git
95-
# move into the folder you have just created
96-
cd CPP_PTB
97-
```
98-
99-
Then get the latest commit to stay up to date:
100-
101-
```bash
102-
# from the directory where you downloaded the code
103-
git pull origin master
104-
```
105-
106-
To work with a specific version, create a branch at a specific version tag
107-
number
108-
109-
```bash
110-
# creating and checking out a branch that will be called version1 at the version tag v1.0.0
111-
git checkout -b version1 v1.0.0
112-
```
113-
114-
### Add as a submodule
115-
116-
Add it as a submodule in the repo you are working on.
117-
118-
```bash
119-
cd fullpath_to_directory_where_to_install
120-
# use git to download the code
121-
git submodule add https://github.com/cpp-lln-lab/CPP_PTB.git
122-
```
123-
124-
To get the latest commit you then need to update the submodule with the
125-
information on its remote repository and then merge those locally.
126-
127-
```bash
128-
git submodule update --remote --merge
129-
```
130-
131-
Remember that updates to submodules need to be committed as well.
132-
133-
#### Example for submodule usage
134-
135-
So say you want to clone a repo that has some nested submodules, then you would
136-
type this to get the content of all the submodules at once (here with my
137-
experiment repo):
138-
139-
```bash
140-
git clone --recurse-submodules https://github.com/user_name/yourExperiment.git
141-
```
142-
143-
This would be the way to do it "by hand"
144-
145-
```bash
146-
# clone the repo
147-
git clone https://github.com/user_name/yourExperiment.git
148-
149-
# go into the directory
150-
cd yourExperiment
151-
152-
# initialize and get the content of the first level of submodules (CPP_PTB and CPP_BIDS)
153-
git submodule init
154-
git submodule update
155-
156-
# get the nested submodules JSONio and BIDS-matlab for CPP_BIDS
157-
git submodule foreach --recursive 'git submodule init'
158-
git submodule foreach --recursive 'git submodule update'
159-
```
160-
161-
### Direct download
162-
163-
Download the code. Unzip. And add to the matlab path.
164-
165-
Pick a specific version from
166-
[here](https://github.com/cpp-lln-lab/CPP_PTB/releases).
167-
168-
Or take
169-
[the latest commit](https://github.com/cpp-lln-lab/CPP_PTB/archive/master.zip) -
170-
NOT RECOMMENDED.
171-
172-
### Add CPP_PTB globally to the matlab path
173-
174-
This is NOT RECOMMENDED as this might create conflicts if you use different
175-
versions of CPP_PTB as sub-modules.
176-
177-
Also note that this might not work at all if you have not set a command line
178-
alias to start Matlab from a terminal window by just typing `matlab`. :wink:
179-
180-
```bash
181-
# from within the CPP_PTB folder
182-
matlab -nojvm -nosplash -r "addpath(genpath(fullfile(pwd, 'src'))); savepath(); path(); exit();"
183-
```
184-
18571
## Code style guide
18672

18773
We use the `camelCase` to more easily differentiates our functions from the ones
@@ -209,7 +95,7 @@ We use the
20995
to automatically fix some linting issues.
21096

21197
The code style and quality is also checked during the
212-
[continuous integration](./.travis.yml).
98+
[continuous integration](.github/workflows/miss_hit.yml).
21399

214100
## Unit tests
215101

0 commit comments

Comments
 (0)