Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into INTPYTHON-330-GraphRAG
Browse files Browse the repository at this point in the history
  • Loading branch information
caseyclements committed Jan 23, 2025
2 parents 88ea09e + 4b757b5 commit de3c7ab
Show file tree
Hide file tree
Showing 54 changed files with 8,159 additions and 34,146 deletions.
93 changes: 0 additions & 93 deletions .github/actions/poetry_setup/action.yml

This file was deleted.

12 changes: 2 additions & 10 deletions .github/scripts/check_diff.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,15 @@
raise ValueError("Max diff reached. Please manually run CI on changed libs.")

for file in files:
if any(
file.startswith(dir_)
for dir_ in (
".github/workflows",
".github/tools",
".github/actions",
".github/scripts/check_diff.py",
)
):
if any(file.startswith(dir_) for dir_ in (".github", "scripts")):
# add all LIB_DIRS for infra changes
dirs_to_run["test"].update(LIB_DIRS)
dirs_to_run["lint"].update(LIB_DIRS)

if any(file.startswith(dir_) for dir_ in LIB_DIRS):
for dir_ in LIB_DIRS:
if file.startswith(dir_):
dirs_to_run["test"].add(dir_)
if "langgraph-checkpoint-mongodb/tests" not in file:
dirs_to_run["lint"].add(dir_)
elif file.startswith("libs/"):
raise ValueError(
Expand Down
65 changes: 0 additions & 65 deletions .github/scripts/get_min_versions.py

This file was deleted.

41 changes: 9 additions & 32 deletions .github/workflows/_lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ on:
description: "From which folder this pipeline executes"

env:
POETRY_VERSION: "1.7.1"
WORKDIR: ${{ inputs.working-directory == '' && '.' || inputs.working-directory }}

# This env var allows us to get inline annotations when ruff has complaints.
Expand All @@ -34,41 +33,20 @@ jobs:
- "3.12"
steps:
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }} + Poetry ${{ env.POETRY_VERSION }}
uses: "./.github/actions/poetry_setup"
with:
persist-credentials: false
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
enable-cache: true
python-version: ${{ matrix.python-version }}
poetry-version: ${{ env.POETRY_VERSION }}
working-directory: ${{ inputs.working-directory }}
cache-key: lint-with-extras

- name: Check Poetry File
shell: bash
working-directory: ${{ inputs.working-directory }}
run: |
poetry check
- name: Check lock file
shell: bash
working-directory: ${{ inputs.working-directory }}
run: |
poetry lock --check
cache-dependency-glob: "${{ inputs.working-directory }}/uv.lock"

- uses: extractions/setup-just@v2

- name: Install dependencies
# Also installs dev/lint/test/typing dependencies, to ensure we have
# type hints for as many of our libraries as possible.
# This helps catch errors that require dependencies to be spotted, for example:
# https://github.com/langchain-ai/langchain/pull/10249/files#diff-935185cd488d015f026dcd9e19616ff62863e8cde8c0bee70318d3ccbca98341
#
# If you change this configuration, make sure to change the `cache-key`
# in the `poetry_setup` action above to stop using the old cache.
# It doesn't matter how you change it, any change will cause a cache-bust.
working-directory: ${{ inputs.working-directory }}
run: |
just install
run: just install

- name: Get .mypy_cache to speed up mypy
uses: actions/cache@v4
Expand All @@ -77,10 +55,9 @@ jobs:
with:
path: |
${{ env.WORKDIR }}/.mypy_cache
key: mypy-lint-${{ runner.os }}-${{ runner.arch }}-py${{ matrix.python-version }}-${{ inputs.working-directory }}-${{ hashFiles(format('{0}/poetry.lock', inputs.working-directory)) }}
key: mypy-lint-${{ runner.os }}-${{ runner.arch }}-py${{ matrix.python-version }}-${{ inputs.working-directory }}-${{ hashFiles(format('{0}/uv.lock', inputs.working-directory)) }}


- name: Analysing the code with our lint
working-directory: ${{ inputs.working-directory }}
run: |
just lint
run: just lint
Loading

0 comments on commit de3c7ab

Please sign in to comment.