Skip to content

Commit

Permalink
updated readme
Browse files Browse the repository at this point in the history
  • Loading branch information
lrdossan committed Nov 11, 2024
1 parent 4501800 commit 3646c5d
Show file tree
Hide file tree
Showing 3 changed files with 529 additions and 466 deletions.
39 changes: 34 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,19 +148,48 @@ python -m cern_caimira.apps.calculator --prefix=/mycalc

Each of these commands will start a local version of CAiMIRA, which can be visited at http://localhost:8080/.

### How to compile and read the documentation
### Documentation

In order to generate the documentation, CAiMIRA must be installed first with the `doc` optional dependencies:
To compile and view CAiMIRA's documentation, follow these steps:

### 1. Install CAiMIRA with Documentation Dependencies

First, ensure CAiMIRA is installed along with the `doc` dependencies:

```
cd caimira
pip install -e .[doc]
```

To generate the HTML documentation page, the command `make html` should be executed in the `caimira/src/caimira/calculator/docs` directory.
If any of the `.rst` files under the `caimira/docs` folder is changed, this command should be executed again.
### 2. Generate Code Documentation in Markdown

Use `sphinx` with `sphinx_markdown_builder` to generate the documentation in `Markdown` format:

```
cd docs/sphinx
sphinx-build -b markdown . _build/markdown
```

### 3. Customize and Organize Documentation

Run the `style_docs.py` script to apply custom styles, move required files, and generate a UML diagram:

```
python style_docs.py \
&& mv sphinx/_build/markdown/index.md mkdocs/docs/code_documentation/models.md \
&& pyreverse -o png -p UML-CAiMIRA --output-directory mkdocs/docs ../src/caimira/calculator/models/models.py
```

### 4. Start the documentation server

To view the documentation locally, use MkDocs to serve it:

```
cd ../mkdocs
python -m mkdocs serve --dev-addr=0.0.0.0:8080
```

Then, right click on `caimira/src/caimira/calculator/docs/_build/html/index.html` and select `Open with` your preferred web browser.
The documentation can now be accessed at [http://0.0.0.0:8080/](http://0.0.0.0:8080/).

### Running the CAiMIRA Expert-App or CO2-App apps in development mode

Expand Down
Loading

0 comments on commit 3646c5d

Please sign in to comment.