Skip to content

Commit d9f8962

Browse files
committed
simplify more
1 parent 9102f22 commit d9f8962

3 files changed

Lines changed: 1 addition & 52 deletions

File tree

.github/workflows/CI_check_api_ref.yml

Lines changed: 0 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -18,68 +18,18 @@ jobs:
1818
uses: actions/setup-python@v6
1919
with:
2020
python-version: "3.10"
21-
22-
- name: Detect changes in API reference
23-
id: changed
24-
shell: python
25-
run: |
26-
import os
27-
import subprocess
28-
import sys
29-
from pathlib import Path
30-
31-
sys.path.insert(0, ".github/utils")
32-
from docstrings_checksum import docstrings_checksum
33-
34-
def git(*args):
35-
result = subprocess.run(["git", *args], capture_output=True, text=True)
36-
return result.stdout.strip(), result.returncode
37-
38-
runner_temp = os.environ["RUNNER_TEMP"]
39-
base_sha, _ = git("rev-parse", "HEAD^1")
40-
41-
# Check if pydoc config changed
42-
_, exit_code = git("diff", "--quiet", f"{base_sha}...HEAD", "--", "pydoc/")
43-
changed_api_ref = (exit_code != 0)
44-
45-
if not changed_api_ref:
46-
# Create base worktree for docstring comparison
47-
base_worktree = os.path.join(runner_temp, "base")
48-
_, return_code = git("worktree", "add", base_worktree, base_sha)
49-
has_worktree = return_code == 0
50-
51-
52-
# Check if docstrings changed
53-
pr_docstrings_checksum = docstrings_checksum(Path(".").glob("haystack_experimental/**/*.py"))
54-
base_docstrings_checksum = ""
55-
if has_worktree:
56-
base_docstrings_checksum = docstrings_checksum(Path(base_worktree).glob("haystack_experimental/**/*.py"))
57-
58-
if base_docstrings_checksum != pr_docstrings_checksum:
59-
changed_api_ref = True
60-
61-
print(f"API reference changes: {changed_api_ref}")
62-
63-
with open(os.environ["GITHUB_OUTPUT"], "a") as f:
64-
f.write(f"changed_api_ref={changed_api_ref}\n")
65-
6621
- name: Install Hatch
67-
if: steps.changed.outputs.changed_api_ref == 'true'
6822
run: pip install --upgrade hatch
6923

7024
- name: Generate API references
71-
if: steps.changed.outputs.changed_api_ref == 'true'
72-
7325
run: hatch run docs
7426

7527
- name: Set up Node.js
76-
if: steps.changed.outputs.changed_api_ref == 'true'
7728
uses: actions/setup-node@v6
7829
with:
7930
node-version: "22"
8031

8132
- name: Run Docusaurus md/mdx checker
82-
if: steps.changed.outputs.changed_api_ref == 'true'
8333
working-directory: pydoc/temp
8434
run: |
8535
npx docusaurus-mdx-checker -v || {

haystack_experimental/components/generators/chat/openai.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ def run(
6868
6969
:param messages:
7070
A list of ChatMessage instances representing the input messages.
71-
{"key": "this would break Docusaurus"}
7271
:param streaming_callback:
7372
A callback function that is called when a new token is received from the stream.
7473
:param generation_kwargs:

pydoc/chat_message_stores_api.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ processors:
1515
- type: smart
1616
- type: crossref
1717
renderer:
18-
description: Storage for the chat messages.
18+
description: Storage for the chat messages. TRIGGER!!!
1919
id: experimental-chatmessage-store-api
2020
markdown:
2121
add_member_class_prefix: false

0 commit comments

Comments
 (0)