Skip to content

Commit bd3ec0e

Browse files
PicoCentauriagoscinski
authored andcommitted
Parse authors and project from pyproject.toml
1 parent bb4a0a6 commit bd3ec0e

File tree

5 files changed

+10
-13
lines changed

5 files changed

+10
-13
lines changed

MANIFEST.in

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
graft src
22

33
include LICENSE
4-
include contributors.txt
54
include README.rst
65

76
prune docs
8-
prune developer
97
prune examples
108
prune tests
119
prune .github

contributors.txt

Lines changed: 0 additions & 8 deletions
This file was deleted.

docs/requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ sphinx
22
sphinx-gallery
33
sphinx-toggleprompt
44
pydata-sphinx-theme
5+
tomli

docs/src/conf.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
import sys
1515
from datetime import datetime
1616

17+
import tomli # Replace by tomllib from std library once docs are build with Python 3.11
18+
1719
import skmatter
1820

1921

@@ -25,8 +27,12 @@
2527
# The master toctree document.
2628
master_doc = "index"
2729

28-
project = "scikit-matter"
29-
author = ", ".join(open(os.path.join(ROOT, "contributors.txt")).read().splitlines())
30+
with open(os.path.join(ROOT, "pyproject.toml"), "rb") as fp:
31+
project_dict = tomli.load(fp)["project"]
32+
33+
project = project_dict["name"]
34+
author = ", ".join(a["name"] for a in project_dict["authors"])
35+
3036
copyright = f"{datetime.now().date().year}, {author}"
3137

3238
# The full version, including alpha/beta/rc tags

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ authors = [
1515
{name = "Alexander Goscinski"},
1616
{name = "Benjamin A. Helfrecht"},
1717
{name = "Victor P. Principe"},
18-
{name = "philip Loche"},
18+
{name = "Philip Loche"},
1919
{name = "Michele Ceriotti"}
2020
]
2121
readme = "README.rst"

0 commit comments

Comments
 (0)