Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
2bb1fdc
Initial project made by Codex
datalogics-kam Sep 29, 2025
6908f3f
Project template: Comments in pyproject.toml, add .ecrc
datalogics-kam Sep 29, 2025
6c3f608
GitHub Workflows: Adapted from pdfassistant-chatbot
datalogics-kam Sep 29, 2025
726c9d2
AGENTS.md: Add file to guide Codex work.
datalogics-kam Sep 29, 2025
1e98a45
GitHub Workflows: Fix up UV and caching
datalogics-kam Oct 2, 2025
90f47de
pre-commit workflow: Fix up caching and options
datalogics-kam Oct 2, 2025
0d8092d
pre-commit: Add uv lock check
datalogics-kam Oct 7, 2025
c89d7b8
pre-commit: Update all the hooks
datalogics-kam Oct 7, 2025
60d1bc8
Use ruff for formatting, over black
datalogics-kam Oct 9, 2025
e21aa67
Add pyright for type checking
datalogics-kam Oct 7, 2025
22c311a
test-and-publish: Modernize the Publish to CodeArtifact job
datalogics-kam Oct 7, 2025
88b0a85
uv: Add pydantic and httpx
datalogics-kam Oct 7, 2025
69d673c
uv: Add helper modules for pytest
datalogics-kam Oct 7, 2025
7f0a898
wip initial cut of interface
datalogics-kam Oct 7, 2025
baab4f2
Drop Python 3.9 support in favor of 3.14
datalogics-kam Oct 9, 2025
6542398
testing: Use nox for running tests on multiple versions
datalogics-kam Oct 9, 2025
9eb76a1
pyproject: pyright and mypy settings that work together
datalogics-kam Oct 9, 2025
be88794
Add API key validation, enhance `/up` client methods
datalogics-kam Oct 10, 2025
3220c95
test-and-publish: Add PDFREST_API_KEY for testing
datalogics-kam Oct 10, 2025
be3d471
Correct authorization to use Api-Key
datalogics-kam Oct 27, 2025
bdfbe19
AGENTS.md: Check in incremental updates
datalogics-kam Oct 27, 2025
9aca168
wip first cut file uploads
datalogics-kam Oct 10, 2025
a2cd781
Refactor file upload handling in clients and tests
datalogics-kam Oct 27, 2025
4adbe4e
Enhance file upload functionality in clients and tests
datalogics-kam Oct 27, 2025
adbb8ed
Use context managers in tests to simplify resource handling
datalogics-kam Oct 28, 2025
0829459
Add `create_from_urls` functionality with tests
datalogics-kam Oct 28, 2025
0f19496
Add download and streaming support with comprehensive tests
datalogics-kam Oct 29, 2025
0d73bfe
Add SDK version and headers to client requests
datalogics-kam Oct 29, 2025
11cce9e
pdfrest.models: Convert module to a package
datalogics-kam Oct 30, 2025
1290a46
Refactor URL upload handling in clients
datalogics-kam Oct 30, 2025
460a6ee
models: Extend with validation utilities and new response types
datalogics-kam Oct 31, 2025
efab66a
Add PNG conversion support to clients and tests
datalogics-kam Oct 31, 2025
07ad72e
Add `get` method for retrieving file metadata in clients
datalogics-kam Oct 31, 2025
e21ba8d
Support request customization for all API endpoints
datalogics-kam Nov 3, 2025
b860594
Add support for multi-format graphic conversions (sync & async)
datalogics-kam Nov 4, 2025
ae12845
noxfile: Run tests in parallel with 8 processes
datalogics-kam Nov 4, 2025
a3c9ef3
Increase default read timeout
datalogics-kam Nov 4, 2025
11acb2f
Update AGENTS.md with usage, conventions, and testing guidelines
datalogics-kam Nov 4, 2025
fbbaaba
Add `query_pdf_info` API
datalogics-kam Nov 5, 2025
0e839c0
query_pdf_info: Default to all queries.
datalogics-kam Nov 5, 2025
470897e
PdfInfoPayload: Add missing mime-type check
datalogics-kam Nov 6, 2025
a472087
Add redaction support
datalogics-kam Nov 6, 2025
b04ef14
Add tests for PDF redaction features
datalogics-kam Nov 6, 2025
b473f1e
Agents.md: More guidelines for validation/serialization
datalogics-kam Nov 6, 2025
198719d
noxfile: Add additional args, support no-parallel
datalogics-kam Nov 6, 2025
34ad67c
test-and-publish: Don't run tests in parallel in CI
datalogics-kam Nov 6, 2025
a1f6a11
Only live-test resolution bounds with PNG
datalogics-kam Nov 6, 2025
3f8ca74
Refactor page range validation and serialization
datalogics-kam Nov 10, 2025
01fd6d5
Add tests for PNG conversion with page ranges and invalid inputs
datalogics-kam Nov 10, 2025
7cb6685
Add PDF split/merge support with live tests
datalogics-kam Nov 10, 2025
72b2c10
Update Agents.md for split/merge and better tests
datalogics-kam Nov 10, 2025
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
28 changes: 28 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
root = true


[*]
charset = utf-8
insert_final_newline = true
indent_style = space
indent_size = 2

[*.md]
indent_size = 2
max_line_length = 80

[{*.py,*.ipynb}]
indent_size = 4
max_line_length = 88

[*.sh]
# like -i=4
indent_style = space
indent_size = 4

