Skip to content
This repository has been archived by the owner on Aug 11, 2023. It is now read-only.

Commit

Permalink
Merge pull request #482 from nstarman/linkcheck
Browse files Browse the repository at this point in the history
add linkcheck
  • Loading branch information
pllim committed Oct 28, 2020
2 parents 3d9f6d6 + 6093679 commit ff5fbde
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 0 deletions.
2 changes: 2 additions & 0 deletions TEMPLATE_CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ be copied over manually if desired.
- Refactored the template to follow the recommendations in APE 17:
https://github.com/astropy/astropy-APEs/blob/master/APE17.rst [#438]

- Added cron job for RST link checking [#482]

2.1 (unreleased)
----------------

Expand Down
12 changes: 12 additions & 0 deletions {{ cookiecutter.package_name }}/.travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,17 @@ matrix:
stage: Initial tests
env: TOXENV=codestyle

# Run documentation link check in a cron job.
- language: python
python: 3.8
name: Documentation link check
stage: Cron tests
env: TOXENV=linkcheck
addons:
apt:
packages:
- graphviz

allow_failures:
# Do a PEP8 test with flake8
# (do allow to fail unless your code completely compliant)
Expand All @@ -136,6 +147,7 @@ matrix:
# stage: Initial tests
# env: TOXENV=codestyle


before_install:
# Create a coverage.xml for use by coveralls or codecov
- if [[ $TOXENV == *-cov ]]; then
Expand Down
9 changes: 9 additions & 0 deletions {{ cookiecutter.package_name }}/docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,15 @@
# -- Resolving issue number to links in changelog -----------------------------
github_issues_url = 'https://github.com/{0}/issues/'.format(setup_cfg['github_project'])


# -- Options for linkcheck output -------------------------------------------
linkcheck_retry = 5
linkcheck_ignore = [
r'https://github\.com/{{ cookiecutter.github_project }}/(?:issues|pull)/\d+',
]
linkcheck_timeout = 180
linkcheck_anchors = False

# -- Turn on nitpicky mode for sphinx (to warn about references not found) ----
#
# nitpicky = True
Expand Down

0 comments on commit ff5fbde

Please sign in to comment.