Skip to content

Commit 46b475f

Browse files
authored
Merge pull request #180 from cpp-lln-lab/dev
[FIX] apply patch end of line extra tab
2 parents 269aa60 + 7764ad6 commit 46b475f

39 files changed

+278
-267
lines changed

.github/workflows/bids_validator.yml

+5-9
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
branches:
66
- master
77
pull_request:
8-
branches: 'master'
8+
branches: ['master']
99

1010
env:
1111
OCTFLAGS: --no-gui --no-window-system --silent
@@ -23,27 +23,23 @@ jobs:
2323
- name: Make jsonread for octave
2424
run: |
2525
sudo apt-get -y -qq update
26-
sudo apt-get -y install octave
26+
sudo apt-get -y install octave
2727
sudo apt-get -y install liboctave-dev
2828
cd lib/JSONio
2929
mkoctfile --mex jsonread.c jsmn.c -DJSMN_PARENT_LINKS
3030
cd ..
3131
3232
- name: Update octave path
3333
run: |
34+
octave $OCTFLAGS --eval "addpath(pwd); savepath();"
3435
octave $OCTFLAGS --eval "addpath(genpath(fullfile(pwd, 'lib'))); savepath();"
35-
octave $OCTFLAGS --eval "addpath(genpath(fullfile(pwd, 'src'))); savepath();"
36+
octave $OCTFLAGS --eval "addpath(genpath(fullfile(pwd, 'src'))); savepath();"
3637
3738
- name: Install BIDS validator
3839
run: |
3940
sudo npm install -g [email protected]
4041
41-
- name: Create dummy dataset and validate it
42+
- name: Create dummy dataset and validate it
4243
run: |
4344
cd tests/manualTests
4445
octave $OCTFLAGS --eval "test_makeRawDataset" && bids-validator `pwd`/output/raw/ --ignoreNiftiHeaders
45-
46-
47-
48-
49-

.github/workflows/check_markdown.yml

-34
This file was deleted.

.github/workflows/check_md_links.yml

+2-2
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

+1-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@ on:
55
branches:
66
- master
77
pull_request:
8-
branches: '*'
9-
8+
branches: ['*']
109
jobs:
1110
build:
1211

.github/workflows/run_tests.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
- master
77
- dev
88
pull_request:
9-
branches: '*'
9+
branches: ['*']
1010

1111
jobs:
1212
build:
@@ -21,7 +21,7 @@ jobs:
2121
- name: Make jsonread for octave
2222
run: |
2323
sudo apt-get -y -qq update
24-
sudo apt-get -y install octave
24+
sudo apt-get -y install octave
2525
sudo apt-get -y install liboctave-dev
2626
cd lib/JSONio
2727
mkoctfile --mex jsonread.c jsmn.c -DJSMN_PARENT_LINKS
@@ -30,7 +30,7 @@ jobs:
3030
uses: joergbrech/moxunit-action@master
3131
with:
3232
tests: tests # files or directories containing the MOxUnit test cases
33-
src: src # directories to be added to the Octave search path before running the tests.
33+
src: src # directories to be added to the Octave search path before running the tests.
3434
ext: tests/utils # External resources to add to the search put (excluded from coverage)
3535
# data: # Directory for test data
3636
with_coverage: true

.pre-commit-config.yaml

+44
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

+1-1
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

.remarkrc

-11
This file was deleted.

.travis.yml

-48
This file was deleted.

.zenodo.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,4 @@
3232
],
3333
"license": "MIT license",
3434
"upload_type": "software"
35-
}
35+
}

README.md

-4
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,6 @@
1919

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

22-
**BIDS validator and linter**
23-
24-
[![Build Status](https://travis-ci.com/cpp-lln-lab/CPP_BIDS.svg?branch=master)](https://travis-ci.com/cpp-lln-lab/CPP_BIDS)
25-
2622
**Contributors**
2723

2824
[![All Contributors](https://img.shields.io/badge/all_contributors-3-orange.svg?style=flat-square)](#contributors-)

binder/postBuild

-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
cd ${HOME}
22
cd lib/JSONio; mkoctfile --mex jsonread.c jsmn.c -DJSMN_PARENT_LINKS; cd ..
3-

checkCppBidsDependencies.m

+65
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
% (C) Copyright 2020 CPP_BIDS developers
2+
3+
function checkCppBidsDependencies(cfg)
4+
%
5+
% Adds dependencies to the Matlab / Octave path and make sure we got all of them.
6+
%
7+
% USAGE::
8+
%
9+
% checkCppBidsDependencies(cfg)
10+
%
11+
% :param cfg: Configuration. See ``checkCFG()``.
12+
% :type cfg: structure
13+
14+
if nargin < 1
15+
cfg.verbose = 2;
16+
end
17+
18+
global CPP_BIDS_INITIALIZED
19+
20+
if isempty(CPP_BIDS_INITIALIZED)
21+
22+
GITHUB_WORKSPACE = getenv('GITHUB_WORKSPACE');
23+
24+
if strcmp(GITHUB_WORKSPACE, '/github/workspace')
25+
26+
pth = GITHUB_WORKSPACE;
27+
addpath(genpath(fullfile(pth, 'lib')));
28+
29+
elseif isempty(GITHUB_WORKSPACE) % local
30+
31+
pth = fullfile(fileparts(mfilename('fullpath')));
32+
33+
addpath(pth);
34+
35+
addpath(fullfile(pth, 'lib', 'utils'));
36+
37+
checkSubmodule(fullfile(pth, 'lib', 'JSONio'));
38+
checkSubmodule(fullfile(pth, 'lib', 'bids-matlab'));
39+
40+
addpath(genpath(fullfile(pth, 'src')));
41+
42+
end
43+
44+
printCreditsCppBids(cfg);
45+
46+
CPP_BIDS_INITIALIZED = true();
47+
48+
else
49+
fprintf(1, '\n\nCPP_BIDS already initialized\n\n');
50+
51+
end
52+
53+
end
54+
55+
function checkSubmodule(pth)
56+
% If external dir is empty throw an exception
57+
% and ask user to update submodules.
58+
if numel(dir(pth)) <= 2 % Means that the external is empty
59+
error(['Git submodules are not cloned!', ...
60+
'Try this in your terminal:', ...
61+
' git submodule update --recursive ']);
62+
else
63+
addpath(pth);
64+
end
65+
end

docs/Makefile

+3
Original file line numberDiff line numberDiff line change
@@ -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

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
3232
# ones.
3333
extensions = [
34-
'sphinxcontrib.matlab',
34+
'sphinxcontrib.matlab',
3535
'sphinx.ext.autodoc']
3636
matlab_src_dir = os.path.dirname(os.path.abspath('../../src'))
3737
primary_domain = 'mat'
@@ -88,4 +88,4 @@
8888
'searchbox.html',
8989
'donate.html',
9090
]
91-
}
91+
}

docs/source/contributing.rst

+1-4
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ Template proposal
4848

4949
end
5050

51-
.. autofunction:: templateFunction
51+
.. autofunction:: templateFunction
5252

5353

5454
Example code in the help section
@@ -100,6 +100,3 @@ Example code in the help section
100100
end
101101

102102
.. autofunction:: templateFunctionExample
103-
104-
105-

0 commit comments

Comments
 (0)