Skip to content
This repository was archived by the owner on Mar 13, 2024. It is now read-only.

Commit 06ce996

Browse files
OCoppingcoretl
authored andcommitted
Added check for author and author_email in setup.cfg, if they don't exist an error is raised.
1 parent 989fd4e commit 06ce996

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/dls_python3_skeleton/__main__.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,13 +149,22 @@ def new(args):
149149
)
150150

151151

152+
cfg_issue = """Missing parameter in setup.cfg. Expected format:
153+
[metadata]
154+
name = example
155+
author = Firstname Lastname
156+
author_email = [email protected]"""
157+
158+
152159
def existing(args):
153160
path: Path = args.path
154161

155162
assert path.is_dir(), f"Expected {path} to be an existing directory"
156163
package = validate_package(args)
157164
conf = ConfigParser()
158165
conf.read(path / "setup.cfg")
166+
assert "author" in conf["metadata"], cfg_issue
167+
assert "author_email" in conf["metadata"], cfg_issue
159168
merge_skeleton(
160169
path=args.path,
161170
org=args.org,

0 commit comments

Comments
 (0)