|
1 | 1 | Documentation |
2 | 2 | ============= |
3 | | -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. |
| 3 | +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. The installation instruction provided here, assumes [conda](https://docs.conda.io/) is used to manage python packages, please adapt as needed for a different package manager. |
4 | 4 |
|
5 | 5 | Build docs |
6 | 6 | ---------- |
7 | 7 | The documentation should be built using the provided Sphinx make file. The reStructuredText source is in the source |
8 | 8 | folder while the build will be placed in a build folder. The build requires a python executable and the python packages |
9 | | -in the requirements.txt. |
| 9 | +in the requirements.txt. You need MATLAB version and python version or RAT software installed in your system. |
10 | 10 |
|
11 | | - conda create -n RAT python=3.9 |
12 | | - conda activate RAT |
13 | | - pip install -r requirements.txt |
| 11 | +```bash |
| 12 | + conda create -n RAT python=3.9 |
| 13 | + conda activate RAT |
| 14 | + pip install -r requirements.txt |
| 15 | +``` |
14 | 16 |
|
15 | | -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 |
| 17 | +You also must have `pandoc` installed to build the Python example Jupiter notebooks. See the installation instructions [here](https://pandoc.org/installing.html). If not previously installed system-wide, install [pandoc](https://pandoc.org/) using [conda](https://docs.conda.io/) as described in their [installation manual](https://pandoc.org/installing.html#conda-forge) |
| 18 | +depending on [conda](https://docs.conda.io/) flavour you are using. |
16 | 19 |
|
| 20 | +If you do not have RAT code on your machine, 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 located within RAT-documentation directory, alongside the **source** folder and main `make.bat` file (see below)). For example on a Linux machine, the nightly can be downloaded as shown: |
| 21 | + |
| 22 | +```bash |
| 23 | + cd path_to_rat_docs_folder |
17 | 24 | wget https://github.com/RascalSoftware/RAT/releases/download/nightly/Linux.zip |
18 | 25 | unzip Linux.zip -d API/ |
| 26 | +``` |
| 27 | + |
| 28 | +Where `path_to_rat_docs_folder` is the location where documentation is cloned or unpacked. |
| 29 | +If RAT is already present, you may create symbolic link to the existing` RAT` directory, e.g.: |
| 30 | + |
| 31 | +for Windows: |
| 32 | + |
| 33 | + cd path_to_rat_docs_folder |
| 34 | + mklink /j API path_to_matlab_rat_folder |
| 35 | + |
| 36 | +for linux/macOS: |
19 | 37 |
|
20 | | -You also must have `pandoc` installed to build the Python example Jupyter notebooks. See the installation instructions [here](https://pandoc.org/installing.html). |
| 38 | +```bash |
| 39 | + cd path_to_rat_docs_folder |
| 40 | + ln -s path_to_matlab_rat_folder API |
| 41 | +``` |
21 | 42 |
|
| 43 | +Where `path_to_rat_docs_folder` is the path to the RAT documentation repository and `path_to_matlab_rat_folder` is the path to the downloaded MATLAB RAT release |
| 44 | + |
| 45 | +[Python RAT API](https://github.com/RascalSoftware/python-RAT) should be installed on the same python virtual environment created earlier. Build process adds modules necessary for generating python documentation to the python modules search path. Look at [Python RAT repository](https://github.com/RascalSoftware/python-RAT/blob/main/README.md) for more information on how to build python API. |
22 | 46 |
|
23 | 47 | To build the HTML docs, type the following into a terminal with access to the Python executable: |
24 | 48 |
|
|
0 commit comments