Skip to content
Open
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
32 changes: 32 additions & 0 deletions .github/workflows/rst_lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: reStructuredText Lint
on:
push:
branches:
- 'main'
pull_request:

jobs:
run_lint:
runs-on: ubuntu-latest
steps:
- name: Code Checkout
uses: actions/checkout@v4
- name: Make Sphinx Requirements
run: |
echo "sphinx" > requirements.txt
echo "sphinx_rtd_theme" >> requirements.txt
echo "sphinx_design" >> requirements.txt
echo "sphinx-sitemap" >> requirements.txt
echo "sphinxcontrib-mermaid" >> requirements.txt
echo "doc8" >> requirements.txt
Comment on lines +12 to +21
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can stick these under pyproject.toml's optional-dependencies section for docs

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay - let me see: also, not sure I need to have all of thee sphinx's installed. Might just need our typical docs dependencies + doc8.

- name: Prepare Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
cache: 'pip'
- name: Install Python Requirements
run: |
pip install -r requirements.txt
pip install doc8
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as above, and then do pip install .[docs]

i guess, as an alternative, we could put this requirements file in docs/

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Regardless of the method chosen (requirement.txt or pip install .[docs]), you will want to add documentation somewhere with the steps to set up the documentation build, and how to run the lint process.

Take a look at the RDHPCS CONTRIBUTING.md file.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

- name: Lint RST files
run: doc8 *
Loading