Skip to content

PDFCLOUD-5474 Implement the delete function on files#8

Merged
datalogics-cgreen merged 13 commits intopdfrest:mainfrom
datalogics-kam:pdfcloud-5474-implement-delete
Jan 5, 2026
Merged

PDFCLOUD-5474 Implement the delete function on files#8
datalogics-cgreen merged 13 commits intopdfrest:mainfrom
datalogics-kam:pdfcloud-5474-implement-delete

Conversation

@datalogics-kam
Copy link
Copy Markdown
Contributor

@datalogics-kam datalogics-kam commented Dec 24, 2025

PDFCLOUD-5474

Needs #7 to be reviewed/merged first

datalogics-cgreen and others added 13 commits January 5, 2026 12:13
Assisted-by: Codex
- Python module backports exception group support to Python 3.10

Assisted-by: Codex
- Raises PdfRestDeleteError when a file can be deleted.

- Since there can be more than one file deleted at a time, raises the
  error inside a PdfRestErrorGroup.

Assisted-by: Codex
- Added async live delete tests under `test_live_delete.py`, covering
  success, invalid ID, and missing ID scenarios for `AsyncPdfRestClient`.
- Improved exception handling to use `pytest.RaisesGroup` for both sync
  and async delete error aggregation.
- Enhanced test customization to validate extra query parameters, headers,
  and timeout behavior during async operations.

Assisted-by: Codex
…gers

- Updated `AGENTS.md` and `TESTING_GUIDELINES.md` with instructions on
  handling `ExceptionGroup` subclasses like `PdfRestErrorGroup` in tests.
- Emphasized verifying individual errors within `ExceptionGroups` using
  `pytest.RaisesGroup` and the `check=` hook for improved test accuracy.
- Added guidance to use a single `with` statement for combined context
  managers in compliance with ruff's SIM117 rule.

Assisted-by: Codex
- Introduced `delete_example.py` showcasing async file deletion with pdfRest:
  - A Python 3.11 version using `except*` syntax for exception groups.
  - A Python 3.10 version leveraging the `exceptiongroup` backport.
- Updated `pyproject.toml`, `uv.lock`, and `pyrightconfig.json` to include
  `python-dotenv` for environment variable management.
- Added `ruff.toml` configurations targeting `py310` and `py311` in examples.

Assisted-by: Codex
- Introduced a new `examples` job targeting Python versions 3.10 to 3.14.
  - Runs example sessions using `nox` and caches dependencies for efficiency.
- Updated the `publish` job to depend on the newly added `examples` workflow.
- Implemented utilities to discover example scripts in the `examples` directory,
  including support for Python-version-specific overrides.
- Introduced `_load_script_metadata` to parse and load metadata from example
  scripts (e.g., required Python version and dependencies).
- Added `_scripts_for_python` to filter and select compatible scripts based on
  their metadata and interpreter version.
- Created a new `examples` session in `noxfile` to execute discovered example
  scripts across supported Python versions.
- Introduced a `run-example` session to allow running a single example script
  with its matching interpreter via `nox`.

Assisted-by: Codex
- Remove the tool.uv.index, as it was causing examples not to work in
  CI, because AWS CodeArtifact wasn't available.

- Instead, pass the publish url and username to the `uv publish`
  command.
- Updated `README.md` with instructions on running example scripts.
- Added a new `examples/README.md` explaining how to execute and test
  example scripts using `uv` and `nox`.
- Highlighted support for Python-version-specific overrides and the use
  of `.env` files to manage environment variables.

Assisted-by: Codex
@datalogics-kam datalogics-kam force-pushed the pdfcloud-5474-implement-delete branch from e08a7a1 to 2a3aa61 Compare January 5, 2026 18:13
@datalogics-cgreen datalogics-cgreen merged commit 3c9b205 into pdfrest:main Jan 5, 2026
14 checks passed
@datalogics-kam datalogics-kam deleted the pdfcloud-5474-implement-delete branch January 6, 2026 15:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants