Skip to content

Commit 687b527

Browse files
authored
feat: IP extension types, extract_ips filters, defang support, and mkdocs API reference (#17)
1 parent 64c27b7 commit 687b527

27 files changed

Lines changed: 3967 additions & 2028 deletions

.github/workflows/docs.yml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
name: ci
1+
name: ci
22
on:
33
push:
44
branches:
5-
- master
5+
- master
66
- main
77
permissions:
88
contents: write
@@ -15,15 +15,16 @@ jobs:
1515
run: |
1616
git config user.name github-actions[bot]
1717
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
18-
- uses: actions/setup-python@v5
18+
- name: Install uv
19+
uses: astral-sh/setup-uv@v5
1920
with:
20-
python-version: 3.x
21-
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
21+
python-version: "3.12"
22+
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
2223
- uses: actions/cache@v4
2324
with:
2425
key: mkdocs-material-${{ env.cache_id }}
2526
path: .cache
2627
restore-keys: |
2728
mkdocs-material-
28-
- run: pip install mkdocs-material
29-
- run: mkdocs gh-deploy --force
29+
- run: uv sync --group docs
30+
- run: uv run mkdocs gh-deploy --force

.github/workflows/publish_to_pypi.yml

Lines changed: 14 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ concurrency:
1616
permissions:
1717
contents: read # Default read-only permissions
1818

19-
# Make sure CI fails on all warnings, including Clippy lints
19+
# Treat all Rust warnings as errors; skip debug symbols to reduce compile time/memory
2020
env:
21-
RUSTFLAGS: "-Dwarnings"
21+
RUSTFLAGS: "-Dwarnings -C debuginfo=0"
2222

2323
jobs:
2424
# ------------------------------------------------------------------
@@ -30,7 +30,6 @@ jobs:
3030
fail-fast: false
3131
matrix:
3232
python-version:
33-
- "3.9"
3433
- "3.10"
3534
- "3.11"
3635
- "3.12"
@@ -46,11 +45,14 @@ jobs:
4645

4746
- name: Rust Cache
4847
uses: swatinem/rust-cache@v2
48+
with:
49+
save-if: ${{ github.ref_name == 'main' }}
4950

5051
- name: Install uv and Python
5152
uses: astral-sh/setup-uv@v5
5253
with:
5354
python-version: ${{ matrix.python-version }}
55+
enable-cache: true
5456

5557
- name: install deps
5658
run: uv sync --group dev
@@ -64,41 +66,6 @@ jobs:
6466
- name: Run tests
6567
run: uv run pytest tests -v
6668

67-
# ------------------------------------------------------------------
68-
# Minimum version test (py3.9 + polars 1.3)
69-
# ------------------------------------------------------------------
70-
min-versions-test:
71-
name: Test Min Versions (Python 3.9)
72-
runs-on: ubuntu-latest
73-
needs: test-python
74-
steps:
75-
- uses: actions/checkout@v4
76-
77-
- name: Set up Rust stable toolchain
78-
uses: dtolnay/rust-toolchain@stable
79-
80-
- name: Rust Cache
81-
uses: swatinem/rust-cache@v2
82-
83-
- name: Install uv and Python
84-
uses: astral-sh/setup-uv@v5
85-
with:
86-
python-version: "3.9"
87-
88-
- name: Install with minimum dependencies
89-
run: |
90-
uv sync --group dev
91-
uv lock --upgrade-package polars==1.3.0
92-
93-
- run: uv pip install -e .
94-
env:
95-
RUST_BACKTRACE: 1
96-
97-
- run: uv pip freeze
98-
99-
- name: Run tests with minimum versions
100-
run: uv run pytest tests -v
101-
10269
# ------------------------------------------------------------------
10370
# Test different operating systems
10471
# ------------------------------------------------------------------
@@ -119,9 +86,14 @@ jobs:
11986

12087
- name: cache rust
12188
uses: Swatinem/rust-cache@v2
89+
with:
90+
save-if: ${{ github.ref_name == 'main' }}
12291

12392
- name: install uv
12493
uses: astral-sh/setup-uv@v5
94+
with:
95+
python-version: "3.12"
96+
enable-cache: true
12597

12698
- name: install deps
12799
run: uv sync --group dev
@@ -139,7 +111,7 @@ jobs:
139111
# ------------------------------------------------------------------
140112
build-linux:
141113
name: Build Wheels (${{ matrix.os }}, ${{ matrix.target }})
142-
needs: [test-python, test-os, min-versions-test]
114+
needs: [test-python, test-os]
143115
runs-on: ${{ matrix.platform.runner }}
144116

145117
strategy:
@@ -176,7 +148,7 @@ jobs:
176148

177149
build-musllinux:
178150
name: Build Wheels (${{ matrix.os }}, ${{ matrix.target }})
179-
needs: [test-python, test-os, min-versions-test]
151+
needs: [test-python, test-os]
180152
runs-on: ${{ matrix.platform.runner }}
181153

182154
strategy:
@@ -212,7 +184,7 @@ jobs:
212184

213185
build-windows:
214186
name: Build Wheels (${{ matrix.os }}, ${{ matrix.target }})
215-
needs: [test-python, test-os, min-versions-test]
187+
needs: [test-python, test-os]
216188
runs-on: ${{ matrix.platform.runner }}
217189

218190
strategy:
@@ -246,7 +218,7 @@ jobs:
246218

247219
build-macos:
248220
name: Build Wheels (${{ matrix.os }}, ${{ matrix.target }})
249-
needs: [test-python, test-os, min-versions-test]
221+
needs: [test-python, test-os]
250222
runs-on: ${{ matrix.platform.runner }}
251223

252224
strategy:

AGENTS.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Follow the Python Developer Tooling Handbook's recommendations:
2+
- Use uv for all dependency management
3+
- Reference: https://pydevtools.com/handbook/explanation/modern-python-project-setup-guide-for-ai-assistants.md
4+
- For more information: https://pydevtools.com/llms.txt

0 commit comments

Comments
 (0)