Skip to content

Commit

Permalink
INTPYTHON-428 Add pre-commit config to langchain-mongodb
Browse files Browse the repository at this point in the history
  • Loading branch information
blink1073 committed Nov 22, 2024
1 parent 10f8aa9 commit a498f5a
Show file tree
Hide file tree
Showing 7 changed files with 92 additions and 79 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,12 @@ on:
inputs:
working-directory:
required: true
type: choice
options:
- libs/mongodb
- langgraph-checkpoint-mongodb
default: libs/mongodb
description: "From which folder this pipeline executes"

env:
PYTHON_VERSION: "3.11"
Expand Down Expand Up @@ -114,7 +116,7 @@ jobs:
PKG_NAME: ${{ needs.build.outputs.pkg-name }}
VERSION: ${{ needs.build.outputs.version }}
# Here we use:
# - The default regular PyPI index as the *primary* index, meaning
# - The default regular PyPI index as the *primary* index, meaning
# that it takes priority (https://pypi.org/simple)
# - The test PyPI index as an extra index, so that any dependencies that
# are not found on test PyPI can be resolved and installed anyway.
Expand Down
14 changes: 13 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,18 @@ jobs:
outputs:
dirs-to-lint: ${{ steps.set-matrix.outputs.dirs-to-lint }}
dirs-to-test: ${{ steps.set-matrix.outputs.dirs-to-test }}
pre-commit:
name: pre-commit
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: actions/setup-python@v5
- uses: pre-commit/[email protected]
with:
extra_args: --all-files --hook-stage=manual
lint:
name: cd ${{ matrix.working-directory }}
needs: [ build ]
Expand All @@ -61,7 +73,7 @@ jobs:

ci_success:
name: "CI Success"
needs: [build, lint, test]
needs: [build, lint, test, pre-commit]
if: |
always()
runs-on: ubuntu-latest
Expand Down
1 change: 0 additions & 1 deletion libs/langgraph-checkpoint-mongodb/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,3 @@ warn_unused_ignores = "True"
warn_redundant_casts = "True"
allow_redefinition = "True"
disable_error_code = "typeddict-item, return-value"

Loading

0 comments on commit a498f5a

Please sign in to comment.