Skip to content

Commit

Permalink
amazon bedrock: generate api docs (#326)
Browse files Browse the repository at this point in the history
* amazon bedrock: generate api docs

* path upd

* add dependency

* Update amazon_bedrock.yml

* add files
  • Loading branch information
dfokina authored Feb 8, 2024
1 parent dac86f1 commit ee5f3c0
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .github/workflows/amazon_bedrock.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,5 +52,9 @@ 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
31 changes: 31 additions & 0 deletions integrations/amazon_bedrock/pydoc/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
loaders:
- type: haystack_pydoc_tools.loaders.CustomPythonLoader
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:
- 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
5 changes: 4 additions & 1 deletion integrations/amazon_bedrock/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand All @@ -62,7 +63,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"]

Expand Down

0 comments on commit ee5f3c0

Please sign in to comment.