Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Generate API docs #262

Merged
merged 10 commits into from
Jan 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .github/workflows/chroma.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
run: hatch run cov
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -131,3 +131,6 @@ dmypy.json

# IDEs
.vscode

# Docs generation artifacts
_readme_*.md
31 changes: 31 additions & 0 deletions integrations/chroma/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.retrievers.chroma.retriever",
"haystack_integrations.document_stores.chroma.document_store",
"haystack_integrations.document_stores.chroma.errors",
"haystack_integrations.document_stores.chroma.utils",
]
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: Chroma integration for Haystack
category_slug: haystack-integrations
title: Chroma
slug: integrations-chroma
order: 1
markdown:
descriptive_class_title: false
descriptive_module_title: true
add_method_class_prefix: true
add_member_class_prefix: false
filename: _readme_chroma.md
4 changes: 4 additions & 0 deletions integrations/chroma/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ git_describe_command = 'git describe --tags --match="integrations/chroma-v[0-9]*
dependencies = [
"coverage[toml]>=6.5",
"pytest",
"haystack-pydoc-tools",
]
[tool.hatch.envs.default.scripts]
test = "pytest {args:tests}"
Expand All @@ -59,6 +60,9 @@ cov = [
"test-cov",
"cov-report",
]
docs = [
"pydoc-markdown pydoc/config.yml"
]

[[tool.hatch.envs.all.matrix]]
python = ["3.9", "3.10"]
Expand Down