Skip to content

Commit 6491093

Browse files
Merge pull request #5 from ISISComputingGroup/docs
Docs
2 parents 709cf16 + 65ff5ad commit 6491093

File tree

948 files changed

+51438
-1
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

948 files changed

+51438
-1
lines changed

.gitattributes

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
* text=auto
2+
*.md text
3+
*.rst text
4+
*.rest text

.github/workflows/documentation.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: sphinx
2+
3+
on: [push, workflow_call]
4+
5+
jobs:
6+
spellcheck:
7+
runs-on: "windows-latest"
8+
steps:
9+
- uses: actions/checkout@v4
10+
with:
11+
fetch-depth: 0
12+
- uses: actions/setup-python@v5
13+
with:
14+
python-version: "3.12"
15+
- name: install requirements
16+
run: pip install -e .[dev]
17+
- name: run pytest
18+
run: python -m pytest
19+
- name: run spellcheck
20+
run: sphinx-build -E -a -W --keep-going -b spelling doc _build
21+
build:
22+
uses: ISISComputingGroup/reusable-workflows/.github/workflows/sphinx.yml@main
23+
secrets: inherit
24+
with:
25+
deploy-branch: "master"

.gitignore

Lines changed: 164 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,164 @@
1+
# Byte-compiled / optimized / DLL files
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
6+
# C extensions
7+
*.so
8+
9+
# Distribution / packaging
10+
.Python
11+
build/
12+
develop-eggs/
13+
dist/
14+
downloads/
15+
eggs/
16+
.eggs/
17+
lib/
18+
lib64/
19+
parts/
20+
sdist/
21+
var/
22+
wheels/
23+
share/python-wheels/
24+
*.egg-info/
25+
.installed.cfg
26+
*.egg
27+
MANIFEST
28+
29+
# PyInstaller
30+
# Usually these files are written by a python script from a template
31+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
32+
*.manifest
33+
*.spec
34+
35+
# Installer logs
36+
pip-log.txt
37+
pip-delete-this-directory.txt
38+
39+
# Unit test / coverage reports
40+
htmlcov/
41+
.tox/
42+
.nox/
43+
.coverage
44+
.coverage.*
45+
.cache
46+
nosetests.xml
47+
coverage.xml
48+
*.cover
49+
*.py,cover
50+
.hypothesis/
51+
.pytest_cache/
52+
cover/
53+
54+
# Translations
55+
*.mo
56+
*.pot
57+
58+
# Django stuff:
59+
*.log
60+
local_settings.py
61+
db.sqlite3
62+
db.sqlite3-journal
63+
64+
# Flask stuff:
65+
instance/
66+
.webassets-cache
67+
68+
# Scrapy stuff:
69+
.scrapy
70+
71+
# Sphinx documentation
72+
docs/_build/
73+
74+
# PyBuilder
75+
.pybuilder/
76+
target/
77+
78+
# Jupyter Notebook
79+
.ipynb_checkpoints
80+
81+
# IPython
82+
profile_default/
83+
ipython_config.py
84+
85+
# pyenv
86+
# For a library or package, you might want to ignore these files since the code is
87+
# intended to run in multiple environments; otherwise, check them in:
88+
# .python-version
89+
90+
# pipenv
91+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
92+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
93+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
94+
# install all needed dependencies.
95+
#Pipfile.lock
96+
97+
# poetry
98+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
99+
# This is especially recommended for binary packages to ensure reproducibility, and is more
100+
# commonly ignored for libraries.
101+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
102+
#poetry.lock
103+
104+
# pdm
105+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
106+
#pdm.lock
107+
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
108+
# in version control.
109+
# https://pdm.fming.dev/latest/usage/project/#working-with-version-control
110+
.pdm.toml
111+
.pdm-python
112+
.pdm-build/
113+
114+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
115+
__pypackages__/
116+
117+
# Celery stuff
118+
celerybeat-schedule
119+
celerybeat.pid
120+
121+
# SageMath parsed files
122+
*.sage.py
123+
124+
# Environments
125+
.env
126+
.venv
127+
env/
128+
venv/
129+
ENV/
130+
env.bak/
131+
venv.bak/
132+
133+
# Spyder project settings
134+
.spyderproject
135+
.spyproject
136+
137+
# Rope project settings
138+
.ropeproject
139+
140+
# mkdocs documentation
141+
/site
142+
143+
# mypy
144+
.mypy_cache/
145+
.dmypy.json
146+
dmypy.json
147+
148+
# Pyre type checker
149+
.pyre/
150+
151+
# pytype static type analyzer
152+
.pytype/
153+
154+
# Cython debug symbols
155+
cython_debug/
156+
157+
.idea/
158+
.vscode/
159+
160+
.idea/*
161+
.venv/
162+
ibex_developers_manual.egg-info/
163+
build/
164+
_build/

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# The IBEX Developer's Manual
22

3-
[Click here to go to the GitHub wiki with the developer's manual.](https://github.com/ISISComputingGroup/ibex_developers_manual/wiki)
3+
[Click here to go to the GitHub wiki with the developer's manual.](https://isiscomputinggroup.github.io/ibex_developers_manual/)

doc/Client.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# IBEX GUI (Eclipse)
2+
3+
## Getting Started
4+
5+
```{toctree}
6+
:glob:
7+
:titlesonly:
8+
9+
client/GUI-Getting-Started
10+
client/GUI-Coding
11+
client/GUI-Testing
12+
client/GUI-Eclipse
13+
client/GUI-CSS
14+
client/GUI-Other
15+
client/GUI-Troubleshooting
16+
client/GUI-Design
17+
```

doc/Deployment.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Releases & Deployment
2+
3+
```{toctree}
4+
:glob:
5+
:titlesonly:
6+
7+
deployment/Creating-a-release
8+
deployment/Manual-System-Tests
9+
deployment/Deploy
10+
deployment/Patch
11+
deployment/Future
12+
```

doc/Editing-the-Wiki.md

Lines changed: 148 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,148 @@
1+
# Editing this Documentation
2+
3+
This documentation is built using [sphinx](https://www.sphinx-doc.org/en/master/) and the [myst](https://myst-parser.readthedocs.io/en/latest/) markdown
4+
plugin. Both of these tools have excellent online documentation.
5+
6+
Sphinx is a widely-adopted structured documentation tool, which scales well even for very large projects - for example it
7+
is used to build [Python's documentation](https://docs.python.org/3/), the [Linux kernel documentation](https://docs.kernel.org/), and
8+
the [EPICS documentation](https://docs.epics-controls.org/en/latest/).
9+
10+
## Markdown
11+
12+
Markdown is the preferred format, although any format supported by sphinx can be used if needed for example ReST or MediaWiki may be useful if moving documentation from other sources.
13+
14+
For a 3-minute introduction to Markdown see ['Mastering Markdown'](https://guides.github.com/features/mastering-markdown/).
15+
16+
## Page Titles
17+
18+
A top-level heading (e.g. `#` markdown header) is used as the page title. **A page should only have one title** (at the top) - otherwise multiple links to that
19+
page will appear in the navigation structure. Subsections within a page should use sub-headers like `##` or `###`.
20+
21+
The page title is independent from the filename of the markdown file - however, for clarity, choose to use similar titles and
22+
filenames wherever possible.
23+
24+
## Adding & editing pages
25+
26+
For simple edits to existing pages, editing can be done via the github interface. There is an "edit on github" button at
27+
the top of every page, which will take you to the relevant page in github to edit it.
28+
29+
For more complex changes, for example adding new pages, it is recommended to make the changes and test them locally, to make sure
30+
that the navigation structure renders properly.
31+
32+
When adding new pages, carefully consider at what level in the hierarchy the new page should be inserted. In particular, be cautious
33+
about adding pages at the very top level of the documentation - these can very quickly clutter the navigation.
34+
35+
Some sphinx `toctrees` (Table-of-contents trees) are listed explicitly, to promote a natural reading order. Where this is the case,
36+
new pages will need to be added to the `toctree` in the document one level up from where the new page has been added - preserving a
37+
natural reading order. Sphinx will warn you (and fail the build) if you forget to do this.
38+
39+
## Building the wiki locally
40+
41+
Check out the wiki into `c:\instrument\dev\ibex_developers_manual`:
42+
43+
```shell
44+
cd c:\instrument\dev
45+
git clone https://github.com/ISISComputingGroup/ibex_developers_manual.git
46+
```
47+
48+
Make a python virtual environment containing the wiki's dependencies:
49+
50+
```
51+
cd c:\instrument\dev\ibex_developers_manual
52+
c:\instrument\apps\python3\python.exe -m venv .venv
53+
.venv\Scripts\activate
54+
python -m pip install -e .
55+
```
56+
57+
Build the wiki (rebuilding automatically on changes):
58+
59+
```
60+
sphinx-autobuild doc _build
61+
```
62+
63+
The local wiki will then be available at [http://localhost:8000](http://localhost:8000) in your browser.
64+
65+
If sphinx gets out of sync with changes, you can clear the cached build output and start again by running:
66+
67+
```
68+
rmdir /s /q _build && sphinx-autobuild doc _build
69+
```
70+
71+
72+
## Adding DrawIO Diagram
73+
74+
Create new diagram
75+
76+
1. Visit [DrawIO](https://www.draw.io/) choose `device`
77+
1. Create New Diagram, select type etc.
78+
1. Edit diagram until you are happy
79+
1. choose `File` -> `Export` -> `Png...`
80+
1. Then make sure `Include a copy of my diagram` is ticked
81+
1. Add it to the folder in git, next to the page which will use it
82+
83+
In wiki add to markdown using:
84+
85+
![alternative text](<image name>.png)
86+
87+
To edit this just open that png in `draw.io`.
88+
89+
## Images
90+
91+
To add images you need to check out the Wiki and add them manually. The images should go into a folder next to the page which will use them.
92+
93+
```shell
94+
git add some/folder/test.png
95+
git commit -m "Added an image to Using the Wiki page"
96+
git push
97+
```
98+
99+
You can then add the image in markdown using the URL `test.png`:
100+
101+
![alternative text](test.png)
102+
103+
## Spellchecking
104+
105+
The wiki has a built-in spellchecker, which will automatically run when a commit
106+
is pushed to github.
107+
108+
To run the spellchecker locally, use:
109+
110+
```
111+
sphinx-build -b spelling doc _build
112+
```
113+
114+
There is an additional dictionary of allowed words in `doc/spelling_wordlist.txt`. This
115+
is used for words which we know are spelt correctly, but are not in the default dictionary.
116+
117+
The word list can be kept in order by running `sort_word_list` (which will be available in
118+
the python virtual environment). This is also enforced by CI, and can be checked locally by
119+
running `pytest`. Both of these tools should be run from the top-level of an `ibex_developers_manual`
120+
git checkout - the directory that contains `pyproject.toml`.
121+
122+
Sphinx is strict about capitalisation; where multiple spellings are valid, the word will
123+
need to be added to the word list with each of the valid spellings. An exception is all-lowercase entries in the
124+
word list - these also allow a variant with an initial capital letter.
125+
126+
Where a word or product has a preferred stylisation, for example **ActiveMQ** or **LabVIEW**, only that spelling
127+
should be added to the word list. Proper nouns should not have uncapitalised variants added to the word list.
128+
129+
## Admonitions
130+
131+
Sphinx supports various admonitions, which can be used to draw the reader's attention to
132+
certain topics.
133+
134+
For example:
135+
136+
```
137+
:::{tip}
138+
This is a tip!
139+
:::
140+
```
141+
142+
Will render as:
143+
144+
:::{tip}
145+
This is a tip!
146+
:::
147+
148+
The list of supported admonitions is [on the MyST documentation](https://myst-parser.readthedocs.io/en/latest/syntax/admonitions.html).

0 commit comments

Comments
 (0)