mirror of
https://github.com/hwchase17/langchain.git
synced 2025-08-14 07:07:34 +00:00
x
This commit is contained in:
parent
9ac46cc264
commit
1798d6e92e
@ -1,5 +1,5 @@
|
|||||||
---
|
---
|
||||||
pagination_next: docs/contributing/how_to/integrations/package
|
pagination_next: contributing/how_to/integrations/package
|
||||||
---
|
---
|
||||||
|
|
||||||
# Contribute Integrations
|
# Contribute Integrations
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
pagination_next: docs/contributing/how_to/integrations/standard_tests
|
pagination_next: contributing/how_to/integrations/standard_tests
|
||||||
pagination_prev: docs/contributing/how_to/integrations
|
pagination_prev: contributing/how_to/integrations/index
|
||||||
---
|
---
|
||||||
# How to bootstrap a new integration package
|
# How to bootstrap a new integration package
|
||||||
|
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
---
|
---
|
||||||
|
pagination_prev: contributing/how_to/integrations/standard_tests
|
||||||
|
pagination_next: null
|
||||||
---
|
---
|
||||||
|
|
||||||
# Publishing your package
|
# Publishing your package
|
||||||
|
@ -5,8 +5,8 @@
|
|||||||
"metadata": {},
|
"metadata": {},
|
||||||
"source": [
|
"source": [
|
||||||
"---\n",
|
"---\n",
|
||||||
"pagination_next: null\n",
|
"pagination_next: contributing/how_to/integrations/publish\n",
|
||||||
"pagination_prev: docs/contributing/how_to/integrations/standard_tests\n",
|
"pagination_prev: contributing/how_to/integrations/package\n",
|
||||||
"---\n",
|
"---\n",
|
||||||
"# How to add standard tests to an integration\n",
|
"# How to add standard tests to an integration\n",
|
||||||
"\n",
|
"\n",
|
||||||
@ -24,16 +24,26 @@
|
|||||||
"Because added tests in new versions of `langchain-tests` can break your CI/CD pipelines, we recommend pinning the \n",
|
"Because added tests in new versions of `langchain-tests` can break your CI/CD pipelines, we recommend pinning the \n",
|
||||||
"version of `langchain-tests` to avoid unexpected changes.\n",
|
"version of `langchain-tests` to avoid unexpected changes.\n",
|
||||||
"\n",
|
"\n",
|
||||||
":::"
|
":::\n",
|
||||||
]
|
"\n",
|
||||||
},
|
"<Tabs>\n",
|
||||||
{
|
" <TabItem value=\"poetry\" label=\"Poetry\" default>\n",
|
||||||
"cell_type": "code",
|
"If you followed the [previous guide](../package), you should already have these dependencies installed!\n",
|
||||||
"execution_count": null,
|
"\n",
|
||||||
"metadata": {},
|
"```bash\n",
|
||||||
"outputs": [],
|
"poetry add langchain-core\n",
|
||||||
"source": [
|
"poetry add --group test pytest pytest-socket langchain-tests==<latest_version>\n",
|
||||||
"%pip install -U langchain-core langchain-tests pytest pytest-socket"
|
"```\n",
|
||||||
|
" </TabItem>\n",
|
||||||
|
" <TabItem value=\"pip\" label=\"Pip\">\n",
|
||||||
|
"```bash\n",
|
||||||
|
"pip install -U langchain-core pytest pytest-socket langchain-tests\n",
|
||||||
|
"\n",
|
||||||
|
"# install current package in editable mode\n",
|
||||||
|
"pip install --editable .\n",
|
||||||
|
"```\n",
|
||||||
|
" </TabItem>\n",
|
||||||
|
"</Tabs>"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -180,13 +190,30 @@
|
|||||||
"source": [
|
"source": [
|
||||||
"and you would run these with the following commands from your project root\n",
|
"and you would run these with the following commands from your project root\n",
|
||||||
"\n",
|
"\n",
|
||||||
|
"<Tabs>\n",
|
||||||
|
" <TabItem value=\"poetry\" label=\"Poetry\" default>\n",
|
||||||
|
"\n",
|
||||||
|
"```bash\n",
|
||||||
|
"# run unit tests without network access\n",
|
||||||
|
"poetry run pytest --disable-socket --allow-unix-socket tests/unit_tests\n",
|
||||||
|
"\n",
|
||||||
|
"# run integration tests\n",
|
||||||
|
"poetry run pytest tests/integration_tests\n",
|
||||||
|
"```\n",
|
||||||
|
"\n",
|
||||||
|
" </TabItem>\n",
|
||||||
|
" <TabItem value=\"pip\" label=\"Pip\">\n",
|
||||||
|
"\n",
|
||||||
"```bash\n",
|
"```bash\n",
|
||||||
"# run unit tests without network access\n",
|
"# run unit tests without network access\n",
|
||||||
"pytest --disable-socket --allow-unix-socket tests/unit_tests\n",
|
"pytest --disable-socket --allow-unix-socket tests/unit_tests\n",
|
||||||
"\n",
|
"\n",
|
||||||
"# run integration tests\n",
|
"# run integration tests\n",
|
||||||
"pytest tests/integration_tests\n",
|
"pytest tests/integration_tests\n",
|
||||||
"```"
|
"```\n",
|
||||||
|
"\n",
|
||||||
|
" </TabItem>\n",
|
||||||
|
"</Tabs>"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user