Skip to content

Open Source API #44

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 15 commits into from
Jun 17, 2024
Merged
Show file tree
Hide file tree
Changes from 14 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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