gamsjupyter01.gms : Test GAMS Jupyter Notebooks

Description

Contributor: Clemens Westphal, September 2020)


Small Model of Type : GAMS


Category : GAMS Test library


Main file : gamsjupyter01.gms

$TITLE 'Test GAMS Jupyter Notebooks' (GAMSJUPYTER01,SEQ=836)

$ontext
Contributor: Clemens Westphal, September 2020)
$offtext

$set srcRoot %gams.sysdir%apifiles%system.dirsep%Python%system.dirsep%
$set jupyterExamples %srcRoot%jupyter_examples%system.dirsep%
$                             set C ;
$if %system.filesys% == UNIX $set C :
$setEnv PYTHONPATH "%srcRoot%api_38%C%%srcRoot%gams"

$if not setenv JUPYTER $exit

$set pathPrefix PATH=$PATH
* Path to Jupyter conda env must be explicitly at beginning of path for new Windows Server 2022 container
$if "%sysenv.MSYS2_PATH_TYPE%"=="inherit" $set pathPrefix PATH=C:/Miniconda/envs/jupyter:$PATH

$call.checkErrorLevel cd . && %pathPrefix% "%sysenv.JUPYTER%" nbconvert --to notebook --execute "%jupyterExamples%DataTransform.ipynb" > DataTransform.log 2>&1
$call.checkErrorLevel cd . && %pathPrefix% "%sysenv.JUPYTER%" nbconvert --to notebook --execute "%jupyterExamples%Millco.ipynb" > Millco.log 2>&1

$if %DEMOSIZE% == 1 $exit

$call.checkErrorLevel cd . && %pathPrefix% "%sysenv.JUPYTER%" nbconvert --to notebook --execute "%jupyterExamples%Polyomino.ipynb" > Polyomino.log 2>&1
*$call.checkErrorLevel cd . && "%sysenv.JUPYTER%" nbconvert --to notebook --execute "%jupyterExamples%Pickstock.ipynb" > Pickstock.log 2>&1 #4270
$call.checkErrorLevel cd . && %pathPrefix% "%sysenv.JUPYTER%" nbconvert --to notebook --execute "%jupyterExamples%NordhausDice.ipynb" > NordhausDice.log 2>&1