yardstick-predict 0.4.0__py3-none-any.whl
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.
- yardstick_predict/__init__.py +35 -0
- yardstick_predict/__main__.py +5 -0
- yardstick_predict/archives.py +1454 -0
- yardstick_predict/benchmarks.py +107 -0
- yardstick_predict/check.py +310 -0
- yardstick_predict/claude_code.py +1423 -0
- yardstick_predict/cli.py +2727 -0
- yardstick_predict/embeddings.py +901 -0
- yardstick_predict/estimate.py +228 -0
- yardstick_predict/feature_store.py +704 -0
- yardstick_predict/features.py +683 -0
- yardstick_predict/files.py +58 -0
- yardstick_predict/forecast.py +478 -0
- yardstick_predict/history.py +145 -0
- yardstick_predict/llm.py +718 -0
- yardstick_predict/locks.py +53 -0
- yardstick_predict/menu.py +185 -0
- yardstick_predict/model.py +2125 -0
- yardstick_predict/model_0_3.py +111 -0
- yardstick_predict/model_types.py +157 -0
- yardstick_predict/pipeline.py +1002 -0
- yardstick_predict/prices.json +68 -0
- yardstick_predict/prices.py +59 -0
- yardstick_predict/store.py +800 -0
- yardstick_predict/ui.py +300 -0
- yardstick_predict-0.4.0.dist-info/METADATA +351 -0
- yardstick_predict-0.4.0.dist-info/RECORD +30 -0
- yardstick_predict-0.4.0.dist-info/WHEEL +4 -0
- yardstick_predict-0.4.0.dist-info/entry_points.txt +2 -0
- yardstick_predict-0.4.0.dist-info/licenses/LICENSE +202 -0
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"""Forecast how long a coding-agent task will take and what it will cost, before it runs."""
|
|
2
|
+
|
|
3
|
+
import os
|
|
4
|
+
import sys
|
|
5
|
+
|
|
6
|
+
__version__ = "0.4.0"
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
def _keep_the_current_folder_out(argv: list[str] | None = None) -> None:
|
|
10
|
+
"""When Python runs one of this package's modules with -m, keep the folder it started in off the import path.
|
|
11
|
+
|
|
12
|
+
Python's -m puts that folder first, so a file there, such as a project's own json.py, would be imported in
|
|
13
|
+
place of Python's own. The commands this package installs start Python with -P, which keeps the folder
|
|
14
|
+
out. Commands installed by older versions don't, so this takes the folder out before the package imports
|
|
15
|
+
anything else. A file that Python itself loads before this package can still get in, so installing the
|
|
16
|
+
commands again is the real fix.
|
|
17
|
+
"""
|
|
18
|
+
if sys.flags.safe_path:
|
|
19
|
+
return
|
|
20
|
+
argv = list(getattr(sys, "orig_argv", [])) if argv is None else argv
|
|
21
|
+
try:
|
|
22
|
+
module = argv[argv.index("-m", 1) + 1]
|
|
23
|
+
except (ValueError, IndexError):
|
|
24
|
+
return
|
|
25
|
+
if module.split(".")[0] != __name__:
|
|
26
|
+
return
|
|
27
|
+
try:
|
|
28
|
+
here = os.getcwd()
|
|
29
|
+
except OSError:
|
|
30
|
+
here = None
|
|
31
|
+
if sys.path and sys.path[0] in ("", here):
|
|
32
|
+
del sys.path[0]
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
_keep_the_current_folder_out()
|