Skip to content

Commit

Permalink
Generate unstructured API docs
Browse files Browse the repository at this point in the history
  • Loading branch information
vblagoje committed Feb 7, 2024
1 parent 593af1f commit 93859f8
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .github/workflows/unstructured.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ jobs:
if: matrix.python-version == '3.9'
run: hatch run lint:all

- name: Generate docs
if: matrix.python-version == '3.9' && runner.os == 'Linux'
run: hatch run docs

- name: Run tests
working-directory: integrations/unstructured
run: hatch run cov
run: hatch run cov
28 changes: 28 additions & 0 deletions integrations/unstructured/pydoc/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
loaders:
- type: haystack_pydoc_tools.loaders.CustomPythonLoader
search_path: [../src]
modules: [
"haystack_integrations.components.converters.converter",
]
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: Unstructured integration for Haystack
category_slug: haystack-integrations
title: Unstructured
slug: integrations-unstructured
order: 170
markdown:
descriptive_class_title: false
descriptive_module_title: true
add_method_class_prefix: true
add_member_class_prefix: false
filename: _readme_unstructured.md
4 changes: 4 additions & 0 deletions integrations/unstructured/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ dependencies = [
"coverage[toml]>=6.5",
"pytest",
"pytest-xdist",
"haystack-pydoc-tools",
]
[tool.hatch.envs.default.scripts]
test = "pytest {args:tests}"
Expand All @@ -61,6 +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"]
Expand Down

0 comments on commit 93859f8

Please sign in to comment.