Skip to content

Commit

Permalink
Merge pull request #201 from cpp-lln-lab/dev
Browse files Browse the repository at this point in the history
[REL] 1.3.0
  • Loading branch information
Remi-Gau authored Nov 2, 2022
2 parents 028bda7 + 1de9e72 commit a29370a
Show file tree
Hide file tree
Showing 86 changed files with 1,059 additions and 427 deletions.
5 changes: 5 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
template: |
## Release Notes
## CHANGES
$CHANGES
1 change: 1 addition & 0 deletions .github/workflows/check_md_links.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
push:
branches:
- master
- dev
pull_request:
branches: ['*']

Expand Down
42 changes: 0 additions & 42 deletions .github/workflows/miss_hit.yml

This file was deleted.

9 changes: 7 additions & 2 deletions .github/workflows/run_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,34 @@ on:
push:
branches:
- master
- dev
pull_request:
branches: ['*']

jobs:

build:
runs-on: ubuntu-latest

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

- name: MOxUnit Action
uses: joergbrech/moxunit-action@v1.2.0
with:
tests: tests
src: src
with_coverage: true
cover_xml_file: coverage.xml

- name: Code coverage
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos
file: coverage.xml # optional
flags: unittests # optional
name: codecov-umbrella # optional
fail_ci_if_error: true # optional (default = false)
fail_ci_if_error: false # optional (default = false)
49 changes: 41 additions & 8 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,21 +1,54 @@
*DS_Store

*.m~
*octave-workspace

.vscode/*

# exclude content of logfiles folders
*.tsv

*.mat
check_my_code_report.txt

# exclude content of files for virtual env (mostly for the doc)
cpp_ptb
env

# ignore file created by sphynx
/docs/build

# exclude node js stuff
node_modules/*
package-lock.json
# exclude temp files from tests and coverage
test_report.log
*coverage*

## MATLAB / OCTAVE gitignore template

# From : https://github.com/github/gitignore/blob/master/Global/MATLAB.gitignore

# Windows default autosave extension
*.asv

# OSX / *nix default autosave extension
*.m~

# Compiled MEX binaries (all platforms)
*.mex*

# Packaged app and toolbox files
*.mlappinstall
*.mltbx

# Generated helpsearch folders
helpsearch*/

# Simulink code generation folders
slprj/
sccprj/

# Matlab code generation folders
codegen/

# Simulink autosave extension
*.autosave

# Simulink cache files
*.slxc

# Octave session info
octave-workspace
37 changes: 0 additions & 37 deletions .zenodo.json

This file was deleted.

56 changes: 56 additions & 0 deletions CITATION.cff
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
cff-version: 1.2.0

title: "CPP PTB"

version: 1.3.0

abstract: a set of function to make it easier to create behavioral, EEG, fMRI experiment with psychtoolbox .

message: "If you use this software, please cite it as below."

repository-code: "https://github.com/cpp-lln-lab/CPP_PTB"

identifiers:
- description: This is the collection of archived snapshots of all releases of CPP PTB
type: doi
value: "10.5281/zenodo.4007672"

contact:
- affiliation: "Université catholique de Louvain"
email: remi.gau@uclouvain.be
family-names: Gau
given-names: Rémi

authors:
- family-names: "Gau"
given-names: "Rémi"
orcid: "https://orcid.org/0000-0002-1535-9767"
affiliation: "Université catholique de Louvain"

- family-names: "Barilari"
given-names: "Marco"
orcid: "https://orcid.org/0000-0002-3313-3120"
affiliation: "Université catholique de Louvain"

- family-names: "Battal"
given-names: "Ceren"
orcid: "https://orcid.org/0000-0002-9844-7630"
affiliation: "Université catholique de Louvain"

- family-names: "Falagiarda"
given-names: "Federica"
orcid: "https://orcid.org/0000-0001-7844-1605"
affiliation: "Université catholique de Louvain"

- family-names: "Shahzad"
given-names: "Iqra"
orcid: "https://orcid.org/0000-0002-8724-7668"
affiliation: "Université catholique de Louvain"

license: MIT license

