Skip to content

Commit

Permalink
docs config: using urls defined in pyproject.toml
Browse files Browse the repository at this point in the history
  • Loading branch information
ibressler committed Feb 13, 2023
1 parent bfaf1e0 commit 33d5f23
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 4 deletions.
18 changes: 16 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
from __future__ import unicode_literals

import os
from os.path import abspath, dirname, join

import toml

base_path = dirname(dirname(abspath(__file__)))
project_meta = toml.load(join(base_path, 'pyproject.toml'))

extensions = [
'sphinx.ext.autodoc',
Expand All @@ -27,8 +33,8 @@
pygments_style = 'trac'
templates_path = ['.']
extlinks = {
'issue': ('https://github.com/BAMresearch/jupyter_analysis_tools/issues/%s', '#%s'),
'pr': ('https://github.com/BAMresearch/jupyter_analysis_tools/pull/%s', 'PR #%s'),
'issue': (join(project_meta['project']['urls']['repository'], 'issues', '%s'), '#%s'),
'pr': (join(project_meta['project']['urls']['repository'], 'pull', '%s'), 'PR #%s'),
}
# on_rtd is whether we are on readthedocs.org
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
Expand All @@ -47,3 +53,11 @@
napoleon_use_ivar = True
napoleon_use_rtype = False
napoleon_use_param = False

linkcheck_ignore = [
join(
project_meta['project']['urls']['documentation'],
project_meta['tool']['coverage']['report']['path'],
)
+ r'.*',
]
3 changes: 1 addition & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@ classifiers = [
homepage = "https://bamresearch.github.io/jupyter_analysis_tools"
documentation = "https://bamresearch.github.io/jupyter_analysis_tools"
repository = "https://github.com/BAMresearch/jupyter_analysis_tools"
Changelog = "https://bamresearch.github.io/jupyter_analysis_tools/changelog.html"
Issues = "https://github.com/BAMresearch/jupyter_analysis_tools/issues"
changelog = "https://bamresearch.github.io/jupyter_analysis_tools/changelog.html"

[build-system]
requires = [
Expand Down

0 comments on commit 33d5f23

Please sign in to comment.