Skip to content

Commit a1ba819

Browse files
committed
Add CI for sphinx doc builds
Signed-off-by: Travis F. Collins <[email protected]>
1 parent 8f716c1 commit a1ba819

File tree

9 files changed

+196
-0
lines changed

9 files changed

+196
-0
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
extends: capitalization
2+
message: "'%s' should be in title case"
3+
level: warning
4+
scope: sentence
5+
# $title, $sentence, $lower, $upper, or a pattern.
6+
#match: $title
7+
#style: AP # AP or Chicago; only applies when match is set to $title.
8+
exceptions:
9+
- ADC
10+
- DAC
11+
- adc
12+
- dac
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
extends: spelling
2+
message: "Did you really mean '%s'?"
3+
level: error
4+
ignore:
5+
- Vocab/Sphinx/accept.txt

.github/doc/styles/ADI/Terms.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# `extends` specifies the extension point you're using. Here, we're
2+
# using `substitution` to ensure correct usage of some techincal and
3+
# brand-specifc terminology.
4+
extends: substitution
5+
# `message` allows you to customize the output shown to your users.
6+
message: Use '%s' instead of '%s'.
7+
# We're setting this rule's severity to `error`, which will cause
8+
# CI builds to fail.
9+
level: error
10+
# We're using case-insensitive patterns.
11+
ignorecase: true
12+
swap:
13+
libIIO: libiio
14+
linux: Linux
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
extends: existence
2+
message: "Put a nonbreaking space between the number and the unit in '%s'."
3+
link: 'https://developers.google.com/style/units-of-measure'
4+
nonword: true
5+
level: warning
6+
tokens:
7+
- \d+(?:B|kB|MB|GB|TB)
8+
- \d+(?:ns|ms|s|min|h|d)
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
adijif
2+
204B
3+
204C
4+
JESD204B
5+
JESD204C
6+
libiio
7+
pypi
8+
conda
9+
JESD
10+
ADI
11+
SYSREF
12+
LMFC
13+
AD-FMCDAQ2-EBZ
14+
AD9523-1
15+
AD9528
16+
AD9680
17+
ADRV9009
18+
HMC7044
19+
Nox
20+
pyenv
21+
bashrc
22+
zshrc
23+
Makefile
24+
Ultrascale
25+
Ultrascale+
26+
[aA][dD][cC]
27+
[dD][aA][cC]
28+
PLL
29+
[nN]ox
30+
[mM]ultiblock
31+
codecov
32+
mux
33+
muxes
34+
muxing
35+
Fmax
36+
parameterization
37+
clk
38+
[xX]ilinx
39+
(?i)fpgas
40+
fpga
41+
Scopy
42+
sysfs
43+
iiod
44+
IIOD
45+
usb
46+
Jetson
47+
Mbed
48+
repo
49+
github
50+
iio_context
51+
iio_device
52+
iio_channel
53+
iio_buffer
54+
iio_scan_context
55+
iio_attr
56+
iio_reg
57+
iio_info
58+
iio_readdev
59+
iio_writedev
60+
iio_rwdev
61+
iio_stresstest
62+
iio_genxml
63+
arg
64+
pid
65+
hostname
66+
data_bits
67+
parity_bits
68+
stop_bits
69+
flow_control
70+
Xon
71+
Xoff
72+
73+
ip
74+
uri
75+
deinterleave
76+
endianness
77+
zeroconf
78+
attr
79+
Doxygen
80+
Nechita

.github/doc/styles/config/vocabularies/Sphinx/reject.txt

Whitespace-only changes.

.github/workflows/doc.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Documentation Tests
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
CheckDocs:
7+
runs-on: ubuntu-latest
8+
9+
steps:
10+
- uses: actions/checkout@v2
11+
- name: Set up Python 3.8
12+
uses: actions/setup-python@v2
13+
with:
14+
python-version: 3.8
15+
16+
- name: Install dependencies
17+
run: |
18+
sudo apt-get -qq update
19+
sudo apt-get install -y git cmake graphviz libavahi-common-dev libavahi-client-dev libaio-dev libusb-1.0-0-dev libxml2-dev rpm tar bzip2 gzip flex bison git libzstd-dev doxygen pandoc
20+
mkdir build
21+
cd build
22+
cmake .. -DWITH_MAN=ON -DHAVE_DNS_SD=OFF
23+
make
24+
sudo make install
25+
cd ..
26+
cd doc
27+
pip install -r requirements_doc.txt
28+
cd ..
29+
30+
- name: Build man pages
31+
run: |
32+
cd doc
33+
python man_to_rst.py
34+
cd ..
35+
36+
- name: Check doc build
37+
run: |
38+
cd doc
39+
make html SPHINXOPTS="-W"
40+
cd ..
41+
42+
# - name: Check doc coverage
43+
# run: |
44+
# cd doc
45+
# make coverage
46+
# cat build/coverage/python.txt
47+
# cat build/coverage/python.txt | wc -l | xargs -I % test % -eq 2
48+
# cd ..
49+
50+
- name: Check doc links
51+
run: |
52+
cd doc
53+
make linkcheck
54+
cd ..

.github/workflows/vale.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: reviewdog
2+
on: [pull_request,push]
3+
4+
jobs:
5+
vale:
6+
name: runner / vale
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v3
10+
- uses: errata-ai/vale-action@reviewdog
11+
with:
12+
files: doc/source

.vale.ini

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
StylesPath = .github/doc/styles
2+
MinAlertLevel = suggestion
3+
4+
5+
Vocab = Sphinx
6+
7+
[*.rst]
8+
BasedOnStyles = ADI, Vale, Google
9+
10+
[*.md]
11+
BasedOnStyles = ADI, Vale, Google

0 commit comments

Comments
 (0)