Skip to content

Commit 89b6d53

Browse files
authored
Merge branch '0.3.0' into karan/sensitive-language
2 parents 87ba4c7 + bf8286b commit 89b6d53

Some content is hidden

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

55 files changed

+1372
-477
lines changed

.github/workflows/deploy_docs.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,18 +33,18 @@ jobs:
3333
uses: actions/cache@v3
3434
with:
3535
path: ~/.cache/pypoetry
36-
key: poetry-cache-${{ runner.os }}-${{ steps.setup_python.outputs.python-version }}-${{ env.POETRY_VERSION }
36+
key: poetry-cache-${{ runner.os }}-${{ steps.setup_python.outputs.python-version }}-${{ env.POETRY_VERSION }}
3737
- name: Install Poetry
3838
uses: snok/install-poetry@v1
3939
- name: Install dependencies
4040
run: poetry install --with docs
4141
- name: Build
42-
run: mkdocs build
42+
run: poetry run mkdocs build
4343
- name: Upload artifact
4444
uses: actions/upload-pages-artifact@v2
4545
with:
4646
# Upload build folder
4747
path: 'site'
4848
- name: Deploy to GitHub Pages
4949
id: deployment
50-
uses: actions/deploy-pages@v2
50+
uses: actions/deploy-pages@v2

.github/workflows/scripts/run_notebooks.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ cd docs/examples
99
# Function to process a notebook
1010
process_notebook() {
1111
notebook="$1"
12-
if [ "$notebook" != "valid_chess_moves.ipynb" ] && [ "$notebook" != "translation_with_quality_check.ipynb" ]; then
12+
invalid_notebooks=("valid_chess_moves.ipynb" "translation_with_quality_check.ipynb" "llamaindex-output-parsing.ipynb" "competitors_check.ipynb")
13+
if [[ ! " ${invalid_notebooks[@]} " =~ " ${notebook} " ]]; then
1314
echo "Processing $notebook..."
1415
poetry run jupyter nbconvert --to notebook --execute "$notebook"
1516
if [ $? -ne 0 ]; then

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ dist/*
2020
.cache
2121
scratch/
2222
.coverage*
23+
coverage.xml
2324
test.db
2425
test.index
2526
htmlcov

Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,9 @@ test-cov:
4747
view-test-cov:
4848
poetry run pytest tests/ --cov=./guardrails/ --cov-report html && open htmlcov/index.html
4949

50+
view-test-cov-file:
51+
poetry run pytest tests/unit_tests/test_logger.py --cov=./guardrails/ --cov-report html && open htmlcov/index.html
52+
5053
docs-serve:
5154
poetry run mkdocs serve -a $(MKDOCS_SERVE_ADDR)
5255

docs/api_reference/validators.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
- "!validate"
1212
- "!register_validator"
1313
- "!PydanticReAsk"
14-
- "!Filter"
1514
- "!Refrain"
1615
- "!ValidationResult"
1716
- "!PassResult"

docs/defining_guards/pydantic.ipynb

Lines changed: 87 additions & 275 deletions
Large diffs are not rendered by default.

docs/examples/competitors_check.ipynb

Lines changed: 240 additions & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)