Skip to content

Commit 1d94a3f

Browse files
authored
Merge pull request #21 from lyudmil-pelov/main
documentation setup guide
2 parents a0e0fbc + cf9f614 commit 1d94a3f

File tree

4 files changed

+71
-5
lines changed

4 files changed

+71
-5
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ __pycache__/
1010
.Python
1111
env/
1212
build/
13+
docs/build/
14+
docs/docs_html/
1315
develop-eggs/
1416
dist/
1517
downloads/
@@ -24,6 +26,7 @@ wheels/
2426
*.egg-info/
2527
.installed.cfg
2628
*.egg
29+
ads_latest.zip
2730

2831
# PyInstaller
2932
# Usually these files are written by a python script from a template

docs/README.md

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# Documentation
2+
3+
## Getting Started
4+
5+
Setup Conda.
6+
7+
```bash
8+
curl https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -o Miniconda3-latest-Linux-x86_64.sh
9+
bash Miniconda3-latest-Linux-x86_64.sh
10+
```
11+
12+
Create conda environment.
13+
14+
```bash
15+
conda create -n ads-docs python=3.8
16+
conda activate ads-docs
17+
```
18+
19+
Install relevant development packages.
20+
21+
```bash
22+
pip install -r requirements.txt
23+
```
24+
25+
## Developing Docs With Live Reload
26+
27+
Start live-reload during the development face
28+
29+
```bash
30+
sphinx-autobuild source/ build/
31+
```
32+
33+
Open in the browser [http://127.0.0.1:8000]
34+
35+
## Build
36+
37+
To build and create the html documentation, run the following in the `docs/` folder.
38+
39+
```bash
40+
sphinx-build -b html source/ docs_html/
41+
```
42+
43+
To `zip` the content of the html docs
44+
45+
```bash
46+
zip -r ads-latest.zip docs_html/.
47+
```
48+
49+
## Notes
50+
51+
- the `source/conf.py` defines most everything for the docs
52+
- the `ads.rst` was auto-generated but then hand edited to remove tests package
53+
54+
## Contribute
55+
56+
Now you can make updates to the docs and contributed via PRs.

docs/requirements.txt

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
1-
-e .
21
autodoc
32
nbsphinx
43
sphinx
54
sphinxcontrib-napoleon
65
sphinx-rtd-theme
6+
sphinx_copybutton
7+
oracle_ads
8+
sphinx-autobuild
9+
IPython
710
pandoc
8-
sphinx-copybutton
11+
rstcheck
12+
restructuredtext_lint
13+
doc8

docs/source/conf.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
import os
77
import sys
88

9-
autoclass_content = "both" ##This causes documentation within the __init__ method to be pulled into the documentation properly
9+
# This causes documentation within the __init__ method to be pulled into the documentation properly
10+
autoclass_content = "both"
1011

1112
sys.path.insert(0, os.path.abspath("../../advanced-ds"))
1213

@@ -30,7 +31,7 @@
3031
"sphinx.ext.graphviz",
3132
"sphinx.ext.inheritance_diagram",
3233
"nbsphinx",
33-
"sphinx_copybutton",
34+
"sphinx_copybutton"
3435
]
3536

3637
# Add any paths that contain templates here, relative to this directory.
@@ -55,7 +56,8 @@
5556
# List of patterns, relative to source directory, that match files and
5657
# directories to ignore when looking for source files.
5758
# This pattern also affects html_static_path and html_extra_path.
58-
exclude_patterns = []
59+
# exclude_patterns = []
60+
exclude_patterns = ['build', '**.ipynb_checkpoints']
5961

6062
# The name of the Pygments (syntax highlighting) style to use.
6163
pygments_style = None

0 commit comments

Comments
 (0)