Skip to content

Commit b8ba354

Browse files
committed
#7: Add guide how to edit the documentation
1 parent ffd1bac commit b8ba354

File tree

10 files changed

+152
-1
lines changed

10 files changed

+152
-1
lines changed

doc/changes/unreleased.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@
44

55
* #1: Added initial Project Setup
66
* #4; Initial documentation version with outline and first fragments
7-
* #6: Translate README to rst and split up sections
7+
* #6: Translate README to rst and split up sections
8+
* #7: Add guide how to edit the documentation

doc/how_edit_this_docu.rst

Lines changed: 142 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,142 @@
1+
How to edit this Documentation
2+
==============================
3+
4+
Edit locally
5+
------------
6+
7+
Requirements
8+
............
9+
10+
- Python >= 3.9
11+
- `Poetry`_ >= 2.0
12+
13+
Preparations
14+
............
15+
16+
1. Clone Repository:
17+
18+
.. code-block:: bash
19+
20+
git clone https://github.com/exasol/developer-documentation.git
21+
22+
2. Create Branch:
23+
24+
.. code-block:: bash
25+
26+
git switch -C documentation/my_awesome_branch
27+
28+
3. Create Poetry Environment:
29+
30+
.. code-block:: bash
31+
32+
poetry install
33+
34+
Edit documentation
35+
..................
36+
37+
1. Edit documentation in `doc` directory using `Sphinx reStructuredText`_
38+
39+
2. Build the Documentation locally:
40+
41+
.. code-block:: bash
42+
43+
poetry run nox -s doc:builds
44+
45+
3. Open the locally built Documentation in your Browser:
46+
47+
.. code-block:: bash
48+
49+
poetry run nox -s doc:open
50+
51+
4. When finished editing
52+
53+
.. code-block:: bash
54+
55+
git commit -m "My awesome change"
56+
git push origin documentation/my_awesome_branch
57+
58+
And finally create a PR on GitHub.
59+
60+
Edit in GitHub Codespaces
61+
-------------------------
62+
63+
Preparations
64+
............
65+
66+
1. Start a Codespace on GitHub
67+
68+
.. image:: images/codespace/start_codespace.png
69+
:alt: Start a Codespace on GitHub
70+
71+
2. Wait for Codespace to start (can take a few minutes)
72+
73+
.. image:: images/codespace/codespace.png
74+
:alt: Wait for Codespace to start (can take a few minutes)
75+
76+
3. Select the Terminal in Codespace, if not already selected
77+
78+
.. image:: images/codespace/terminal_codespace.png
79+
:alt: Select the Terminal in Codespace, if not already selected
80+
81+
4. Wait for the installation of poetry
82+
83+
.. image:: images/codespace/poetry_installation.png
84+
:alt: Wait for the installation of poetry
85+
86+
5. Create Branch:
87+
88+
.. code-block:: bash
89+
90+
git switch -C documentation/my_awesome_branch
91+
92+
6. Create Poetry Environment:
93+
94+
.. code-block:: bash
95+
96+
poetry install
97+
98+
Edit documentation
99+
..................
100+
101+
4. Edit Documentation in `doc` directory using `Sphinx reStructuredText`_
102+
103+
5. Build the Documentation:
104+
105+
.. code-block:: bash
106+
107+
poetry run nox -s doc:builds
108+
109+
6. Serve the Documentation:
110+
111+
.. code-block:: bash
112+
113+
poetry run nox -s doc:serve &> /dev/null &
114+
115+
6. Forward port on Codespace and open the served Documentation:
116+
117+
.. image:: images/codespace/forward_port.png
118+
:alt: Forward port on Codespace and open the served Documentation
119+
120+
7. When finished editing
121+
122+
.. code-block:: bash
123+
124+
git commit -m "My awesome change"
125+
git push origin documentation/my_awesome_branch
126+
127+
And finally create a PR on GitHub.
128+
129+
Stopping or deleting a Codespace
130+
................................
131+
132+
Codespace can cause costs, so stoping or deleting them after use is a good idea.
133+
134+
1. Go to the `Codespace page <https://github.com/codespaces/>`_
135+
136+
2. Stopping or deleting a Codespace
137+
138+
.. image:: images/codespace/stop_codespace.png
139+
:alt: Stopping or deleting a Codespace
140+
141+
.. _Poetry: https://python-poetry.org/docs/#installing-with-pipx
142+
.. _Sphinx reStructuredText: https://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html

doc/images/codespace/codespace.png

135 KB
Loading
156 KB
Loading
144 KB
Loading
242 KB
Loading
196 KB
Loading
151 KB
Loading

doc/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,5 @@ Documentation and resources for data scientists and programmatic users to perfor
1414
environments
1515
integrations
1616
faq
17+
how_edit_this_docu
1718
changes/changelog

noxfile.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
11
import nox
2+
import os
3+
import sys
24

35
# imports all nox task provided by the toolbox
46
from exasol.toolbox.nox.tasks import *
57

68
# default actions to be run if nothing is explicitly specified with the -s option
79
nox.options.sessions = ["project:fix"]
10+
11+
12+
@nox.session(python=False, name="doc:serve")
13+
def serve_docs(session):
14+
session.run(sys.executable, "-m", "http.server", "9000", "--directory", ".html-documentation")

0 commit comments

Comments
 (0)