mirror of
https://github.com/deepset-ai/haystack.git
synced 2025-12-26 14:38:36 +00:00
chore: make the docs generator runnable without an API key (#4405)
* spit a warning instead of exiting * print which file is being converted (useful to debug CI) * pin docspec for the time being
This commit is contained in:
parent
5aa19ffde6
commit
1498aacc77
1
.github/utils/pydoc-markdown.sh
vendored
1
.github/utils/pydoc-markdown.sh
vendored
@ -6,5 +6,6 @@ cd docs/pydoc
|
||||
rm -rf temp && mkdir temp
|
||||
cd temp
|
||||
for file in ../config/* ; do
|
||||
echo "Converting $file..."
|
||||
pydoc-markdown "$file"
|
||||
done
|
||||
|
||||
@ -4,6 +4,7 @@ import io
|
||||
import dataclasses
|
||||
import typing as t
|
||||
import base64
|
||||
import warnings
|
||||
from pathlib import Path
|
||||
|
||||
import requests
|
||||
@ -68,7 +69,8 @@ class ReadmeRenderer(Renderer):
|
||||
"""
|
||||
README_API_KEY = os.getenv("README_API_KEY")
|
||||
if not README_API_KEY:
|
||||
sys.exit("README_API_KEY env var is not set")
|
||||
warnings.warn("README_API_KEY env var is not set, using a placeholder category ID")
|
||||
return {"haystack-classes": "ID"}
|
||||
|
||||
token = base64.b64encode(f"{README_API_KEY}:".encode()).decode()
|
||||
headers = {"authorization": f"Basic {token}", "x-readme-version": version}
|
||||
|
||||
@ -1,2 +1,4 @@
|
||||
pydoc-markdown==4.6.4
|
||||
# pin docspec while waiting for https://github.com/NiklasRosenstein/docspec/issues/91 to be fixed
|
||||
docspec-python<2.1.0
|
||||
requests==2.28.2
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user