mirror of
https://github.com/hwchase17/langchain.git
synced 2025-08-13 22:59:05 +00:00
infra: run CI on large diffs (#23192)
currently we skip CI on diffs >= 300 files. think we should just run it on all packages instead --------- Co-authored-by: Erick Friis <erick@langchain.dev>
This commit is contained in:
parent
c2d43544cc
commit
255ad39ae3
11
.github/scripts/check_diff.py
vendored
11
.github/scripts/check_diff.py
vendored
@ -15,6 +15,10 @@ LANGCHAIN_DIRS = [
|
|||||||
"libs/experimental",
|
"libs/experimental",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
def all_package_dirs() -> Set[str]:
|
||||||
|
return {"/".join(path.split("/")[:-1]) for path in glob.glob("./libs/**/pyproject.toml", recursive=True)}
|
||||||
|
|
||||||
|
|
||||||
def dependents_graph() -> dict:
|
def dependents_graph() -> dict:
|
||||||
dependents = defaultdict(set)
|
dependents = defaultdict(set)
|
||||||
|
|
||||||
@ -53,10 +57,11 @@ if __name__ == "__main__":
|
|||||||
}
|
}
|
||||||
docs_edited = False
|
docs_edited = False
|
||||||
|
|
||||||
if len(files) == 300:
|
if len(files) >= 300:
|
||||||
# max diff length is 300 files - there are likely files missing
|
# max diff length is 300 files - there are likely files missing
|
||||||
raise ValueError("Max diff reached. Please manually run CI on changed libs.")
|
dirs_to_run["lint"] = all_package_dirs()
|
||||||
|
dirs_to_run["test"] = all_package_dirs()
|
||||||
|
dirs_to_run["extended-test"] = set(LANGCHAIN_DIRS)
|
||||||
for file in files:
|
for file in files:
|
||||||
if any(
|
if any(
|
||||||
file.startswith(dir_)
|
file.startswith(dir_)
|
||||||
|
Loading…
Reference in New Issue
Block a user