shell_variant = bash # --language-variant
binary_next_line = true
switch_case_indent = true # --case-indent
space_redirects = true
keep_padding = false
function_next_line = true # --func-next-line
19 changes: 19 additions & 0 deletions .editorconfig-checker.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"Version": "v3.4.0",
"Verbose": false,
"Debug": false,
"IgnoreDefaults": false,
"SpacesAfterTabs": false,
"NoColor": false,
"Exclude": ["^\\.idea/", "\\.md$", "\\.py$", "\\.ipynb$"],
"AllowedContentTypes": [],
"PassedFiles": [],
"Disable": {
"EndOfLine": false,
"Indentation": false,
"InsertFinalNewline": false,
"TrimTrailingWhitespace": false,
"IndentSize": true,
"MaxLineLength": false
}
}
108 changes: 108 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
# Common settings that generally should always be used with your language specific settings

# Auto detect text files and perform LF normalization
# https://www.davidlaing.com/2012/09/19/customise-your-gitattributes-to-become-a-git-ninja/
* text=auto

#
# The above will handle all files NOT found below
#

# Documents
*.bibtex text diff=bibtex
*.doc diff=astextplain
*.DOC diff=astextplain
*.docx diff=astextplain
*.DOCX diff=astextplain
*.dot diff=astextplain
*.DOT diff=astextplain
*.pdf diff=astextplain
*.PDF diff=astextplain
*.rtf diff=astextplain
*.RTF diff=astextplain
*.md text
*.tex text diff=tex
*.adoc text
*.textile text
*.mustache text
*.csv text
*.tab text
*.tsv text
*.txt text
*.sql text

# Graphics
*.png binary
*.jpg binary
*.jpeg binary
*.gif binary
*.tif binary
*.tiff binary
*.ico binary
# SVG treated as an asset (binary) by default.
*.svg text
# If you want to treat it as binary,
# use the following line instead.
# *.svg binary
*.eps binary

# Scripts
*.bash text eol=lf
*.fish text eol=lf
*.sh text eol=lf
# These are explicitly windows files and should use crlf
*.bat text eol=crlf
*.cmd text eol=crlf
*.ps1 text eol=crlf

# Serialisation
*.json text
*.toml text
*.xml text
*.yaml text
*.yml text

# Archives
*.7z binary
*.gz binary
*.tar binary
*.tgz binary
*.zip binary

# Text files where line endings should be preserved
*.patch -text

#
# Exclude files from exporting
#

.gitattributes export-ignore
.gitignore export-ignore
# Basic .gitattributes for a python repo.

# Source files
# ============
*.pxd text diff=python
*.py text diff=python
*.py3 text diff=python
*.pyw text diff=python
*.pyx text diff=python
*.pyz text diff=python

# Binary files
# ============
*.db binary
*.p binary
*.pkl binary
*.pickle binary
*.pyc binary
*.pyd binary
*.pyo binary

# Jupyter notebook
*.ipynb text

# Note: .db, .p, and .pkl files are associated
# with the python modules ``pickle``, ``dbm.*``,
# ``shelve``, ``marshal``, ``anydbm``, & ``bsddb``
# (among others).
48 changes: 48 additions & 0 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: pre-commit

on:
pull_request:
push:
branches:
- main
- develop
- feature-*

jobs:
pre-commit:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
packages: write
pull-requests: write
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v6
with:
version: 0.8.22
python-version: 3.11
enable-cache: true
cache-suffix: pre-commit
cache-dependency-glob: uv.lock
- name: Restore venv cache
uses: actions/cache@v4
with:
path: |
.venv
key: ${{ runner.os }}-uv-${{ hashFiles('uv.lock') }}
- name: Restore mypy cache
uses: actions/cache@v4
with:
path: .mypy_cache
key: mypy_cache|${{ hashFiles('pyproject.toml') }}
- name: Restore pre-commit cache
uses: actions/cache@v4
with:
path: ~/.cache/pre-commit
key: pre-commit-4|${{ hashFiles('.pre-commit-config.yaml') }}
- name: Synchronize project dependencies
run: uv sync --group dev
- name: Run pre-commit checks
run: uv run pre-commit run --show-diff-on-failure --all-files --hook-stage manual
80 changes: 80 additions & 0 deletions .github/workflows/test-and-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
name: Test and Publish

on:
pull_request:
push:
branches:
- main
- develop
- feature-*
release:
types:
- published

jobs:
tests:
name: Tests (Python ${{ matrix.python-version }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
permissions:
id-token: write
contents: read
packages: write
pull-requests: write
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v6
with:
version: 0.8.22
python-version: ${{ matrix.python-version }}
enable-cache: true
cache-suffix: test-and-publish
cache-dependency-glob: uv.lock
- name: Run tests with nox
run: uvx nox --python ${{ matrix.python-version }} --session tests -- --no-parallel
env:
PDFREST_API_KEY: ${{ secrets.PDFREST_API_KEY }}

publish:
name: Publish to CodeArtifact
needs: tests
if: github.event_name == 'release'
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
packages: write
env:
UV_PROJECT_ENVIRONMENT: .venv-release
steps:
- uses: actions/checkout@v4
- name: Assume AWS role for repository CI
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: arn:aws:iam::304774597385:role/cit-oidc-role-${{ github.event.repository.name }}-ci
aws-region: us-east-2
- name: Install uv
uses: astral-sh/setup-uv@v6
with:
version: 0.8.22
enable-cache: true
cache-suffix: pre-commit
cache-dependency-glob: uv.lock
- name: Restore venv cache
uses: actions/cache@v4
with:
path: |
${{ env.UV_PROJECT_ENVIRONMENT }}
key: ${{ runner.os }}-uv-release-${{ hashFiles('pyproject.toml') }}
- name: Install keyring
run: uv tool install keyring --with keyrings.codeartifact
- name: Synchronize project dependencies
run: uv sync --group dev
- name: Build distribution artifacts
run: uv build --python 3.11
- name: Publish package to CodeArtifact
run: uv publish --index cit-pypi
Loading