Skip to content

Commit d71d133

Browse files
committed
Reformat RST files for better diffs
1 parent c75f633 commit d71d133

15 files changed

Lines changed: 1783 additions & 2238 deletions

.github/workflows/ci.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ jobs:
2222
outputs:
2323
container: ${{ steps.filter.outputs.container }}
2424
outputs: ${{ steps.filter.outputs.outputs }}
25+
style: ${{ steps.filter.outputs.style }}
2526

2627
steps:
2728
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # @v2
@@ -37,6 +38,8 @@ jobs:
3738
container:
3839
- '.github/**'
3940
- 'container/**'
41+
style:
42+
- 'tutorial_*.rst'
4043
outputs:
4144
- '.github/**'
4245
- 'container/**'
@@ -56,3 +59,8 @@ jobs:
5659
|| startsWith(github.ref, 'refs/tags/'))
5760
needs: [ changes, container ]
5861
uses: ./.github/workflows/outputs.yml
62+
63+
style:
64+
if: ${{ needs.changes.outputs.style == 'true' }}
65+
needs: changes
66+
uses: ./.github/workflows/style.yml

.github/workflows/style.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Linting & Style Checks
2+
on:
3+
workflow_call:
4+
5+
6+
jobs:
7+
lint:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
11+
12+
- name: Set up Python
13+
uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55
14+
with:
15+
python-version: '3.13'
16+
cache: 'pip'
17+
18+
- name: Run RST Formatter
19+
run: |
20+
bin/format_rst_file.py --check tutorial_*.rst

Makefile

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,9 @@ clean:
9090
-rm -f command_index.rst
9191
-rm -rf $(BUILDDIR)/* $(APIDOC_FILES)
9292

93+
format:
94+
bin/format_rst_file.py tutorial_*.rst
95+
9396
html:
9497
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
9598
@echo
@@ -119,13 +122,13 @@ htmlhelp:
119122
$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
120123
@echo
121124
@echo "Build finished; now you can run HTML Help Workshop with the" \
122-
".hhp project file in $(BUILDDIR)/htmlhelp."
125+
".hhp project file in $(BUILDDIR)/htmlhelp."
123126

124127
qthelp:
125128
$(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
126129
@echo
127130
@echo "Build finished; now you can run "qcollectiongenerator" with the" \
128-
".qhcp project file in $(BUILDDIR)/qthelp, like this:"
131+
".qhcp project file in $(BUILDDIR)/qthelp, like this:"
129132
@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/Spack.qhcp"
130133
@echo "To view the help file:"
131134
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/Spack.qhc"
@@ -149,7 +152,7 @@ latex:
149152
@echo
150153
@echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
151154
@echo "Run \`make' in that directory to run these through (pdf)latex" \
152-
"(use \`make latexpdf' here to do that automatically)."
155+
"(use \`make latexpdf' here to do that automatically)."
153156

154157
latexpdf:
155158
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
@@ -172,7 +175,7 @@ texinfo:
172175
@echo
173176
@echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo."
174177
@echo "Run \`make' in that directory to run these through makeinfo" \
175-
"(use \`make info' here to do that automatically)."
178+
"(use \`make info' here to do that automatically)."
176179

177180
info:
178181
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
@@ -194,12 +197,12 @@ linkcheck:
194197
$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
195198
@echo
196199
@echo "Link check complete; look for any errors in the above output " \
197-
"or in $(BUILDDIR)/linkcheck/output.txt."
200+
"or in $(BUILDDIR)/linkcheck/output.txt."
198201

199202
doctest:
200203
$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
201204
@echo "Testing of doctests in the sources finished, look at the " \
202-
"results in $(BUILDDIR)/doctest/output.txt."
205+
"results in $(BUILDDIR)/doctest/output.txt."
203206

204207
dashdoc:
205208
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/dashdoc

0 commit comments

Comments
 (0)