Skip to content

Commit 0bda25a

Browse files
authored
Updated readme with modern guidelines on how to build docs (#51)
1 parent ac36091 commit 0bda25a

File tree

1 file changed

+31
-7
lines changed

1 file changed

+31
-7
lines changed

README.md

Lines changed: 31 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,48 @@
11
Documentation
22
=============
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.
44

55
Build docs
66
----------
77
The documentation should be built using the provided Sphinx make file. The reStructuredText source is in the source
88
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.
1010

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+
```
1416

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.
1619

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
1724
wget https://github.com/RascalSoftware/RAT/releases/download/nightly/Linux.zip
1825
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:
1937

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+
```
2142

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.
2246

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

0 commit comments

Comments
 (0)