github-rest-api 0.9.0__tar.gz → 0.10.1__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.
- {github_rest_api-0.9.0 → github_rest_api-0.10.1}/PKG-INFO +1 -1
- {github_rest_api-0.9.0 → github_rest_api-0.10.1}/github_rest_api/actions/cargo.py +9 -7
- {github_rest_api-0.9.0 → github_rest_api-0.10.1}/pyproject.toml +1 -1
- {github_rest_api-0.9.0 → github_rest_api-0.10.1}/README.md +0 -0
- {github_rest_api-0.9.0 → github_rest_api-0.10.1}/github_rest_api/__init__.py +0 -0
- {github_rest_api-0.9.0 → github_rest_api-0.10.1}/github_rest_api/actions/__init__.py +0 -0
- {github_rest_api-0.9.0 → github_rest_api-0.10.1}/github_rest_api/actions/utils.py +0 -0
- {github_rest_api-0.9.0 → github_rest_api-0.10.1}/github_rest_api/github.py +0 -0
|
@@ -38,7 +38,7 @@ def _copy_bench_results(bench_dir: Path, storage: str) -> None:
|
|
|
38
38
|
"""Copy benchmark results into the right directory.
|
|
39
39
|
:param bench_dir: The root benchmark directory
|
|
40
40
|
(under the gh-pages branch).
|
|
41
|
-
:param
|
|
41
|
+
:param storage: The directory relative to bench_dir for storing this benchmark results.
|
|
42
42
|
"""
|
|
43
43
|
switch_branch("gh-pages", fetch=True)
|
|
44
44
|
src = Path("target/criterion")
|
|
@@ -159,11 +159,13 @@ def _sort_cips(
|
|
|
159
159
|
|
|
160
160
|
|
|
161
161
|
def _clean_bench_dirs(bench_dir: Path, history: int) -> list[Path]:
|
|
162
|
-
dirs = sorted(
|
|
162
|
+
dirs = sorted(bench_dir.glob("[1-9]*/"))
|
|
163
163
|
for path in dirs[:-history]:
|
|
164
164
|
shutil.rmtree(path)
|
|
165
165
|
dirs = dirs[-history:]
|
|
166
|
-
|
|
166
|
+
dev = bench_dir / "dev"
|
|
167
|
+
if dev.is_dir():
|
|
168
|
+
dirs.append(dev)
|
|
167
169
|
return dirs
|
|
168
170
|
|
|
169
171
|
|
|
@@ -177,7 +179,7 @@ def benchmark(
|
|
|
177
179
|
repo: str,
|
|
178
180
|
local_repo_dir: str,
|
|
179
181
|
bench_dir: str | Path,
|
|
180
|
-
|
|
182
|
+
pr_number: str,
|
|
181
183
|
storage: str = "",
|
|
182
184
|
history: int = 20,
|
|
183
185
|
):
|
|
@@ -187,15 +189,15 @@ def benchmark(
|
|
|
187
189
|
:param repo: The name of the repository.
|
|
188
190
|
:param local_repo_dir: Root directory of the local repository.
|
|
189
191
|
:param bench_dir: The root benchmark directory (under the gh-pages branch).
|
|
190
|
-
:param
|
|
192
|
+
:param pr_number: The number of the corresponding PR.
|
|
191
193
|
:param storage: The directory relative to bench_dir for storing this benchmark results.
|
|
192
|
-
If not specified (empty or None),
|
|
194
|
+
If not specified (empty or None), pr_number is used.
|
|
193
195
|
:param history: The number of historical benchmark results to keep.
|
|
194
196
|
"""
|
|
195
197
|
if isinstance(bench_dir, str):
|
|
196
198
|
bench_dir = Path(bench_dir)
|
|
197
199
|
if not storage:
|
|
198
|
-
storage =
|
|
200
|
+
storage = pr_number
|
|
199
201
|
config_git(
|
|
200
202
|
local_repo_dir=local_repo_dir,
|
|
201
203
|
user_email=f"bench-bot@{repo}.com",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|