From 8b0d73e45de3dff19c89d1fb4477e0928d55152d Mon Sep 17 00:00:00 2001 From: kc1awv Date: Mon, 25 Jan 2021 09:38:52 -0500 Subject: [PATCH] prepping for GH actions - autodoc --- .github/workflows/pull_request.yml | 27 ++++++++++++++++ .github/workflows/push.yml | 49 ++++++++++++++++++++++++++++++ docs/application_layer.rst | 6 ++-- docs/physical_layer.rst | 6 ++-- 4 files changed, 82 insertions(+), 6 deletions(-) create mode 100644 .github/workflows/pull_request.yml create mode 100644 .github/workflows/push.yml diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml new file mode 100644 index 0000000..ae3a488 --- /dev/null +++ b/.github/workflows/pull_request.yml @@ -0,0 +1,27 @@ +name: "Pull Request Docs Check" +on: +- pull_request + +jobs: + docs: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - uses: ammaraskar/sphinx-action@master + with: + build-command: "make html" + docs-folder: "docs/" + - uses: ammaraskar/sphinx-action@master + with: + docs-folder: "docs/" + pre-build-command: "apt-get update -y && apt-get install -y latexmk texlive-latex-recommended texlive-xetex texlive-latex-extra texlive-fonts-recommended fonts-freefont-otf" + build-command: "make latexpdf" + # Create an artifact of the html output. + - uses: actions/upload-artifact@v1 + with: + name: DocumentationHTML + path: docs/_build/html/ + - uses: actions/upload-artifact@v1 + with: + name: DocumentationPDFSpecification + path: docs/_build/latex/ \ No newline at end of file diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml new file mode 100644 index 0000000..33f51be --- /dev/null +++ b/.github/workflows/push.yml @@ -0,0 +1,49 @@ +name: "Pull Request Docs Check" +on: +- push + +jobs: + docs: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - uses: ammaraskar/sphinx-action@master + with: + build-command: "make html" + docs-folder: "docs/" + - uses: ammaraskar/sphinx-action@master + with: + docs-folder: "docs/" + pre-build-command: "apt-get update -y && apt-get install -y latexmk texlive-latex-recommended texlive-xetex texlive-latex-extra texlive-fonts-recommended fonts-freefont-otf" + build-command: "make latexpdf" + # Create an artifact of the html output. + - uses: actions/upload-artifact@v1 + with: + name: DocumentationHTML + path: docs/_build/html/ + - uses: actions/upload-artifact@v1 + with: + name: DocumentationPDFSpecification + path: docs/_build/latex/ + # Publish built docs to gh-pages branch. + # =============================== + - name: Commit documentation changes + run: | + git clone https://github.com/kc1awv/M17_spec.git --branch gh-pages --single-branch gh-pages + cp -r docs/_build/html/* gh-pages/ + cp -r docs/_build/latex/M17Protocol*.pdf gh-pages/ + cd gh-pages + touch .nojekyll + git config --local user.email "smiller@kc1awv.net" + git config --local user.name "kc1awv" + git add . + git commit -m "Update PDF documentation" -a || true + # The above command will fail if no changes were present, so we ignore + # that. + - name: Push changes + uses: ad-m/github-push-action@master + with: + branch: gh-pages + directory: gh-pages + github_token: ${{ secrets.GH_TOKEN }} + # =============================== \ No newline at end of file diff --git a/docs/application_layer.rst b/docs/application_layer.rst index b3b1e8a..871e8ca 100644 --- a/docs/application_layer.rst +++ b/docs/application_layer.rst @@ -89,17 +89,17 @@ algorithm. Figures 5 to 8 show block diagrams of the algorithm - 24 bits - 16,777,215 -.. figure:: ../images/LFSR_8.svg +.. figure:: ../images/LFSR_8.* :scale: 22% 8-bit LFSR taps -.. figure:: ../images/LFSR_16.svg +.. figure:: ../images/LFSR_16.* :scale: 22% 16-bit LFSR taps -.. figure:: ../images/LFSR_24.svg +.. figure:: ../images/LFSR_24.* :scale: 22% 24-bit LFSR taps diff --git a/docs/physical_layer.rst b/docs/physical_layer.rst index bf60d97..8e9f0a9 100644 --- a/docs/physical_layer.rst +++ b/docs/physical_layer.rst @@ -97,7 +97,7 @@ the transmission. Link setup frame ~~~~~~~~~~~~~~~~ -.. figure:: ../images/link_setup_frame_encoding.svg +.. figure:: ../images/link_setup_frame_encoding.* ECC stages for the link setup frame @@ -117,7 +117,7 @@ transmitted. Interleaving is used to combat error bursts. Subsequent frames ~~~~~~~~~~~~~~~~~ -.. figure:: ../images/frame_encoding.svg +.. figure:: ../images/frame_encoding.* ECC stages of subsequent frames @@ -185,7 +185,7 @@ The output from the encoder must be read alternately. .. [NXDN] NXDN Technical Specifications, Part 1: Air Interface; Sub-part A: Common Air Interface -.. figure:: ../images/convolutional.svg +.. figure:: ../images/convolutional.* :scale: 30% Convolutional coder diagram