Skip to content

Commit 2f6d813

Browse files
committed
ADD-FIX: minor infos to documentation
1 parent 8c3e62e commit 2f6d813

File tree

2 files changed

+32
-15
lines changed

2 files changed

+32
-15
lines changed

.github/workflows/documentation.yml

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -71,17 +71,21 @@ jobs:
7171
auto-update-conda: true
7272
python-version: 3.9.1
7373

74-
- name: Restore conda environment cache
75-
uses: actions/cache@v2
76-
with:
77-
path: C:\Miniconda\envs\diff_check
78-
key: ${{ runner.os }}-conda-${{ hashFiles('environment.yml') }}
79-
restore-keys: |
80-
${{ runner.os }}-conda-
74+
# - name: Restore conda environment cache
75+
# uses: actions/cache@v2
76+
# with:
77+
# path: C:\Miniconda\envs\diff_check
78+
# key: ${{ runner.os }}-conda-${{ hashFiles('environment.yml') }}
79+
# restore-keys: |
80+
# ${{ runner.os }}-conda-
8181

82-
# - name: Activate diff_check conda environment
83-
# run: |
84-
# conda activate diff_check
82+
- name: Create diff_check conda environment
83+
run: |
84+
conda env create -f environment.yml
85+
86+
- name: Activate diff_check conda environment
87+
run: |
88+
conda activate diff_check
8589
8690
- name: Download dlls/pyd artifacts
8791
uses: actions/download-artifact@v2
@@ -106,8 +110,7 @@ jobs:
106110
107111
- name: Sphinx build
108112
run: |
109-
conda activate diff_check
110-
sphinx-build doc _build
113+
conda run --name diff_check --no-capture-output sphinx-build doc _build
111114
working-directory: ${{github.workspace}}
112115

113116

doc/documentation.md

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,20 @@
33

44
In DF we use `Sphinx` to generate the documentation. The documentation is written in `reStructuredText` and `Markdown` and the source files are located in the `doc` folder. The documentation is hosted on `ReadTheDocs` and is automatically updated when a new commit is pushed to the `main` branch.
55

6+
## Build locally
7+
8+
To build locally the documentation to test your changes:
9+
```console
10+
invoke documentize
11+
```
12+
and to open the documentation in your browser:
13+
```console
14+
start _build/html/index.html
15+
```
16+
If you modify the `doc`s files and refresh the pages updates will be visible.
17+
18+
## Contribute to the documentation
19+
620
Follow these guides to contribute to the documentation whether you:
721

822
- add a new [GHComponents](ghcomp_doc_g)
@@ -11,7 +25,7 @@ Follow these guides to contribute to the documentation whether you:
1125

1226
---
1327
(ghcomp_doc_g)=
14-
## `GHComponent`'s docs
28+
### ✔️ `GHComponent`'s docs
1529

1630
If you write a new [GHComponents](gh_components.rst) you will most probably already have created and filled a `metadata.json` file. DF uses this file to automatically generate the documentation for the GHComponents. The only thing you need to do is:
1731
* add a new `.rst` file with the name of the component like `gh_DFComponentName.rst`
@@ -24,7 +38,7 @@ Our custom sphinx extension `sphinx_ghcomponent_parser` will automatically parse
2438
2539
2640
(pyapi_doc_g)=
27-
## `Python API`'s docs
41+
### ☑️ `Python API`'s docs
2842
2943
For [Python API documentation](diffCheck_PythonAPI), we use `sphinx-apidoc` to automatically generate the API documentation so the only thing to do is to add beautiful docstrings to the Python code with the following reStructuredText (reST) format style:
3044
@@ -44,7 +58,7 @@ For [Python API documentation](diffCheck_PythonAPI), we use `sphinx-apidoc` to a
4458
```
4559

4660
(tutorial_doc_g)=
47-
## `DF Tutorial`'s docs
61+
### `DF Tutorial`'s docs
4862

4963
If you need to add a new page to the [tutorials](tutorials.rst) (e.g. a [new tutorial](tutorials.rst)), you can do so by adding a new `.rst` file in the `doc` folder and linking it in the `tutorials.rst` file's toctree:
5064

0 commit comments

Comments
 (0)