Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to sphinx doc #1196

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .github/doc/styles/ADI/Capitalization.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
extends: capitalization
message: "'%s' should be in title case"
level: warning
scope: sentence
# $title, $sentence, $lower, $upper, or a pattern.
#match: $title
#style: AP # AP or Chicago; only applies when match is set to $title.
exceptions:
- ADC
- DAC
- adc
- dac
5 changes: 5 additions & 0 deletions .github/doc/styles/ADI/Spelling.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
extends: spelling
message: "Did you really mean '%s'?"
level: error
ignore:
- Vocab/Sphinx/accept.txt
14 changes: 14 additions & 0 deletions .github/doc/styles/ADI/Terms.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# `extends` specifies the extension point you're using. Here, we're
# using `substitution` to ensure correct usage of some techincal and
# brand-specifc terminology.
extends: substitution
# `message` allows you to customize the output shown to your users.
message: Use '%s' instead of '%s'.
# We're setting this rule's severity to `error`, which will cause
# CI builds to fail.
level: error
# We're using case-insensitive patterns.
ignorecase: true
swap:
libIIO: libiio
linux: Linux
8 changes: 8 additions & 0 deletions .github/doc/styles/Google/Units.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
extends: existence
message: "Put a nonbreaking space between the number and the unit in '%s'."
link: 'https://developers.google.com/style/units-of-measure'
nonword: true
level: warning
tokens:
- \d+(?:B|kB|MB|GB|TB)
- \d+(?:ns|ms|s|min|h|d)
80 changes: 80 additions & 0 deletions .github/doc/styles/config/vocabularies/Sphinx/accept.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
adijif
204B
204C
JESD204B
JESD204C
libiio
pypi
conda
JESD
ADI
SYSREF
LMFC
AD-FMCDAQ2-EBZ
AD9523-1
AD9528
AD9680
ADRV9009
HMC7044
Nox
pyenv
bashrc
zshrc
Makefile
Ultrascale
Ultrascale+
[aA][dD][cC]
[dD][aA][cC]
PLL
[nN]ox
[mM]ultiblock
codecov
mux
muxes
muxing
Fmax
parameterization
clk
[xX]ilinx
(?i)fpgas
fpga
Scopy
sysfs
iiod
IIOD
usb
Jetson
Mbed
repo
github
iio_context
iio_device
iio_channel
iio_buffer
iio_scan_context
iio_attr
iio_reg
iio_info
iio_readdev
iio_writedev
iio_rwdev
iio_stresstest
iio_genxml
arg
pid
hostname
data_bits
parity_bits
stop_bits
flow_control
Xon
Xoff

ip
uri
deinterleave
endianness
zeroconf
attr
Doxygen
Nechita
Empty file.
54 changes: 54 additions & 0 deletions .github/workflows/doc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Documentation Tests

on: [push, pull_request]

jobs:
CheckDocs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8

- name: Install dependencies
run: |
sudo apt-get -qq update
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
mkdir build
cd build
cmake .. -DWITH_MAN=ON -DHAVE_DNS_SD=OFF
make
sudo make install
cd ..
cd doc
pip install -r requirements_doc.txt
cd ..

- name: Build man pages
run: |
cd doc
python man_to_rst.py
cd ..

- name: Check doc build
run: |
cd doc
make html SPHINXOPTS="-W"
cd ..

# - name: Check doc coverage
# run: |
# cd doc
# make coverage
# cat build/coverage/python.txt
# cat build/coverage/python.txt | wc -l | xargs -I % test % -eq 2
# cd ..

- name: Check doc links
run: |
cd doc
make linkcheck
cd ..
12 changes: 12 additions & 0 deletions .github/workflows/vale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: reviewdog
on: [pull_request,push]

jobs:
vale:
name: runner / vale
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: errata-ai/vale-action@reviewdog
with:
files: doc/source
11 changes: 11 additions & 0 deletions .vale.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
StylesPath = .github/doc/styles
MinAlertLevel = suggestion


Vocab = Sphinx

[*.rst]
BasedOnStyles = ADI, Vale, Google

[*.md]
BasedOnStyles = ADI, Vale, Google
Loading
Loading