gnarly 0.0.0.dev7__tar.gz → 0.0.0.dev9__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of gnarly might be problematic. Click here for more details.
- {gnarly-0.0.0.dev7 → gnarly-0.0.0.dev9}/PKG-INFO +2 -2
- {gnarly-0.0.0.dev7 → gnarly-0.0.0.dev9}/pyproject.toml +4 -9
- {gnarly-0.0.0.dev7 → gnarly-0.0.0.dev9}/src/gnarly/types.py +2 -4
- {gnarly-0.0.0.dev7 → gnarly-0.0.0.dev9}/src/gnarly/utils/code/projects.py +19 -5
- {gnarly-0.0.0.dev7 → gnarly-0.0.0.dev9}/src/gnarly/utils/llm/models.py +11 -21
- {gnarly-0.0.0.dev7 → gnarly-0.0.0.dev9}/uv.lock +1 -1
- {gnarly-0.0.0.dev7 → gnarly-0.0.0.dev9}/.gitignore +0 -0
- {gnarly-0.0.0.dev7 → gnarly-0.0.0.dev9}/.python-version +0 -0
- {gnarly-0.0.0.dev7 → gnarly-0.0.0.dev9}/README.md +0 -0
- {gnarly-0.0.0.dev7 → gnarly-0.0.0.dev9}/docs/Makefile +0 -0
- {gnarly-0.0.0.dev7 → gnarly-0.0.0.dev9}/docs/api/gnarly.rst +0 -0
- {gnarly-0.0.0.dev7 → gnarly-0.0.0.dev9}/docs/api/gnarly.utils.code.rst +0 -0
- {gnarly-0.0.0.dev7 → gnarly-0.0.0.dev9}/docs/api/gnarly.utils.llm.rst +0 -0
- {gnarly-0.0.0.dev7 → gnarly-0.0.0.dev9}/docs/api/gnarly.utils.rst +0 -0
- {gnarly-0.0.0.dev7 → gnarly-0.0.0.dev9}/docs/api/modules.rst +0 -0
- {gnarly-0.0.0.dev7 → gnarly-0.0.0.dev9}/docs/make.bat +0 -0
- {gnarly-0.0.0.dev7 → gnarly-0.0.0.dev9}/docs/source/api/gnarly.rst +0 -0
- {gnarly-0.0.0.dev7 → gnarly-0.0.0.dev9}/docs/source/api/gnarly.utils.code.rst +0 -0
- {gnarly-0.0.0.dev7 → gnarly-0.0.0.dev9}/docs/source/api/gnarly.utils.llm.rst +0 -0
- {gnarly-0.0.0.dev7 → gnarly-0.0.0.dev9}/docs/source/api/gnarly.utils.rst +0 -0
- {gnarly-0.0.0.dev7 → gnarly-0.0.0.dev9}/docs/source/api/modules.rst +0 -0
- {gnarly-0.0.0.dev7 → gnarly-0.0.0.dev9}/docs/source/api.md +0 -0
- {gnarly-0.0.0.dev7 → gnarly-0.0.0.dev9}/docs/source/conf.py +0 -0
- {gnarly-0.0.0.dev7 → gnarly-0.0.0.dev9}/docs/source/index.md +0 -0
- {gnarly-0.0.0.dev7 → gnarly-0.0.0.dev9}/docs/source/usage.md +0 -0
- {gnarly-0.0.0.dev7 → gnarly-0.0.0.dev9}/src/gnarly/__init__.py +0 -0
- {gnarly-0.0.0.dev7 → gnarly-0.0.0.dev9}/src/gnarly/constants.py +0 -0
- {gnarly-0.0.0.dev7 → gnarly-0.0.0.dev9}/src/gnarly/errors.py +0 -0
- {gnarly-0.0.0.dev7 → gnarly-0.0.0.dev9}/src/gnarly/utils/__init__.py +0 -0
- {gnarly-0.0.0.dev7 → gnarly-0.0.0.dev9}/src/gnarly/utils/code/__init__.py +0 -0
- {gnarly-0.0.0.dev7 → gnarly-0.0.0.dev9}/src/gnarly/utils/io.py +0 -0
- {gnarly-0.0.0.dev7 → gnarly-0.0.0.dev9}/src/gnarly/utils/llm/__init__.py +0 -0
- {gnarly-0.0.0.dev7 → gnarly-0.0.0.dev9}/src/gnarly/utils/llm/chatgpt.py +0 -0
- {gnarly-0.0.0.dev7 → gnarly-0.0.0.dev9}/src/gnarly/utils/llm/claude.py +0 -0
- {gnarly-0.0.0.dev7 → gnarly-0.0.0.dev9}/src/gnarly/utils/llm/interfaces.py +0 -0
- {gnarly-0.0.0.dev7 → gnarly-0.0.0.dev9}/tests/__init__.py +0 -0
- {gnarly-0.0.0.dev7 → gnarly-0.0.0.dev9}/tests/test_constants.py +0 -0
- {gnarly-0.0.0.dev7 → gnarly-0.0.0.dev9}/tests/test_io_utilities.py +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: gnarly
|
|
3
|
-
Version: 0.0.0.
|
|
4
|
-
Summary:
|
|
3
|
+
Version: 0.0.0.dev9
|
|
4
|
+
Summary: A sophisticated, general-use abstraction layer for the lazy.
|
|
5
5
|
Author-email: "K. LeBryce" <k.lebryce@pm.me>
|
|
6
6
|
Requires-Python: >=3.10
|
|
7
7
|
Requires-Dist: python-dotenv>=1.1.0
|
|
@@ -1,16 +1,11 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "gnarly"
|
|
3
|
-
version = "0.0.
|
|
4
|
-
description = "
|
|
3
|
+
version = "0.0.0dev9"
|
|
4
|
+
description = "A sophisticated, general-use abstraction layer for the lazy."
|
|
5
5
|
readme = "README.md"
|
|
6
|
-
authors = [
|
|
7
|
-
{ name = "K. LeBryce", email = "k.lebryce@pm.me" }
|
|
8
|
-
]
|
|
6
|
+
authors = [{ name = "K. LeBryce", email = "k.lebryce@pm.me" }]
|
|
9
7
|
requires-python = ">=3.10"
|
|
10
|
-
dependencies = [
|
|
11
|
-
"python-dotenv>=1.1.0",
|
|
12
|
-
"starch",
|
|
13
|
-
]
|
|
8
|
+
dependencies = ["python-dotenv>=1.1.0", "starch"]
|
|
14
9
|
|
|
15
10
|
[project.scripts]
|
|
16
11
|
gnarly = "gnarly:main"
|
|
@@ -94,9 +94,7 @@ class GnarlyNamespace(ABC):
|
|
|
94
94
|
logger.error("`Project` is not intended for direct instantiation.")
|
|
95
95
|
raise NamespaceError(
|
|
96
96
|
f"`{cls.__name__}` is a namespace, which means that it "
|
|
97
|
-
"has no constructors. Instead, you should call one of
|
|
98
|
-
"static factory methods
|
|
99
|
-
"all of which return instances of the `GnarlyProject` base "
|
|
100
|
-
"class's concrete implementations."
|
|
97
|
+
"has no constructors. Instead, you should call one of its "
|
|
98
|
+
"provided, static factory methods."
|
|
101
99
|
)
|
|
102
100
|
|
|
@@ -8,6 +8,7 @@ project management.
|
|
|
8
8
|
"""
|
|
9
9
|
import logging
|
|
10
10
|
from os import PathLike
|
|
11
|
+
from pathlib import Path
|
|
11
12
|
|
|
12
13
|
from ...constants import GNARLY_PROJECT_ROOT_PATH
|
|
13
14
|
# from ...errors import NamespaceError
|
|
@@ -38,7 +39,7 @@ class Project(GnarlyNamespace):
|
|
|
38
39
|
"""
|
|
39
40
|
|
|
40
41
|
|
|
41
|
-
class Python:
|
|
42
|
+
class Python(GnarlyNamespace):
|
|
42
43
|
"""
|
|
43
44
|
A namespace for Gnarly's Python project management utilities.
|
|
44
45
|
|
|
@@ -89,18 +90,17 @@ class Project(GnarlyNamespace):
|
|
|
89
90
|
name: str = "gnarly_python_project",
|
|
90
91
|
project_type = GnarlyProjectType.PYTHON,
|
|
91
92
|
is_persistent: bool = True,
|
|
92
|
-
root_path: PathLike = GNARLY_PROJECT_ROOT_PATH / "gnarly_project",
|
|
93
93
|
dependencies: dict[str, list[str]] = {
|
|
94
94
|
"dev": [],
|
|
95
95
|
"optional": [],
|
|
96
96
|
"required": []
|
|
97
97
|
}
|
|
98
|
-
) ->
|
|
98
|
+
) -> GnarlyPythonProject:
|
|
99
99
|
"""
|
|
100
100
|
Create a Python project.
|
|
101
101
|
|
|
102
102
|
Rather than instantiating ``GnarlyPythonProject`` directly, you
|
|
103
|
-
call this static method on
|
|
103
|
+
call this static method on the ``Project.Python`` namespace.
|
|
104
104
|
|
|
105
105
|
Parameters
|
|
106
106
|
----------
|
|
@@ -121,6 +121,21 @@ class Project(GnarlyNamespace):
|
|
|
121
121
|
A new instance of ``GnarlyPythonProject``.
|
|
122
122
|
|
|
123
123
|
"""
|
|
124
|
+
root_path = GNARLY_PROJECT_ROOT_PATH / name
|
|
125
|
+
root_path.mkdir(parents=True, exist_ok=True)
|
|
126
|
+
|
|
127
|
+
root_path_filenames: list[str] = [
|
|
128
|
+
"README.md",
|
|
129
|
+
"LICENSE.txt",
|
|
130
|
+
"pyproject.toml"
|
|
131
|
+
]
|
|
132
|
+
for p in root_path_filenames:
|
|
133
|
+
Path(root_path, p).touch(exist_ok=True)
|
|
134
|
+
logger.info(f"Created {p}")
|
|
135
|
+
|
|
136
|
+
core_package_dir: Path = root_path / f"src/{name}"
|
|
137
|
+
core_package_dir.mkdiir(parents=True, exist_ok=True)
|
|
138
|
+
|
|
124
139
|
|
|
125
140
|
return Project.create(
|
|
126
141
|
name=name,
|
|
@@ -201,4 +216,3 @@ class Project(GnarlyNamespace):
|
|
|
201
216
|
dependencies=dependencies
|
|
202
217
|
)
|
|
203
218
|
|
|
204
|
-
|
|
@@ -46,29 +46,19 @@ OPENAI_API_KEY = os.getenv("OPENAI_API_KEY")
|
|
|
46
46
|
|
|
47
47
|
|
|
48
48
|
# Get LLM conversation directories.
|
|
49
|
-
CLAUDE_CONVERSATIONS_DIR =
|
|
50
|
-
|
|
49
|
+
CLAUDE_CONVERSATIONS_DIR = Path(
|
|
50
|
+
os.getenv(
|
|
51
|
+
"CLAUDE_CONVERSATIONS_DIR",
|
|
52
|
+
str(llm_directory / "claude/conversations")
|
|
53
|
+
)
|
|
51
54
|
)
|
|
52
|
-
CHATGPT_CONVERSATIONS_DIR = os.getenv(
|
|
53
|
-
"CHATGPT_CONVERSATIONS_DIR", str(llm_directory / "chatgpt/conversations")
|
|
54
|
-
)
|
|
55
|
-
|
|
56
55
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
logger.info(f"Successfully created `{CLAUDE_CONVERSATIONS_DIR}`.")
|
|
64
|
-
|
|
65
|
-
if not Path(CHATGPT_CONVERSATIONS_DIR).exists():
|
|
66
|
-
try:
|
|
67
|
-
Path(CHATGPT_CONVERSATIONS_DIR).mkdir(parents=True, exist_ok=True)
|
|
68
|
-
except FileExistsError as e:
|
|
69
|
-
raise Exception(f"ERROR: The file `{CHATGPT_CONVERSATIONS_DIR}` already exists.")
|
|
70
|
-
else:
|
|
71
|
-
logger.info(f"Successfully created `{CHATGPT_CONVERSATIONS_DIR}`.")
|
|
56
|
+
CHATGPT_CONVERSATIONS_DIR = Path(
|
|
57
|
+
os.getenv(
|
|
58
|
+
"CHATGPT_CONVERSATIONS_DIR",
|
|
59
|
+
str(llm_directory / "chatgpt/conversations")
|
|
60
|
+
)
|
|
61
|
+
)
|
|
72
62
|
|
|
73
63
|
|
|
74
64
|
class LLM(Protocol):
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|