forked from langchain-ai/langchain
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/master'
- Loading branch information
Showing
49 changed files
with
203 additions
and
12,745 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
import json | ||
import sys | ||
|
||
ALL_DIRS = { | ||
"libs/core", | ||
"libs/langchain", | ||
"libs/experimental", | ||
} | ||
|
||
if __name__ == "__main__": | ||
files = sys.argv[1:] | ||
dirs_to_run = set() | ||
|
||
for file in files: | ||
if any( | ||
file.startswith(dir_) | ||
for dir_ in ( | ||
".github/workflows", | ||
".github/tools", | ||
".github/actions", | ||
"libs/core", | ||
".github/scripts/check_diff.py", | ||
) | ||
): | ||
dirs_to_run = ALL_DIRS | ||
break | ||
elif "libs/community" in file: | ||
dirs_to_run.update( | ||
("libs/community", "libs/langchain", "libs/experimental") | ||
) | ||
elif "libs/partners" in file: | ||
partner_dir = file.split("/")[2] | ||
dirs_to_run.update( | ||
(f"libs/partners/{partner_dir}", "libs/langchain", "libs/experimental") | ||
) | ||
elif "libs/langchain" in file: | ||
dirs_to_run.update(("libs/langchain", "libs/experimental")) | ||
elif "libs/experimental" in file: | ||
dirs_to_run.add("libs/experimental") | ||
elif file.startswith("libs/"): | ||
dirs_to_run = ALL_DIRS | ||
break | ||
else: | ||
pass | ||
print(json.dumps(list(dirs_to_run))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
--- | ||
name: Check library diffs | ||
|
||
on: | ||
push: | ||
branches: [master] | ||
pull_request: | ||
paths: | ||
- ".github/actions/**" | ||
- ".github/tools/**" | ||
- ".github/workflows/**" | ||
- "libs/**" | ||
|
||
# If another push to the same PR or branch happens while this workflow is still running, | ||
# cancel the earlier run in favor of the next run. | ||
# | ||
# There's no point in testing an outdated version of the code. GitHub only allows | ||
# a limited number of job runners to be active at the same time, so it's better to cancel | ||
# pointless jobs early so that more useful jobs can run sooner. | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.10' | ||
- id: files | ||
uses: Ana06/[email protected] | ||
- id: set-matrix | ||
run: echo "dirs-to-run=$(python .github/scripts/check_diff.py ${{ steps.files.outputs.all }})" >> $GITHUB_OUTPUT | ||
outputs: | ||
dirs-to-run: ${{ steps.set-matrix.outputs.dirs-to-run }} | ||
ci: | ||
needs: [ build ] | ||
strategy: | ||
matrix: | ||
working-directory: ${{ fromJson(needs.build.outputs.dirs-to-run) }} | ||
uses: ./.github/workflows/_all_ci.yml | ||
with: | ||
working-directory: ${{ matrix.working-directory }} | ||
|
||
|
Oops, something went wrong.