Skip to content

Commit bce91b5

Browse files
committed
Merge branch 'main' into v0.6.8-release
2 parents abe572b + 0134069 commit bce91b5

File tree

435 files changed

+64765
-6161
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

435 files changed

+64765
-6161
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,7 @@ jobs:
3737
# Setup Virtual Environment
3838
python3 -m venv ./.venv
3939
source .venv/bin/activate
40-
41-
if [ "${{ matrix.python-version }}" == "3.9" ];
42-
then
43-
pip install .[dev]
44-
else
45-
poetry install --extras dev
46-
fi
40+
make dev
4741
4842
- name: Check license
4943
run: |
@@ -70,12 +64,7 @@ jobs:
7064
# Setup Virtual Environment
7165
python3 -m venv ./.venv
7266
source .venv/bin/activate
73-
if [ "${{ matrix.python-version }}" == "3.9" ];
74-
then
75-
pip install .[dev]
76-
else
77-
make dev
78-
fi
67+
make dev
7968
8069
- name: Lint with ruff
8170
run: |
@@ -102,12 +91,7 @@ jobs:
10291
# Setup Virtual Environment
10392
python3 -m venv ./.venv
10493
source .venv/bin/activate
105-
if [ "${{ matrix.python-version }}" == "3.9" ];
106-
then
107-
pip install .[dev,sql,vectordb,manifest,anthropic,huggingface,api,databricks,uv,llama]
108-
else
109-
make full
110-
fi
94+
make full
11195
11296
- name: Static analysis with pyright
11397
run: |
@@ -144,12 +128,7 @@ jobs:
144128
python3 -m venv ./.venv
145129
source .venv/bin/activate
146130
147-
if [ "${{ matrix.python-version }}" == "3.9" ];
148-
then
149-
pip install .[dev,sql,vectordb,manifest,anthropic,huggingface,api,databricks,uv,llama]
150-
else
151-
make full
152-
fi
131+
make full
153132
154133
if [ "${{ matrix.python-version }}" == "3.12" ]; then
155134
echo "Installing latest langchain-core and langsmith from PyPI"

.github/workflows/cli-compatibility.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,7 @@ jobs:
3939
source .venv/bin/activate
4040
4141
# Install dev dependencies
42-
if [ "${{ matrix.python-version }}" == "3.9" ]; then
43-
pip install .[dev]
44-
else
45-
poetry install --extras dev
46-
fi
42+
poetry install --extras dev
4743
4844
# Install specific typer and click versions
4945
pip install typer==${{ matrix.typer-version }} click==${{ matrix.click-version }}

.github/workflows/scripts/run_notebooks.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export NLTK_DATA=/tmp/nltk_data;
55
rm -rf ./guardrails
66

77
# Navigate to notebooks
8-
cd docs/examples
8+
cd docs/src/examples
99

1010
# Get the notebook name from the matrix variable
1111
notebook="$1"

.github/workflows/scripts/update_notebook_matrix.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
notebook_names="["
44

