Skip to content

Commit

Permalink
linkcheck failures now only issue warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelcdevin committed Oct 25, 2023
1 parent c74e4fc commit d44cd30
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 35 deletions.
15 changes: 1 addition & 14 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,20 +76,7 @@ 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:

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!
**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!

### 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 d44cd30

Please sign in to comment.