Skip to content

Commit 73cffa3

Browse files
committed
Used find-project-root pkg in Py scripts ↞ [auto-sync from https://github.com/KudoAI/ai-personas/tree/main/python]
1 parent 93a1f82 commit 73cffa3

3 files changed

Lines changed: 8 additions & 3 deletions

File tree

ai-personas/pyproject.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ classifiers = [
8585
]
8686

8787
[project.urls]
88-
Changelog = "https://github.com/KudoAI/ai-personas/releases/tag/python-v1.4.0"
88+
Changelog = "https://github.com/KudoAI/ai-personas/releases/tag/python-1.4.0"
8989
Documentation = "https://github.com/KudoAI/ai-personas/tree/main/python/#readme"
9090
Funding = "https://github.com/sponsors/KudoAI"
9191
Homepage = "https://github.com/KudoAI/ai-personas/#readme"
@@ -96,6 +96,7 @@ Repository = "https://github.com/KudoAI/ai-personas"
9696

9797
[project.optional-dependencies]
9898
dev = [
99+
"find-project-root>=1.0.4,<2",
99100
"nox>=2026.4.10",
100101
"pre-commit>=4.5.1,<5",
101102
"tomli>=2.4.1,<3",

ai-personas/utils/bump.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@
22
from pathlib import Path
33
from types import SimpleNamespace as sn
44

5+
import find_project_root
6+
57
from .lib import data, log, toml
68

7-
paths = sn(root=Path(__file__).parent.parent)
9+
paths = sn(root=Path(find_project_root())) # type: ignore
810
paths.pyproject = paths.root / 'pyproject.toml'
911
paths.readme = paths.root / 'docs/README.md'
1012
paths.util_msgs = paths.root / 'utils/data/messages.json'

ai-personas/utils/clean.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,12 @@
22
import shutil, sys
33
from types import SimpleNamespace as sn
44

5+
import find_project_root
6+
57
from .lib import data, log
68

79
def main():
8-
msgs_path = Path(__file__).parent / 'data/messages.json'
10+
msgs_path = Path(find_project_root()) / 'data/messages.json' # type: ignore
911
msgs = sn(**{ key:val['message'] for key,val in data.json.read(msgs_path)['clean'].items() })
1012
targets = ['*.pyc']
1113
if '--py2' not in sys.argv:

0 commit comments

Comments
 (0)