keywords:
- PsychToolBox
- neuroscience
- MATLAB
- Octave
18 changes: 18 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# TODO make more general to use the local matlab version
MATLAB = /usr/local/MATLAB/R2017a/bin/matlab
ARG = -nodisplay -nosplash -nodesktop

lint:
mh_style --fix && mh_metric --ci && mh_lint

test:
$(MATLAB) $(ARG) -r "runTests; exit()"

version.txt: CITATION.cff
grep -w "^version" CITATION.cff | sed "s/version: /v/g" > version.txt

validate_cff: CITATION.cff
cffconvert --validate

manual:
cd docs && sh create_manual.sh
72 changes: 13 additions & 59 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,40 +1,17 @@
<!-- lint disable -->

**Documentation**

[![Documentation Status: stable](https://readthedocs.org/projects/cpp-ptb/badge/?version=stable)](https://cpp-ptb.readthedocs.io/en/stable/?badge=stable)

**Cite it**

[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.4007672.svg)](https://doi.org/10.5281/zenodo.4007672)

**Unit tests and coverage**

[![](https://img.shields.io/badge/Octave-CI-blue?logo=Octave&logoColor=white)](https://github.com/cpp-lln-lab/CPP_PTB/actions)
![](https://github.com/cpp-lln-lab/CPP_PTB/workflows/CI/badge.svg)

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

**Contributors**

<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
[![All Contributors](https://img.shields.io/badge/all_contributors-5-orange.svg?style=flat-square)](#contributors-)
<!-- ALL-CONTRIBUTORS-BADGE:END -->

# CPP_PTB

<!-- TOC -->

- [CPP_PTB](#cpp_ptb)
- [Documentation](#documentation)
- [Content](#content)
- [Code style guide](#code-style-guide)
- [Unit tests](#unit-tests)
- [Contributors ✨](#contributors-)

<!-- /TOC -->

<!-- lint enable -->
- [CPP_PTB](#cpp_ptb)
- [Documentation](#documentation)
- [Content](#content)
- [Contributing](#contributing)
- [Contributors ✨](#contributors-)

This is the Crossmodal Perception and Plasticity lab (CPP) PsychToolBox (PTB)
toolbox.
Expand Down Expand Up @@ -64,39 +41,16 @@ All the documentation and installtion information is accessible
└── tests # all the tests that that can be run by github actions
```

## Code style guide

We use the `camelCase` to more easily differentiates our functions from the ones
from PTB that use a `PascalCase`.

In practice, we use the following regular expression for function names:
`[a-z]+(([A-Z]|[0-9]){1}[a-z]+)*`.

> Regular expressions look scary but are SUPER useful to sort through filenames:
>
> - A quick [intro to regular expression](https://www.rexegg.com/)
>
> - And many websites allow you to "design and test" your regular expression:
> - [regexper](https://regexper.com/#%5Ba-z%5D%2B%28%28%5BA-Z%5D%7C%5B0-9%5D%29%7B1%7D%5Ba-z%5D%2B%29)
> - ...
We keep the McCabe complexity below 15 as reported by the
[check_my_code function](https://github.com/Remi-Gau/check_my_code) or the
[MISS_HIT code checker](https://florianschanda.github.io/miss_hit). A couple of
code quality metrics are also checked automatically by MISS_HIT (avoiding
functions with too many nested `if` blocks).

We use the
[MISS_HIT linter](https://florianschanda.github.io/miss_hit/style_checker.html)
to automatically fix some linting issues.

The code style and quality is also checked during the
[continuous integration](.github/workflows/miss_hit.yml).
## Contributing

## Unit tests
Feel free to open issues to report a bug and ask for improvements.

Unit tests are run with the mox unit toolbox and automated with github action on
Octave.
If you want to contribute, have a look at our
[contributing guidelines](https://github.com/cpp-lln-lab/.github/blob/main/CONTRIBUTING.md)
that are meant to guide you and help you get started. If something is not clear
or you get stuck: it is more likely we did not do good enough a job at
explaining things. So do not hesitate to open an issue, just to ask for
clarification.

## Contributors ✨

Expand Down
Loading

0 comments on commit a29370a

Please sign in to comment.