Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 16 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Documentation
=============
This is the documentation for the [MATLAB](https://github.com/RascalSoftware/RAT) and [Python](https://github.com/RascalSoftware/python-RAT) version of the RAT project.
This is the documentation for the [MATLAB](https://github.com/RascalSoftware/RAT) and [Python](https://github.com/RascalSoftware/python-RAT) versions of the RAT project.

Build docs
----------
Expand All @@ -12,6 +12,20 @@ in the requirements.txt.
conda activate RAT
pip install -r requirements.txt

In the terminal with access to the python executable
Download the appropriate version of RAT from the GitHub [release](https://github.com/RascalSoftware/RAT/releases) page, and unzip the contents into a folder called API (This folder should be in the root directory). For example on a Linux machine, the nightly can be downloaded as shown

wget https://github.com/RascalSoftware/RAT/releases/download/nightly/Linux.zip
unzip Linux.zip -d API/


To build the HTML docs, type the following into a terminal with access to the Python executable:

make html

[`matlabengine`](https://pypi.org/project/matlabengine/) is required to generate MATLAB code snippet outputs. If `matlabengine` is not installed, the outputs will be omitted and the following warning will be printed in the terminal:

UserWarning: Could not create output as MATLAB engine was not available

If the MATLAB code outputs are needed, install the appropriate `matlabengine` for your installed MATLAB

pip install matlabengine
4 changes: 3 additions & 1 deletion source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
import re
import os
import sys
import datetime
Expand All @@ -18,6 +17,9 @@
current_dir = os.path.dirname(os.path.abspath(__file__))
# matlab_src_dir is required for sphinxcontrib-matlabdomain
matlab_src_dir = os.path.abspath(os.path.join(current_dir, '..', 'API'))
if not os.path.isdir(matlab_src_dir) or not os.path.isfile(os.path.join(matlab_src_dir, 'version.txt')):
raise FileNotFoundError(f'A RAT MATLAB release could not be found in {matlab_src_dir}. '
'Please download and extract the RAT release to the API folder.')
sys.path.insert(0, matlab_src_dir)

import RATapi
Expand Down