Skip to content

Update to jsonschema's format-nongpl extra #1244

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 12 commits into from
Mar 28, 2025
28 changes: 28 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,34 @@ on:
workflow_dispatch:

jobs:
LicenseChecks:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install Poetry
uses: snok/install-poetry@v1

- name: Install Dependencies
# TODO: fix errors so that we can run `make dev` instead
run: |
# Setup Virtual Environment
python3 -m venv ./.venv
source .venv/bin/activate
poetry install

- name: Check license
run: |
source .venv/bin/activate
.venv/bin/pip install greenlet
.venv/bin/liccheck
Linting:
runs-on: ubuntu-latest
strategy:
Expand Down
62 changes: 44 additions & 18 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

45 changes: 43 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "guardrails-ai"
version = "0.6.4"
version = "0.6.5"
description = "Adding guardrails to large language models."
authors = ["Guardrails AI <contact@guardrailsai.com>"]
license = "Apache License 2.0"
Expand Down Expand Up @@ -46,7 +46,7 @@ requests = "^2.31.0"
faker = "^25.2.0"
jsonref = "^1.1.0"
jsonformer = {version = "0.12.0", optional = true}
jsonschema = {version = "^4.22.0", extras = ["format"]}
jsonschema = {version = "^4.22.0", extras = ["format-nongpl"]}
pip = ">=22"
pyjwt = "^2.8.0"
opentelemetry-sdk = "^1.24.0"
Expand Down Expand Up @@ -87,6 +87,8 @@ pypdfium2 = "^4.23.1"
pyright = "1.1.334"
lxml-stubs = "^0.4.0"
ruff = ">=0.4.1"
liccheck = "^0.9.2"


[tool.poetry.group.api]
optional = true
Expand Down Expand Up @@ -132,3 +134,42 @@ markers = [
[pytest]
log_cli = "True"
log_cli_level = "DEBUG"


[tool.liccheck]
authorized_licenses = [
"3-clause bsd",
"bsd",
"new bsd",
"bsd license",
"new bsd license",
"simplified bsd",
"academic free license (afl)",
"apache",
"apache 2.0",
"apache software",
"apache software license",
"gnu lgpl",
"lgpl with exceptions or zpl",
"gnu library or lesser general public license (lgpl)",
"isc",
"isc license",
"isc license (iscl)",
"mit",
"mit license",
"mozilla public license 2.0 (mpl 2.0)",
"the unlicense (unlicense)",
"python software foundation",
"python software foundation license",
"zpl 2.1",
]
unauthorized_licenses = [
"gpl v3",
]
level = "Paranoid"
dependencies = true # to load [tool.poetry.dependencies]

[tool.liccheck.authorized_packages]
aiocache = "0.12.3" # BSD 3-Clause
aiohappyeyeballs = "2.4.3" # Python Software Foundation
guardrails-api = "*" # Modified ELSSTIC