mirror of
https://github.com/hwchase17/langchain.git
synced 2025-05-04 06:37:58 +00:00
Bagatur/fix doc ci (#12529)
This commit is contained in:
parent
2424fff3f1
commit
0b4b9e61fc
11
.github/workflows/doc_lint.yml
vendored
11
.github/workflows/doc_lint.yml
vendored
@ -9,6 +9,8 @@ on:
|
||||
- 'docs/**'
|
||||
- 'templates/**'
|
||||
- 'cookbook/**'
|
||||
- '.github/workflows/_lint.yml'
|
||||
- '.github/workflows/doc_lint.yml'
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
@ -23,12 +25,11 @@ jobs:
|
||||
run: |
|
||||
# We should not encourage imports directly from main init file
|
||||
# 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:
|
||||
./.github/workflows/_lint.yml
|
||||
with:
|
||||
working-directory: .
|
||||
secrets: inherit
|
||||
|
||||
working-directory: "."
|
||||
secrets: inherit
|
8
Makefile
8
Makefile
@ -42,12 +42,12 @@ spell_fix:
|
||||
######################
|
||||
|
||||
lint:
|
||||
poetry run ruff {docs,templates,cookbook}
|
||||
poetry run black {docs,templates,cookbook} --check
|
||||
poetry run ruff docs templates cookbook
|
||||
poetry run black docs templates cookbook --check
|
||||
|
||||
format format_diff:
|
||||
poetry run black {docs,templates,cookbook}
|
||||
poetry run ruff --select I --fix {docs,templates,cookbook}
|
||||
poetry run black docs templates cookbook
|
||||
poetry run ruff --select I --fix docs templates cookbook
|
||||
|
||||
######################
|
||||
# HELP
|
||||
|
@ -232,7 +232,7 @@
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"id": "a25e6f93-765b-4f99-8c1c-929157dbd4aa",
|
||||
"id": "082c6cfc",
|
||||
"metadata": {
|
||||
"tags": []
|
||||
},
|
||||
@ -562,7 +562,7 @@
|
||||
},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"from langchain import HuggingFaceHub\n",
|
||||
"from langchain.llms import HuggingFaceHub\n",
|
||||
"from langchain.prompts import PromptTemplate\n",
|
||||
"\n",
|
||||
"template = \"\"\"{question}\"\"\"\n",
|
||||
@ -690,7 +690,7 @@
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"from langchain import SagemakerEndpoint\n",
|
||||
"from langchain.llms import SagemakerEndpoint\n",
|
||||
"from langchain.llms.sagemaker_endpoint import LLMContentHandler\n",
|
||||
"from langchain.prompts import PromptTemplate\n",
|
||||
"import json\n",
|
||||
@ -1414,7 +1414,7 @@
|
||||
"name": "python",
|
||||
"nbconvert_exporter": "python",
|
||||
"pygments_lexer": "ipython3",
|
||||
"version": "3.10.6"
|
||||
"version": "3.9.1"
|
||||
}
|
||||
},
|
||||
"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]
|
||||
lock-version = "2.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"
|
||||
|
||||
|
||||
[tool.poetry.group.dev.dependencies]
|
||||
|
||||
|
||||
[tool.poetry.group.test.dependencies]
|
||||
|
||||
|
||||
[tool.poetry.group.typing.dependencies]
|
||||
|
||||
[tool.codespell]
|
||||
skip = '.git,*.pdf,*.svg,*.pdf,*.yaml,*.ipynb,poetry.lock,*.min.js,*.css,package-lock.json,example_data,_dist,examples,templates'
|
||||
# Ignore latin etc
|
||||
|
Loading…
Reference in New Issue
Block a user