Skip to content
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

Update to jsonschema's format-nongpl extra #1244

Draft
wants to merge 7 commits into
base: main
Choose a base branch
from
Draft
Changes from all 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
27 changes: 27 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -16,6 +16,33 @@ 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
make full

- name: Check license
run: |
source .venv/bin/activate
liccheck
Linting:
runs-on: ubuntu-latest
strategy:
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.

58 changes: 56 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"
@@ -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"
@@ -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
@@ -132,3 +134,55 @@ 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]
optional_dependencies = [
"sql",
"vectordb",
"manifest",
"anthropic",
"huggingface",
"api",
"databricks",
"uv",
"llama"
] # to load extras from [tool.poetry.extras]

[tool.liccheck.authorized_packages]
aiocache = "0.12.3" # BSD 3-Clause
aiohappyeyeballs = "2.4.3" # Python Software Foundation
guardrails-api = "*" # Modified ELSSTIC
jsonformer = "0.12.0" # MIT
pillow = "10.4.0" # Historical Permission Notice and Disclaimer (HPND)