Skip to content

Commit

Permalink
Merge pull request #5 from flaxandteal/fix/project-root-finding-tests
Browse files Browse the repository at this point in the history
Fix/project root finding tests
  • Loading branch information
taylorn01 authored Jun 7, 2024
2 parents 1dc6714 + 6a0ba1f commit 6d6d182
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion act.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,13 @@ def _get_arches_project_name(root: Path):
for submodule in root.glob("*/__init__.py"):
if project_name:
raise RuntimeError("There should be exactly one Python package in the project root!")
project_name = str(submodule.parent.parts[-1])
name = str(submodule.parent.parts[-1])
if name in ['tests']:
continue
project_name = name
if not project_name:
raise RuntimeError("Could not find a Python project in the project root!")

return project_name

def __init__(self, root):
Expand Down

0 comments on commit 6d6d182

Please sign in to comment.