55
# Compile list of file names
6-
for file in $(ls docs/examples/*.ipynb); do
6+
for file in $(ls docs/src/examples/*.ipynb); do
77
# Add the full filename with extension
88
filename=$(basename "$file")
99

.gitignore

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
docs/api_reference_markdown/
21
openai_api_key.txt
32
*__pycache__*
43
data/*
@@ -14,7 +13,9 @@ settings.json
1413
site/*
1514
guardrails.log
1615
guardrails_ai.egg-info/
17-
build/*
16+
*/build/*
17+
docs/build
18+
!docs/dist/*
1819
dist/*
1920
*.rail_output*
2021
.idea/*
@@ -27,9 +28,8 @@ test.index
2728
htmlcov
2829
node_modules
2930
.docusaurus
30-
docs-build
3131
.vercel
32-
docusaurus/examples-toc.json
32+
!docs/examples-toc.json
3333
.python-version
3434
static/docs
3535
docusaurus/static/docs
@@ -41,4 +41,4 @@ docusaurus/static/docs
4141
*/share/*
4242
pyvenv.cfg
4343
mlruns
44-
mlartifacts
44+
mlartifacts

DOCS.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,17 +30,17 @@ npm run start
3030
## How the build process works
3131

3232
1. pydocs is used to create python docs in the 'docs/' directory
33-
1. a new folder called 'docs-build' is created
34-
1. docs are copied from 'docs/' to 'docs-build/'
35-
1. nbdocs is used on all notebooks in the 'docs-build' directory. This creates md files parallel to the notebooks in the dir structure.
33+
1. a new folder called 'docs/build' is created
34+
1. docs are copied from 'docs/src' to 'docs/build'
35+
1. nbdocs is used on all notebooks in the 'docs/build' directory. This creates md files parallel to the notebooks in the dir structure.
3636
1. md files are iterated and converted to mdx files. We import some custom components at the top of each mdx file.
3737

3838
## Troubleshooting/common problems
3939

4040
1. On first run, the docs build does not complete and the site is not served
4141
- This is usually an intermittent failure with nb-docs. Try running `npm run start` again
42-
- If this doesn't work, try running `rm -rf docs-build; npm run start`
42+
- If this doesn't work, try running `rm -rf docs/build; npm run start`
4343
- If even that doesn't work, please file an issue. Something may be wrong with docs builds on the branch
4444
1. I updated a notebook and it didn't update in the docs
4545
- This is likely because the notebook wasn't converted to markdown, or files were not overwritten
46-
- To fix this, run `rm -rf docs-build; npm run start`
46+
- To fix this, run `rm -rf docs/build; npm run start`

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ full:
4545

4646
docs-gen:
4747
poetry run python ./docs/pydocs/generate_pydocs.py
48-
cp -r docs docs-build
49-
poetry run nbdoc_build --force_all True --srcdir ./docs-build
48+
cp -r docs/src/* docs/dist
49+
poetry run nbdoc_build --force_all True --srcdir ./docs/dist
5050

5151
self-install:
5252
pip install -e .

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<div align="center">
22

3-
<img src="https://raw.githubusercontent.com/guardrails-ai/guardrails/main/docs/img/Guardrails-ai-logo-for-dark-bg.svg#gh-dark-mode-only" alt="Guardrails AI Logo" width="600px">
4-
<img src="https://raw.githubusercontent.com/guardrails-ai/guardrails/main/docs/img/Guardrails-ai-logo-for-white-bg.svg#gh-light-mode-only" alt="Guardrails AI Logo" width="600px">
3+
<img src="https://raw.githubusercontent.com/guardrails-ai/guardrails/main/docs/dist/img/Guardrails-ai-logo-for-dark-bg.svg#gh-dark-mode-only" alt="Guardrails AI Logo" width="600px">
4+
<img src="https://raw.githubusercontent.com/guardrails-ai/guardrails/main/docs/dist/img/Guardrails-ai-logo-for-white-bg.svg#gh-light-mode-only" alt="Guardrails AI Logo" width="600px">
55

66
<hr>
77

@@ -30,7 +30,7 @@ Guardrails is a Python framework that helps build reliable AI applications by pe
3030

3131

3232
<div align="center">
33-
<img src="https://raw.githubusercontent.com/guardrails-ai/guardrails/main/docs/img/with_and_without_guardrails.svg" alt="Guardrails in your application" width="1500px">
33+
<img src="https://raw.githubusercontent.com/guardrails-ai/guardrails/main/docs/dist/img/with_and_without_guardrails.svg" alt="Guardrails in your application" width="1500px">
3434
</div>
3535

3636

@@ -39,7 +39,7 @@ Guardrails is a Python framework that helps build reliable AI applications by pe
3939
Guardrails Hub is a collection of pre-built measures of specific types of risks (called 'validators'). Multiple validators can be combined together into Input and Output Guards that intercept the inputs and outputs of LLMs. Visit [Guardrails Hub](https://hub.guardrailsai.com/) to see the full list of validators and their documentation.
4040

4141
<div align="center">
42-
<img src="https://raw.githubusercontent.com/guardrails-ai/guardrails/main/docs/img/guardrails_hub.gif" alt="Guardrails Hub gif" width="600px">
42+
<img src="https://raw.githubusercontent.com/guardrails-ai/guardrails/main/docs/dist/img/guardrails_hub.gif" alt="Guardrails Hub gif" width="600px">
4343
</div>
4444

4545

0 commit comments

Comments
 (0)