Skip to content

PDFCLOUD-5463 Add PDF/X, Flatten Forms, and Word, testing update#5

Merged
datalogics-cgreen merged 4 commits intopdfrest:mainfrom
datalogics-kam:pdfcloud-5463-three
Dec 18, 2025
Merged

PDFCLOUD-5463 Add PDF/X, Flatten Forms, and Word, testing update#5
datalogics-cgreen merged 4 commits intopdfrest:mainfrom
datalogics-kam:pdfcloud-5463-three

Conversation

@datalogics-kam
Copy link
Copy Markdown
Contributor

PDFCLOUD-5463

Please review/merge #4 first

  • Add live tests, including having a resource with form data for the form flattening tests to succeed.
  • Add tests that cover request customization and properly parameterize tests as described in AGENTS.md.
  • Have Codex update AGENTS.md to ensure that all the boxes are checked for the tests on first try.

@datalogics-kam datalogics-kam changed the title PDFCLOUD-5463 Add PDF/X, Flatten Forms, and Word PDFCLOUD-5463 Add PDF/X, Flatten Forms, and Word, testing update Dec 18, 2025
- Added `test_live_convert_to_pdfx.py` to test PDF to PDF/X conversion
  with valid and invalid output types.
- Added `test_live_convert_to_word.py` to test PDF to Word conversion
  with support for custom and default output names.
- Added `test_live_flatten_pdf_forms.py` to test flattening of PDF forms
  with validation for custom and default output names.
- Introduced new test resource file: `form_with_data.pdf`.

Assisted-by: Codex
- Added parameterized tests for `test_convert_to_pdfx_success` and
  `test_async_convert_to_pdfx_success` to validate multiple output types.
- Introduced sync and async tests to verify request customization for
  PDF to PDF/X, Word, and flattening PDF forms.
- Ensured validation logic for accepted input/output types and custom
  metadata integrations in payload and headers.

Assisted-by: Codex
- Added requirement for live pytest modules under `tests/live/` for all
  new endpoints and services.
- Emphasized parameterization, coverage of accepted literals, and at
  least one invalid input test.
- Clarified guidelines for reviewers to block changes without live
  tests or an explicit follow-up plan.
- Enhanced recommendations for pytest parameterization to improve test
  case clarity and reduce duplication.

Assisted-by: Codex
- Recommended using `BeforeValidator` over `@field_validator` for declarative
  validation across schemas.
- Documented guidelines for treating `PdfRestClient` and `AsyncPdfRestClient`
  as context managers for deterministic resource disposal.
- Established consistent behavior for handling file uploads, multipart forms,
  and endpoint parameters, highlighting the use of `PdfRestFile` objects.
- Specified rules for serialization and restricted public APIs from exposing
  internal resource identifiers like `PdfRestFileID`.

Assisted-by: Codex
@datalogics-cgreen datalogics-cgreen merged commit 9d27eb6 into pdfrest:main Dec 18, 2025
9 checks passed
@datalogics-kam datalogics-kam deleted the pdfcloud-5463-three branch December 18, 2025 20:51
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