Skip to content

Commit 984545e

Browse files
authored
chore: support repo-review 1.0 prefetch (#763)
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
1 parent 4937a5b commit 984545e

2 files changed

Lines changed: 36 additions & 0 deletions

File tree

pyproject.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,11 @@ workflows = "sp_repo_review.checks.github:workflows"
8282
[project.entry-points."repo_review.families"]
8383
scikit-hep = "sp_repo_review.families:get_families"
8484

85+
[project.entry-points."repo_review.prefetch_files"]
86+
root = "sp_repo_review.files:prefetch_root"
87+
package = "repo_review.files:prefetch_package"
88+
89+
8590
[dependency-groups]
8691
dev = [
8792
{ include-group = "test" },

src/sp_repo_review/files.py

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
from __future__ import annotations
2+
3+
4+
def prefetch_root() -> set[str]:
5+
"""
6+
This entry-point lists files that should be prefetched. This is a suggestion
7+
for async loading.
8+
"""
9+
10+
return {
11+
"setup.cfg",
12+
}
13+
14+
15+
def prefetch_package() -> set[str]:
16+
"""
17+
This entry-point lists files that should be prefetched. This is a suggestion
18+
for async loading.
19+
"""
20+
21+
return {
22+
".github/dependabot.yml",
23+
".github/dependabot.yaml",
24+
".github/workflows/*.yml",
25+
".github/workflows/*.yaml",
26+
".pre-commit-config.yaml",
27+
".readthedocs.yml",
28+
"noxfile.py",
29+
"ruff.toml",
30+
".ruff.toml",
31+
}

0 commit comments

Comments
 (0)