mirror of
https://github.com/hwchase17/langchain.git
synced 2025-06-02 13:08:57 +00:00
Bagatur/fix doc ci (#12529)
This commit is contained in:
parent
2424fff3f1
commit
0b4b9e61fc
9
.github/workflows/doc_lint.yml
vendored
9
.github/workflows/doc_lint.yml
vendored
@ -9,6 +9,8 @@ on:
|
|||||||
- 'docs/**'
|
- 'docs/**'
|
||||||
- 'templates/**'
|
- 'templates/**'
|
||||||
- 'cookbook/**'
|
- 'cookbook/**'
|
||||||
|
- '.github/workflows/_lint.yml'
|
||||||
|
- '.github/workflows/doc_lint.yml'
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
@ -23,12 +25,11 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
# We should not encourage imports directly from main init file
|
# We should not encourage imports directly from main init file
|
||||||
# Expect for hub
|
# Expect for hub
|
||||||
git grep 'from langchain import' {docs,templates,cookbook} | grep -vE 'from langchain import (hub)' && exit 1 || exit 0
|
git grep 'from langchain import' {docs/docs,templates,cookbook} | grep -vE 'from langchain import (hub)' && exit 1 || exit 0
|
||||||
|
|
||||||
- name: Run lint
|
lint:
|
||||||
uses:
|
uses:
|
||||||
./.github/workflows/_lint.yml
|
./.github/workflows/_lint.yml
|
||||||
with:
|
with:
|
||||||
working-directory: .
|
working-directory: "."
|
||||||
secrets: inherit
|
secrets: inherit
|
||||||
|
|
||||||
|
8
Makefile
8
Makefile
@ -42,12 +42,12 @@ spell_fix:
|
|||||||
######################
|
######################
|
||||||
|
|
||||||
lint:
|
lint:
|
||||||
poetry run ruff {docs,templates,cookbook}
|
poetry run ruff docs templates cookbook
|
||||||
poetry run black {docs,templates,cookbook} --check
|
poetry run black docs templates cookbook --check
|
||||||
|
|
||||||
format format_diff:
|
format format_diff:
|
||||||
poetry run black {docs,templates,cookbook}
|
poetry run black docs templates cookbook
|
||||||
poetry run ruff --select I --fix {docs,templates,cookbook}
|
poetry run ruff --select I --fix docs templates cookbook
|
||||||
|
|
||||||
######################
|
######################
|
||||||
# HELP
|
# HELP
|
||||||
|
@ -232,7 +232,7 @@
|
|||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": null,
|
"execution_count": null,
|
||||||
"id": "a25e6f93-765b-4f99-8c1c-929157dbd4aa",
|
"id": "082c6cfc",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"tags": []
|
"tags": []
|
||||||
},
|
},
|
||||||
@ -562,7 +562,7 @@
|
|||||||
},
|
},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
"source": [
|
"source": [
|
||||||
"from langchain import HuggingFaceHub\n",
|
"from langchain.llms import HuggingFaceHub\n",
|
||||||
"from langchain.prompts import PromptTemplate\n",
|
"from langchain.prompts import PromptTemplate\n",
|
||||||
"\n",
|
"\n",
|
||||||
"template = \"\"\"{question}\"\"\"\n",
|
"template = \"\"\"{question}\"\"\"\n",
|
||||||
@ -690,7 +690,7 @@
|
|||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
"source": [
|
"source": [
|
||||||
"from langchain import SagemakerEndpoint\n",
|
"from langchain.llms import SagemakerEndpoint\n",
|
||||||
"from langchain.llms.sagemaker_endpoint import LLMContentHandler\n",
|
"from langchain.llms.sagemaker_endpoint import LLMContentHandler\n",
|
||||||
"from langchain.prompts import PromptTemplate\n",
|
"from langchain.prompts import PromptTemplate\n",
|
||||||
"import json\n",
|
"import json\n",
|
||||||
@ -1414,7 +1414,7 @@
|
|||||||
"name": "python",
|
"name": "python",
|
||||||
"nbconvert_exporter": "python",
|
"nbconvert_exporter": "python",
|
||||||
"pygments_lexer": "ipython3",
|
"pygments_lexer": "ipython3",
|
||||||
"version": "3.10.6"
|
"version": "3.9.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nbformat": 4,
|
"nbformat": 4,
|
||||||
|
2
poetry.lock
generated
2
poetry.lock
generated
@ -3915,4 +3915,4 @@ testing = ["big-O", "jaraco.functools", "jaraco.itertools", "more-itertools", "p
|
|||||||
[metadata]
|
[metadata]
|
||||||
lock-version = "2.0"
|
lock-version = "2.0"
|
||||||
python-versions = ">=3.8.1,<4.0"
|
python-versions = ">=3.8.1,<4.0"
|
||||||
content-hash = "00e7c3ba52c8c852a7470838a48244da94f3b2074f5a122f6cb9f78953489e82"
|
content-hash = "47b6bed43d64a2d4690d4554c78481485822b4b226a6e7f8a456dddb4ce8dd20"
|
||||||
|
@ -37,6 +37,14 @@ black = "^23.10.0"
|
|||||||
codespell = "^2.2.0"
|
codespell = "^2.2.0"
|
||||||
|
|
||||||
|
|
||||||
|
[tool.poetry.group.dev.dependencies]
|
||||||
|
|
||||||
|
|
||||||
|
[tool.poetry.group.test.dependencies]
|
||||||
|
|
||||||
|
|
||||||
|
[tool.poetry.group.typing.dependencies]
|
||||||
|
|
||||||
[tool.codespell]
|
[tool.codespell]
|
||||||
skip = '.git,*.pdf,*.svg,*.pdf,*.yaml,*.ipynb,poetry.lock,*.min.js,*.css,package-lock.json,example_data,_dist,examples,templates'
|
skip = '.git,*.pdf,*.svg,*.pdf,*.yaml,*.ipynb,poetry.lock,*.min.js,*.css,package-lock.json,example_data,_dist,examples,templates'
|
||||||
# Ignore latin etc
|
# Ignore latin etc
|
||||||
|
Loading…
Reference in New Issue
Block a user