From d49925609b225346548e6ebdc320a48fe3b45a60 Mon Sep 17 00:00:00 2001 From: Darja Fokina Date: Thu, 1 Feb 2024 18:49:39 +0100 Subject: [PATCH 1/5] amazon bedrock: generate api docs --- .github/workflows/amazon_bedrock.yml | 5 ++++ integrations/amazon_bedrock/pydoc/config.yml | 28 ++++++++++++++++++++ integrations/amazon_bedrock/pyproject.toml | 4 ++- 3 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 integrations/amazon_bedrock/pydoc/config.yml diff --git a/.github/workflows/amazon_bedrock.yml b/.github/workflows/amazon_bedrock.yml index cae0ddb1b..e12d3183f 100644 --- a/.github/workflows/amazon_bedrock.yml +++ b/.github/workflows/amazon_bedrock.yml @@ -52,5 +52,10 @@ jobs: if: matrix.python-version == '3.9' && runner.os == 'Linux' run: hatch run lint:all + - name: Generate docs + if: matrix.python-version == '3.9' && runner.os == 'Linux' + run: hatch run docs + + - name: Run tests run: hatch run cov diff --git a/integrations/amazon_bedrock/pydoc/config.yml b/integrations/amazon_bedrock/pydoc/config.yml new file mode 100644 index 000000000..f9f1fac65 --- /dev/null +++ b/integrations/amazon_bedrock/pydoc/config.yml @@ -0,0 +1,28 @@ +loaders: + - type: haystack_pydoc_tools.loaders.CustomPythonLoader + search_path: [../src] + modules: [ + "haystack_integrations.components.generators.amazon_bedrock", + ] + ignore_when_discovered: ["__init__"] +processors: + - type: filter + expression: + documented_only: true + do_not_filter_modules: false + skip_empty_modules: true + - type: smart + - type: crossref +renderer: + type: haystack_pydoc_tools.renderers.ReadmePreviewRenderer + excerpt: Amazon Bedrock integration for Haystack + category_slug: haystack-integrations + title: Amazon Bedrock + slug: integrations-amazon-bedrock + order: 10 + markdown: + descriptive_class_title: false + descriptive_module_title: true + add_method_class_prefix: true + add_member_class_prefix: false + filename: _readme_amazon_bedrock.md diff --git a/integrations/amazon_bedrock/pyproject.toml b/integrations/amazon_bedrock/pyproject.toml index 6a2ce3eab..ed950f2b1 100644 --- a/integrations/amazon_bedrock/pyproject.toml +++ b/integrations/amazon_bedrock/pyproject.toml @@ -62,7 +62,9 @@ cov = [ "test-cov", "cov-report", ] - +docs = [ + "pydoc-markdown pydoc/config.yml" +] [[tool.hatch.envs.all.matrix]] python = ["3.8", "3.9", "3.10", "3.11", "3.12"] From 7d5ee4626eddc96f028a1b4a478175f13bb58664 Mon Sep 17 00:00:00 2001 From: Daria Fokina Date: Thu, 1 Feb 2024 18:54:59 +0100 Subject: [PATCH 2/5] path upd --- integrations/amazon_bedrock/pydoc/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/integrations/amazon_bedrock/pydoc/config.yml b/integrations/amazon_bedrock/pydoc/config.yml index f9f1fac65..4fdcedbdf 100644 --- a/integrations/amazon_bedrock/pydoc/config.yml +++ b/integrations/amazon_bedrock/pydoc/config.yml @@ -2,7 +2,7 @@ loaders: - type: haystack_pydoc_tools.loaders.CustomPythonLoader search_path: [../src] modules: [ - "haystack_integrations.components.generators.amazon_bedrock", + "haystack_integrations.components.generators.amazon_bedrock.generator", ] ignore_when_discovered: ["__init__"] processors: From 7873b9d0838e6cef1960f754de7fefa88c87dd31 Mon Sep 17 00:00:00 2001 From: Daria Fokina Date: Thu, 1 Feb 2024 18:58:58 +0100 Subject: [PATCH 3/5] add dependency --- integrations/amazon_bedrock/pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/integrations/amazon_bedrock/pyproject.toml b/integrations/amazon_bedrock/pyproject.toml index ed950f2b1..8527d27a1 100644 --- a/integrations/amazon_bedrock/pyproject.toml +++ b/integrations/amazon_bedrock/pyproject.toml @@ -50,6 +50,7 @@ git_describe_command = 'git describe --tags --match="integrations/amazon_bedrock dependencies = [ "coverage[toml]>=6.5", "pytest", + "haystack-pydoc-tools", ] [tool.hatch.envs.default.scripts] test = "pytest {args:tests}" From dd5e08e56e443fa775984b65990f42d5f18762f5 Mon Sep 17 00:00:00 2001 From: Daria Fokina Date: Thu, 1 Feb 2024 18:59:41 +0100 Subject: [PATCH 4/5] Update amazon_bedrock.yml --- .github/workflows/amazon_bedrock.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/amazon_bedrock.yml b/.github/workflows/amazon_bedrock.yml index e12d3183f..75f881a50 100644 --- a/.github/workflows/amazon_bedrock.yml +++ b/.github/workflows/amazon_bedrock.yml @@ -56,6 +56,5 @@ jobs: if: matrix.python-version == '3.9' && runner.os == 'Linux' run: hatch run docs - - name: Run tests run: hatch run cov From a00e12fabfd6c8ed8156ca55c2154c0b33979210 Mon Sep 17 00:00:00 2001 From: Daria Fokina Date: Fri, 2 Feb 2024 13:47:36 +0100 Subject: [PATCH 5/5] add files --- integrations/amazon_bedrock/pydoc/config.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/integrations/amazon_bedrock/pydoc/config.yml b/integrations/amazon_bedrock/pydoc/config.yml index 4fdcedbdf..1f917a0ec 100644 --- a/integrations/amazon_bedrock/pydoc/config.yml +++ b/integrations/amazon_bedrock/pydoc/config.yml @@ -3,6 +3,9 @@ loaders: search_path: [../src] modules: [ "haystack_integrations.components.generators.amazon_bedrock.generator", + "haystack_integrations.components.generators.amazon_bedrock.adapters", + "haystack_integrations.components.generators.amazon_bedrock.errors", + "haystack_integrations.components.generators.amazon_bedrock.handlers", ] ignore_when_discovered: ["__init__"] processors: