Skip to content

Commit

Permalink
Merge pull request #44 from guardrails-ai/open-source
Browse files Browse the repository at this point in the history
Open Source API
  • Loading branch information
CalebCourier authored Jun 17, 2024
2 parents 1cd5139 + 1edd096 commit 65efea5
Show file tree
Hide file tree
Showing 131 changed files with 608 additions and 8,857 deletions.
4 changes: 0 additions & 4 deletions .flake8

This file was deleted.

24 changes: 16 additions & 8 deletions .github/workflows/pr_qa.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,29 +5,37 @@ name: Pull Request Quality Checks
# Controls when the workflow will run
on:
pull_request:
branches: [ main ]
branches:
- main
- feat/*
workflow_dispatch:

jobs:
build:
name: PR checks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: 3.12.x

- name: Setup Node
uses: actions/setup-node@v4
with:
python-version: '3.12'
node-version: 20

- name: Install Dependencies
run: |
python -m venv ./.venv
source ./.venv/bin/activate
make install-lock;
make build
make install-dev;
cp ./.venv/lib/python3.12/site-packages/guardrails_api_client/openapi-spec.json ./open-api-spec.json
- name: Run Quality Checks
run: |
source ./.venv/bin/activate
make qa;
45 changes: 45 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Publish To PyPI
on:
workflow_dispatch:

permissions:
contents: read

jobs:
build:
name: Build Image
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: 3.12.x

- name: Install Python dependencies
run: |
python -m pip install --upgrade pip;
pip install twine;
pip install build;
continue-on-error: false

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20

- name: Build the module
env:
PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
make build
python -m build
continue-on-error: false

- name: Upload to PyPI
env:
PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
twine upload dist/* -u __token__ -p $PYPI_PASSWORD
49 changes: 0 additions & 49 deletions .github/workflows/publish_image.yml

This file was deleted.

6 changes: 4 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,12 @@ guardrails-custom-validators
guardrails-api-client
guardrails
*.env
!default.env
opentelemetry-lambda-layer
open-api-spec.json
open-api-spec.yml
.python-version
requirements-lock-old.txt
models
opensearch
opensearch
build
*.egg-info
93 changes: 0 additions & 93 deletions ApiClientLibraries.md

This file was deleted.

51 changes: 0 additions & 51 deletions Dockerfile.dev

This file was deleted.

48 changes: 0 additions & 48 deletions Dockerfile.heavy

This file was deleted.

Loading

0 comments on commit 65efea5

Please sign in to comment.