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

Commit 5bbe962

Browse files
OCoppingcoretl
authored andcommitted
Added checks for missing setup.cfg file and 'metadata' tag in setup.cfg file
1 parent 9810a85 commit 5bbe962

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/dls_python3_skeleton/__main__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,8 +168,11 @@ def existing(args):
168168

169169
assert path.is_dir(), f"Expected {path} to be an existing directory"
170170
package = validate_package(args)
171+
file_path: Path = path / "setup.cfg"
172+
assert file_path.is_file(), "Expected a setup.cfg file in the directory."
171173
conf = ConfigParser()
172174
conf.read(path / "setup.cfg")
175+
assert "metadata" in conf, cfg_issue
173176
assert "author" in conf["metadata"], cfg_issue
174177
assert "author_email" in conf["metadata"], cfg_issue
175178
merge_skeleton(

0 commit comments

Comments
 (0)