Skip to content

Commit

Permalink
Remove linkcheck (#287)
Browse files Browse the repository at this point in the history
* linkcheck failures now only issue warnings

* added blurb recommending to check CI workflow for linkcheck warnings
  • Loading branch information
michaelcdevin authored Oct 26, 2023
1 parent c74e4fc commit 882fc5d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 34 deletions.
15 changes: 2 additions & 13 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,20 +76,9 @@ The documentation uses the Jupyter notebook tutorials in the `examples` director
When building the documentation locally you will need to have installed [pandoc](https://pandoc.org/installing.html) and [gifsicle](https://github.com/kohler/gifsicle).
We recommend installing pandoc using its Anaconda distribution: `conda install -c conda-forge pandoc`.

**NOTE:** it may be expedient at times to:
**NOTE:** it may be expedient at times to avoid running the tutorial notebooks. To do so, add [`nbsphinx_execute = 'never'`](https://nbsphinx.readthedocs.io/en/0.9.3/configuration.html#nbsphinx_execute) to `docs/source/conf.py`. Make sure not to commit these changes!

1. **Avoid running the tutorial notebooks:** Add [`nbsphinx_execute = 'never'`](https://nbsphinx.readthedocs.io/en/0.9.3/configuration.html#nbsphinx_execute) to `docs/source/conf.py`
2. **Disable the link check operation:** Comment out the `linkcheck` call in `docs/build_docs.py`

```python
if __name__ == '__main__':
source.make_theory_animations
# linkcheck()
html()
cleanup()
```

Make sure not to commit these changes!
If you add or change any hyperlinks in the documentation, we recommend checking the "Build documentation" warnings in the GitHub Actions CI workflow to make sure the links will not cause an issue. The CI will not fail due to broken links, only issue a warning (see [issue #286](https://github.com/sandialabs/WecOptTool/issues/286)).

### Editing the tutorials
The tutorials are used as part of the Documentation.
Expand Down
2 changes: 1 addition & 1 deletion docs/build_docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def linkcheck():
linkcheck_dir,
doctree_dir,
'linkcheck',
warningiserror=True)
warningiserror=False)
app.build()


Expand Down
20 changes: 0 additions & 20 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,26 +57,6 @@ def setup(app):
'app.add_directive',
'app.add_role',]

linkcheck_ignore = [
'https://github.com/HIPS/autograd/blob/master/docs/tutorial.md#',
'https://doi.org/10.2172/1330189',
'https://sandialabs.github.io/WecOptTool/*',
'https://doi.org/10.1080/17445302.2015.1089052',
'https://digitalops.sandia.gov/*',
]

linkcheck_request_headers = {
'https://doi.org/10.1109/TSTE.2014.2371536': {
'User-Agent': 'my-app/0.0.1'
},
'https://doi.org/10.1109/9.467672': {
'User-Agent': 'my-app/0.0.1'
},
'https://doi.org/10.1109/TSTE.2023.3272868': {
'User-Agent': 'my-app/0.0.1'
},
}

# -- References (BibTex) -----------------------------------------------------
bibtex_bibfiles = ['wecopttool_refs.bib']
bibtex_encoding = 'utf-8-sig'
Expand Down

0 comments on commit 882fc5d

Please sign in to comment.