Skip to content

Commit

Permalink
Merge pull request #180 from cpp-lln-lab/dev
Browse files Browse the repository at this point in the history
[FIX] apply patch end of line extra tab
  • Loading branch information
Remi-Gau authored Oct 28, 2021
2 parents 269aa60 + 7764ad6 commit 46b475f
Show file tree
Hide file tree
Showing 39 changed files with 278 additions and 267 deletions.
14 changes: 5 additions & 9 deletions .github/workflows/bids_validator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
branches:
- master
pull_request:
branches: 'master'
branches: ['master']

env:
OCTFLAGS: --no-gui --no-window-system --silent
Expand All @@ -23,27 +23,23 @@ jobs:
- name: Make jsonread for octave
run: |
sudo apt-get -y -qq update
sudo apt-get -y install octave
sudo apt-get -y install octave
sudo apt-get -y install liboctave-dev
cd lib/JSONio
mkoctfile --mex jsonread.c jsmn.c -DJSMN_PARENT_LINKS
cd ..
- name: Update octave path
run: |
octave $OCTFLAGS --eval "addpath(pwd); savepath();"
octave $OCTFLAGS --eval "addpath(genpath(fullfile(pwd, 'lib'))); savepath();"
octave $OCTFLAGS --eval "addpath(genpath(fullfile(pwd, 'src'))); savepath();"
octave $OCTFLAGS --eval "addpath(genpath(fullfile(pwd, 'src'))); savepath();"
- name: Install BIDS validator
run: |
sudo npm install -g bids-validator@1.6.2
- name: Create dummy dataset and validate it
- name: Create dummy dataset and validate it
run: |
cd tests/manualTests
octave $OCTFLAGS --eval "test_makeRawDataset" && bids-validator `pwd`/output/raw/ --ignoreNiftiHeaders



34 changes: 0 additions & 34 deletions .github/workflows/check_markdown.yml

This file was deleted.

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

jobs:
markdown-link-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: gaurav-nelson/github-action-markdown-link-check@v1
- uses: gaurav-nelson/github-action-markdown-link-check@v1
3 changes: 1 addition & 2 deletions .github/workflows/miss_hit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ on:
branches:
- master
pull_request:
branches: '*'

branches: ['*']
jobs:
build:

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/run_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
- master
- dev
pull_request:
branches: '*'
branches: ['*']

jobs:
build:
Expand All @@ -21,7 +21,7 @@ jobs:
- name: Make jsonread for octave
run: |
sudo apt-get -y -qq update
sudo apt-get -y install octave
sudo apt-get -y install octave
sudo apt-get -y install liboctave-dev
cd lib/JSONio
mkoctfile --mex jsonread.c jsmn.c -DJSMN_PARENT_LINKS
Expand All @@ -30,7 +30,7 @@ jobs:
uses: joergbrech/moxunit-action@master
with:
tests: tests # files or directories containing the MOxUnit test cases
src: src # directories to be added to the Octave search path before running the tests.
src: src # directories to be added to the Octave search path before running the tests.
ext: tests/utils # External resources to add to the search put (excluded from coverage)
# data: # Directory for test data
with_coverage: true
Expand Down
44 changes: 44 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
repos:

- repo: local

hooks:

- id: mh_version
name: mh_version
entry: mh_style
args: [-v]
verbose: true
language: python
additional_dependencies: [miss_hit_core]

# - id: mh_style
# name: mh_style
# entry: mh_style
# args: [--process-slx, --fix]
# files: ^(.*\.(m|slx))$
# language: python
# additional_dependencies: [miss_hit_core]

# - id: mh_metric
# name: mh_metric
# entry: mh_metric
# args: [--ci]
# files: ^(.*\.(m|slx))$
# language: python
# additional_dependencies: [miss_hit_core]

# - id: mh_lint
# name: mh_lint
# entry: mh_lint
# files: ^(.*\.(m|slx))$
# language: python
# additional_dependencies: [miss_hit]

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files
2 changes: 1 addition & 1 deletion .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ formats:
python:
version: 3.7
install:
- requirements: requirements.txt
- requirements: requirements.txt
11 changes: 0 additions & 11 deletions .remarkrc

This file was deleted.

48 changes: 0 additions & 48 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .zenodo.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@
],
"license": "MIT license",
"upload_type": "software"
}
}
4 changes: 0 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,6 @@

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

**BIDS validator and linter**

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

**Contributors**

[![All Contributors](https://img.shields.io/badge/all_contributors-3-orange.svg?style=flat-square)](#contributors-)
Expand Down
1 change: 0 additions & 1 deletion binder/postBuild
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
cd ${HOME}
cd lib/JSONio; mkoctfile --mex jsonread.c jsmn.c -DJSMN_PARENT_LINKS; cd ..

65 changes: 65 additions & 0 deletions checkCppBidsDependencies.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
% (C) Copyright 2020 CPP_BIDS developers

function checkCppBidsDependencies(cfg)
%
% Adds dependencies to the Matlab / Octave path and make sure we got all of them.
%
% USAGE::
%
% checkCppBidsDependencies(cfg)
%
% :param cfg: Configuration. See ``checkCFG()``.
% :type cfg: structure

if nargin < 1
cfg.verbose = 2;
end

global CPP_BIDS_INITIALIZED

if isempty(CPP_BIDS_INITIALIZED)

GITHUB_WORKSPACE = getenv('GITHUB_WORKSPACE');

if strcmp(GITHUB_WORKSPACE, '/github/workspace')

pth = GITHUB_WORKSPACE;
addpath(genpath(fullfile(pth, 'lib')));

elseif isempty(GITHUB_WORKSPACE) % local

pth = fullfile(fileparts(mfilename('fullpath')));

addpath(pth);

addpath(fullfile(pth, 'lib', 'utils'));

checkSubmodule(fullfile(pth, 'lib', 'JSONio'));
checkSubmodule(fullfile(pth, 'lib', 'bids-matlab'));

addpath(genpath(fullfile(pth, 'src')));

end

printCreditsCppBids(cfg);

CPP_BIDS_INITIALIZED = true();

else
fprintf(1, '\n\nCPP_BIDS already initialized\n\n');

end

end

function checkSubmodule(pth)
% If external dir is empty throw an exception
% and ask user to update submodules.
if numel(dir(pth)) <= 2 % Means that the external is empty
error(['Git submodules are not cloned!', ...
'Try this in your terminal:', ...
' git submodule update --recursive ']);
else
addpath(pth);
end
end
3 changes: 3 additions & 0 deletions docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,6 @@ help:
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

doc:
@$(SPHINXBUILD) -b html "$(SOURCEDIR)" "$(BUILDDIR)"
4 changes: 2 additions & 2 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'sphinxcontrib.matlab',
'sphinxcontrib.matlab',
'sphinx.ext.autodoc']
matlab_src_dir = os.path.dirname(os.path.abspath('../../src'))
primary_domain = 'mat'
Expand Down Expand Up @@ -88,4 +88,4 @@
'searchbox.html',
'donate.html',
]
}
}
5 changes: 1 addition & 4 deletions docs/source/contributing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ Template proposal

end

.. autofunction:: templateFunction
.. autofunction:: templateFunction


Example code in the help section
Expand Down Expand Up @@ -100,6 +100,3 @@ Example code in the help section
end

.. autofunction:: templateFunctionExample



Loading

0 comments on commit 46b475f

Please sign in to comment.