diff --git a/.github/workflows/weaviate.yml b/.github/workflows/weaviate.yml index 03cbd45a5..051415336 100644 --- a/.github/workflows/weaviate.yml +++ b/.github/workflows/weaviate.yml @@ -49,5 +49,9 @@ jobs: - name: Run Weaviate container run: docker-compose up -d + - 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/weaviate/pydoc/config.yml b/integrations/weaviate/pydoc/config.yml new file mode 100644 index 000000000..fa59e6874 --- /dev/null +++ b/integrations/weaviate/pydoc/config.yml @@ -0,0 +1,28 @@ +loaders: + - type: haystack_pydoc_tools.loaders.CustomPythonLoader + search_path: [../src] + modules: [ + "haystack_integrations.document_stores.weaviate.document_store", + ] + 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: Weaviate integration for Haystack + category_slug: haystack-integrations + title: Weaviate + slug: integrations-weaviate + order: 180 + markdown: + descriptive_class_title: false + descriptive_module_title: true + add_method_class_prefix: true + add_member_class_prefix: false + filename: _readme_weaviate.md diff --git a/integrations/weaviate/pyproject.toml b/integrations/weaviate/pyproject.toml index 50f1c157c..fb132516c 100644 --- a/integrations/weaviate/pyproject.toml +++ b/integrations/weaviate/pyproject.toml @@ -27,6 +27,7 @@ classifiers = [ dependencies = [ "haystack-ai", "weaviate-client==3.*", + "haystack-pydoc-tools", ] [project.urls] @@ -62,6 +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"]