Skip to content
This repository has been archived by the owner on May 18, 2021. It is now read-only.

azure pipeline

Alex Dastous edited this page Jul 6, 2020 · 6 revisions

Context

Given that Matlab has paid license, we need to use a local server (located at Polytechnique Montreal), running Matlab, that will run:

  • continuous integration (CI) for tests
  • documentation build

Getting started

CI tests

Docs build

The documentation is powered by MkDocs. It is built automatically on our local server for every push on the master branch. So, if you would like to update the docs and see how it looks before merging, you need to build the doc locally. See info below.

Build via Azure pipeline

The website to control Azure pipelines for shimming-toolbox is here.

Build locally

Do only once

pip install mkdocs

Do each time you wish to build the doc

Generate API documentation

matlab &

In matlab

st_repo = '<to_shimming-toolbox_repo>' ;
helpDocMd_repo = '<to_helpDocMd_repo>' ;
cd( st_repo ) ;
startup
cd( helpDocMd_repo ) ;
addpath( genpath( 'src' ) ) ;
src = Documentor.findfiles( st_repo ) ;

% Remove non-documentable files and non necessary files.
src = src( ~contains( src , fullfile( st_repo , '/tests' ) ) ) ;
src = src( src ~= fullfile( st_repo , 'Coils/Shim_Siemens/Shim_Prisma/ShimOpt_Prisma.m' ) ) ;
src = src( src ~= fullfile( st_repo , 'Coils/Shim_Siemens/Shim_Prisma/Shim_HGM_Prisma/ShimOpt_HGM_Prisma.m' ) ) ;
src = src( src ~= fullfile( st_repo , 'Coils/Shim_Siemens/Shim_Prisma/Shim_IUGM_Prisma_fit/ShimOpt_IUGM_Prisma_fit.m' ) ) ;
src = src( src ~= fullfile( st_repo , 'Ui/ShimUse.m' ) ) ;

Options.outputDir = fullfile( st_repo , '/docs/3_contributing/api-documentation' ) ;
mkdir( Options.outputDir ) ;
Dr = Documentor( src , Options ) ;
Dr.printdoc() ;

Build website (on the terminal)

cd <to_shimming-toolbox_repo>
mkdocs serve
go to http://127.0.0.1:8000 on your browser

Documentation