Skip to content

Commit

Permalink
update documentation metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
zacharyburnett committed Oct 24, 2022
1 parent fcea77f commit 1da1e91
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from pathlib import Path

import stsci_rtd_theme
import toml as toml
import tomli


def setup(app):
Expand All @@ -24,13 +24,14 @@ def setup(app):
# values here:
with open(REPO_ROOT / "pyproject.toml", "rb") as configuration_file:
conf = tomli.load(configuration_file)
setup_cfg = conf['project']
setup_metadata = conf['project']

project = setup_metadata["name"]
author = f'{setup_cfg["authors"][0]["name"]} <{setup_cfg["authors"][0]["email"]}>'
copyright = f'{datetime.datetime.now().year}, {author}'
primary_author = setup_metadata["authors"][0]
author = f'{primary_author["name"]} <{primary_author["email"]}>'
copyright = f'{datetime.now().year}, {primary_author["name"]}'

package = importlib.import_module(setup_metadata["name"])
package = importlib.import_module(project)
version = package.__version__.split("-", 1)[0]
release = package.__version__

Expand All @@ -53,4 +54,4 @@ def setup(app):
html_use_index = True

# Enable nitpicky mode - which ensures that all references in the docs resolve.
nitpicky = True
nitpicky = True

0 comments on commit 1da1e91

Please sign in to comment.