Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1 +1 @@
* @kenany
* @crowdstrike/aidr-python-CS-Maintainers
29 changes: 29 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,3 +107,32 @@ jobs:

- name: ruff format
run: uv run ruff format --check .

test:
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
python-version: ["3.12", "3.13"]
steps:
- name: Checkout code
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0

- run: npm install -g corepack
- run: corepack enable pnpm

- name: Install uv
uses: astral-sh/setup-uv@85856786d1ce8acfbcc2f13a5f3fbd6b938f9f41 # v7.1.2
with:
enable-cache: true

- name: Setup Python
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: uv sync --all-extras --dev

- name: Test
run: ./scripts/test
2 changes: 1 addition & 1 deletion .python-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.13
3.12
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ pip install crowdstrike-aidr

## Requirements

Python v3.13 or greater.
Python v3.12 or greater.

## Usage

Expand Down
10 changes: 5 additions & 5 deletions flake.lock

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

7 changes: 5 additions & 2 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,16 @@
shell = {pkgs ? import <nixpkgs>}:
pkgs.mkShellNoCC {
packages = with pkgs; [
python313
pnpm
python312
uv
];

env = {};

shellHook = '''';
shellHook = ''
uv sync --all-extras --dev
'';
};
};
}
7 changes: 4 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ authors = [
classifiers = [
"Typing :: Typed",
"Intended Audience :: Developers",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Operating System :: OS Independent",
Expand All @@ -21,7 +22,7 @@ classifiers = [
"License :: OSI Approved :: Apache Software License"
]

requires-python = ">=3.13"
requires-python = ">=3.12"

dependencies = [
"httpx ~=0.28.1",
Expand All @@ -42,7 +43,7 @@ requires = ["uv_build ==0.9.13"]
build-backend = "uv_build"

[tool.mypy]
python_version = "3.13"
python_version = "3.12"
color_output = true
error_summary = true
implicit_reexport = false
Expand All @@ -58,7 +59,7 @@ warn_required_dynamic_aliases = true

[tool.ruff]
line-length = 120
target-version = "py313"
target-version = "py312"

[tool.ruff.lint]
select = [
Expand Down
1 change: 0 additions & 1 deletion scripts/test
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,3 @@ pnpx start-server-and-test --expect 404 \
"pnpx @stoplight/prism-cli mock -d --json-schema-faker-fillProperties=false ./specs/ai-guard.openapi.json" \
4010 \
"uv run pytest tests/test_ai_guard.py"

3 changes: 2 additions & 1 deletion src/crowdstrike_aidr/_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@

import typing
from collections.abc import Mapping
from typing import Annotated, Any, TypeGuard, TypeIs, Union, cast, get_args, get_origin, overload
from typing import Annotated, Any, TypeGuard, Union, cast, get_args, get_origin, overload

import typing_extensions
from typing_extensions import TypeIs

from ._types import NotGiven, Omit

Expand Down
3 changes: 2 additions & 1 deletion tests/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@
import traceback
import typing
from datetime import datetime
from typing import TYPE_CHECKING, Any, Literal, TypeGuard, TypeIs, TypeVar, assert_type, cast, get_origin
from typing import TYPE_CHECKING, Any, Literal, TypeGuard, TypeVar, assert_type, cast, get_origin

import typing_extensions
from pydantic import AwareDatetime, BaseModel
from pydantic.v1.typing import get_args, is_union
from typing_extensions import TypeIs

from crowdstrike_aidr._utils import extract_type_arg, is_annotated_type

Expand Down
50 changes: 49 additions & 1 deletion uv.lock

Large diffs are not rendered by default.