Skip to content

Commit 2970e96

Browse files
authored
Merge pull request #12 from Elliria/update_the_readme
Update README.md
2 parents d2a511b + b2d166e commit 2970e96

File tree

2 files changed

+100
-55
lines changed

2 files changed

+100
-55
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@
66
- Update the "Maintenance of GitHub Actions" section in the [README.md](https://github.com/autokey/autokey.github.io/blob/master/README.md) file.
77
- Bump action versions in the [pages.yml](https://github.com/autokey/autokey.github.io/blob/master/.github/workflows/pages.yml) file.
88
- Bump dependency versions in the [requirements.txt](https://github.com/autokey/autokey.github.io/blob/master/requirements.txt) file.
9+
- Update all sections in the [README.md](https://github.com/autokey/autokey.github.io/blob/master/README.md) file and add a section.

README.md

Lines changed: 99 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -1,69 +1,113 @@
11
# Autokey Documentation
22

3-
Built using [sphinx]().
4-
5-
Uses the [sphinx autodoc](https://www.sphinx-doc.org/en/master/usage/extensions/autodoc.html) extension to automatically generate API documentation. This module imports the modules and reads the documentation for each function and generates the API documentation based on that.
6-
7-
Uses the [sphinx epytext]() extension to convert older style epydoc documentation format to sphinx readable.
8-
9-
I also have it set to use [recommonmark]() in case any one wants to use markdown really badly.
10-
11-
It also uses the default [sphinx.ext.viewcode](https://www.sphinx-doc.org/en/master/usage/extensions/viewcode.html) to insert links to the related source code.
12-
13-
14-
15-
16-
## Local testing
17-
You'll need the following python packages (and dependencies). From my command history getting it up and running;
18-
```
19-
git clone https://github.com/sebastiansam55/autokey-sphinx
20-
cd autokey-sphinx
21-
git clone https://github.com/autokey/autokey
22-
cd autokey
23-
pip install .
24-
cd ..
25-
pip install sphinx recommonmark sphinx-rtd-theme sphinx-epytext enum-tools[sphinx]
26-
# for first time installs you'll likely have to restart your shell for the sphinx-build command to be found.
27-
28-
# should be run from the base of this repository
29-
sphinx-build -a -E -b html . ./docs
30-
```
31-
32-
33-
## Github Actions
34-
Basic workflow:
35-
* Installs Git
36-
* Clones autokey/autokey (master branch)
37-
* Installs Autokey using `pip install .` in autokey repo
38-
* Installs sphinx
39-
* `pip install sphinx recommonmark sphinx-rtd-theme sphinx-epytext`
40-
* Builds sphinx site
41-
* `sphinx-build -a -E -b html ./ docs`
42-
* Uploads pages Artifact (docs output folder)
43-
* Deploys to Github Pages for this repository
44-
45-
46-
## Maintenance of GitHub Actions
47-
When a pull request is merged in, its action will need to be run manually to rebuild the documentation pages:
3+
## About this repository
4+
5+
### Resources
6+
* Built using [Sphinx](https://github.com/sphinx-doc/sphinx).
7+
* Uses the [sphinx.ext.autodoc](https://www.sphinx-doc.org/en/master/usage/extensions/autodoc.html) extension to import the modules, read the documentation for each function, and automatically generate the API documentation based on that.
8+
* Uses the [sphinx epytext](https://github.com/jayvdb/sphinx-epytext) extension to convert older-style Epydoc documentation format to Sphinx-readable documentation.
9+
* Uses the [recommonmark](https://pypi.org/project/recommonmark/) package so that **Markdown** can be used.
10+
* Uses the default [sphinx.ext.viewcode](https://www.sphinx-doc.org/en/master/usage/extensions/viewcode.html) to insert links to the related source code.
11+
12+
### Basic workflow
13+
1. Clones the **master** branch of the [autokey/autokey](https://github.com/autokey/autokey) repository.
14+
2. Installs **Autokey** in the cloned autokey repository.
15+
3. Installs **Sphinx**.
16+
4. Builds the **Sphinx** site in the **docs** folder.
17+
5. Uploads the [GitHub Pages](https://pages.github.com/) from the **docs** folder.
18+
6. Deploys the [documentation](https://autokey.github.io/index.html) as **GitHub Pages**.
19+
20+
21+
### Local testing
22+
1. You'll need the following Python packages and dependencies:
23+
```bash
24+
# Clone the AutoKey documentation repository:
25+
git clone https://github.com/autokey/autokey.github.io.git
26+
# Open the AutoKey documentation cloned directory:
27+
cd autokey.github.io
28+
# Clone the Autokey repository:
29+
git clone https://github.com/autokey/autokey
30+
# Open the AutoKey cloned directory:
31+
cd autokey
32+
# Install Autokey in the cloned autokey repository:
33+
pip install .
34+
# Reopen the AutoKey documentation cloned directory
35+
cd ..
36+
# Install Sphinx and recommonmark:
37+
pip install sphinx recommonmark sphinx-rtd-theme sphinx-epytext enum-tools[sphinx]
38+
```
39+
2. If this is a first-time installation, restart the shell so that the `sphinx-build` command can be found, and reopen the AutoKey documentation cloned directory.
40+
3. Build the documentation:
41+
```bash
42+
# Build the Sphinx site:
43+
sphinx-build -a -E -b html . ./docs
44+
```
45+
46+
47+
## Maintenance
48+
49+
### Run the actions after documentation changes
50+
When changes are made to the documentation, the GitHub actions will need to be run manually to rebuild the documentation pages:
4851
1. Pick one:
4952
* Navigate to the workflow:
5053
1. Open the [repository](https://github.com/autokey/autokey.github.io).
5154
2. Open the **Actions** menu.
5255
3. Choose **Build AutoKey pages** in the left pane.
5356
* Go directly to the workflow from here:
54-
1. Go to [Build Autokey pages](https://github.com/autokey/autokey.github.io/actions/workflows/pages.yml)
57+
1. Go to [Build Autokey pages](https://github.com/autokey/autokey.github.io/actions/workflows/pages.yml).
5558
2. Click the **Run workflow** drop-down in the right pane.
5659
3. Click the **Run workflow** button in the context menu.
5760
4. Wait for the process to finish.
5861
5. Open the [new documentation](https://autokey.github.io/index.html) and check if the change looks good or if further work is needed.
5962

6063

61-
## TODO
62-
There is a plugin that supports versioned documentation, [sphinxcontrib-multiversion](https://github.com/Holzhaus/sphinx-multiversion) which seems to be decently well maintained.
63-
64-
Going forward we should use sphinx syntax in comments instead of older epytext.;
65-
https://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html
66-
67-
For more information on the new comment markup.
68-
69-
64+
### Update the actions
65+
The GitHub action versions should be checked and updated regularly.
66+
1. Check the [pages.yml](https://github.com/autokey/autokey.github.io/blob/master/.github/workflows/pages.yml) file on the **master** branch for updates:
67+
1. Check if the **actions/checkout** [version number has changed](https://github.com/marketplace/actions/checkout)
68+
2. Check if the **actions/upload-pages-artifact** [version number has changed](https://github.com/marketplace/actions/upload-github-pages-artifact).
69+
3. Check if the **actions/deploy-pages** [version number has changed](https://github.com/marketplace/actions/deploy-github-pages-site).
70+
2. Update the version numbers if any have changed:
71+
1. Fork this repository. Note that GitHub will automatically open the fork that you just created.
72+
2. Create the **update_the_actions** branch off of the **master** branch. Note that GitHub will automatically put you onto the new branch that you just created.
73+
3. Open the **pages.yml** file.
74+
4. Update the version numbers of the actions that have changed.
75+
5. Save and commit the file.
76+
6. Update the change log:
77+
1. Open the **CHANGELOG.md** file.
78+
2. ️Note the change.
79+
3. ️Save and commit the file.
80+
7. ️Do a pull request.
81+
8. Do the cleanup:
82+
1. Wait for an email message notifying you that an administrator has merged the pull request into the project.
83+
2. Open the merged pull request by clicking its link in that email message.
84+
3. Click the **Delete branch** button.
85+
86+
87+
### Update the dependencies
88+
The pip dependencies should be checked and updated regularly.
89+
1. Check the dependencies in the [requirements.txt](https://github.com/autokey/autokey.github.io/blob/master/requirements.txt) file on the **master** branch for updates:
90+
1. Check if the **sphinx** [version number has changed](https://pypi.org/project/Sphinx/).
91+
2. Check if the **sphinx_rtd_theme** [version number has changed](https://pypi.org/project/sphinx-rtd-theme/).
92+
3. Check if the **sphinx-epytext** [version number has changed](https://pypi.org/project/sphinx-epytext/).
93+
4. Check if the **recommonmark** [version number has changed](https://pypi.org/project/recommonmark/).
94+
5. Check if the **enum-tools[sphinx]** [version number has changed](https://pypi.org/project/enum-tools/).
95+
2. Update the version numbers if any have changed:
96+
1. Fork this repository. Note that GitHub will automatically open the fork that you just created.
97+
2. Create the **update_the_dependencies** branch off of the **master** branch. Note that GitHub will automatically put you onto the new branch that you just created.
98+
3. Open the **requirements.txt** file.
99+
4. Update the version numbers of the dependencies that have changed.
100+
5. Save and commit the file.
101+
6. Update the change log:
102+
1. Open the **CHANGELOG.md** file.
103+
2. ️Note the change(s) you made.
104+
3. ️Save and commit the file.
105+
7. ️Do a pull request.
106+
8. Do the cleanup:
107+
1. Wait for an email message notifying you that an administrator has merged the pull request into the project.
108+
2. Open the merged pull request by clicking its link in that email message.
109+
3. Click the **Delete branch** button.
110+
111+
## ToDo
112+
* Going forward, we should use **Sphinx** syntax in comments instead of the older **Epytext** syntax. See the [reStructuredText Primer](https://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html) for more information on the new comment markup.
113+
* We should consider using the [sphinxcontrib-multiversion](https://github.com/Holzhaus/sphinx-multiversion) plugin that supports versioned documentation and seems to be decently well-maintained.

0 commit comments

Comments
 (0)