PDFCLOUD-5474 Implement the delete function on files#8
Merged
datalogics-cgreen merged 13 commits intopdfrest:mainfrom Jan 5, 2026
Merged
Conversation
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
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
e08a7a1 to
2a3aa61
Compare
datalogics-cgreen
approved these changes
Jan 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PDFCLOUD-5474
Needs #7 to be reviewed/merged first