From 53513c113c8b217d7242b4ef74a729195626fd12 Mon Sep 17 00:00:00 2001 From: Erick Friis Date: Fri, 15 Nov 2024 14:54:21 -0800 Subject: [PATCH] docs: standard test version, link standard test guide --- docs/docs/contributing/how_to/integrations/index.mdx | 2 +- .../how_to/integrations/standard_tests.ipynb | 6 +++--- libs/standard-tests/tests/unit_tests/test_cli.py | 11 +++++++++++ 3 files changed, 15 insertions(+), 4 deletions(-) create mode 100644 libs/standard-tests/tests/unit_tests/test_cli.py diff --git a/docs/docs/contributing/how_to/integrations/index.mdx b/docs/docs/contributing/how_to/integrations/index.mdx index 5f08dce4360..d651d1ff088 100644 --- a/docs/docs/contributing/how_to/integrations/index.mdx +++ b/docs/docs/contributing/how_to/integrations/index.mdx @@ -67,7 +67,7 @@ As a prerequisite to adding your integration to our documentation, you must: 1. Confirm that your integration is in the list of components we are currently accepting. 2. Ensure that your integration is in a separate package that can be installed with `pip install `. -3. Implement the standard tests for your integration and successfully run them. +3. Implement the standard tests for your integration and successfully run them (see [how-to guide](./standard_tests.ipynb)) 3. Write documentation for your integration in the `docs/docs/integrations` directory of the LangChain monorepo. 4. Add a provider page for your integration in the `docs/docs/integrations/providers` directory of the LangChain monorepo. diff --git a/docs/docs/contributing/how_to/integrations/standard_tests.ipynb b/docs/docs/contributing/how_to/integrations/standard_tests.ipynb index 393bf6961c5..66d29c4fed4 100644 --- a/docs/docs/contributing/how_to/integrations/standard_tests.ipynb +++ b/docs/docs/contributing/how_to/integrations/standard_tests.ipynb @@ -15,7 +15,7 @@ "First, let's install 2 dependencies:\n", "\n", "- `langchain-core` will define the interfaces we want to import to define our custom tool.\n", - "- `langchain-tests==0.3.0` will provide the standard tests we want to use.\n", + "- `langchain-tests==0.3.1` will provide the standard tests we want to use.\n", "\n", ":::note\n", "\n", @@ -26,7 +26,7 @@ "or in a new release of `langchain-tests`.\n", "\n", "Because added tests in new versions of `langchain-tests` will always break your CI/CD pipelines, we recommend pinning the \n", - "version of `langchain-tests==0.3.0` to avoid unexpected changes.\n", + "version of `langchain-tests==0.3.1` to avoid unexpected changes.\n", "\n", ":::" ] @@ -37,7 +37,7 @@ "metadata": {}, "outputs": [], "source": [ - "%pip install -U langchain-core langchain-tests==0.3.0 pytest pytest-socket" + "%pip install -U langchain-core langchain-tests==0.3.1 pytest pytest-socket" ] }, { diff --git a/libs/standard-tests/tests/unit_tests/test_cli.py b/libs/standard-tests/tests/unit_tests/test_cli.py new file mode 100644 index 00000000000..c2550e95db5 --- /dev/null +++ b/libs/standard-tests/tests/unit_tests/test_cli.py @@ -0,0 +1,11 @@ +try: + import tomllib +except ImportError: + # if prior to 3.11, use alternative toml library + import toml as tomllib + + +def test_cli_template_version() -> None: + """ + Confirm that the version in the CLI pyproject file is the same as the version in the package. + """