Skip to content

PDFCLOUD-5592 Publish to PYPI#29

Merged
datalogics-kam merged 4 commits intopdfrest:mainfrom
datalogics-kam:pdfcloud-5592-publish-to-pypi
Feb 20, 2026
Merged

PDFCLOUD-5592 Publish to PYPI#29
datalogics-kam merged 4 commits intopdfrest:mainfrom
datalogics-kam:pdfcloud-5592-publish-to-pypi

Conversation

@datalogics-kam
Copy link
Copy Markdown
Contributor

@datalogics-kam datalogics-kam commented Feb 19, 2026

PDFCLOUD-5592

Why this change

This PR prepares the project for public release and aligns publishing with a safer, lower-friction release path. The main goal is to move from internal CodeArtifact-specific publishing to PyPI Trusted Publishing, while keeping CI/live testing behavior explicit and consistent.

What changed (high level)

The release workflow now publishes to PyPI using OIDC-based Trusted Publishing instead of AWS role assumption and CodeArtifact keyring setup. The publish job was tightened to run only when a GitHub Release is actually published.

The tests and examples jobs now explicitly target the ci-live environment so secret/environment scoping is clear and consistent across the matrix.

For live tests, tests/live/conftest.py now injects a wsn header into both sync and async client constructors using a session default (PDFREST_LIVE_WSN, fallback dl-internal-python-ci) so live traffic is consistently tagged.

The package version was bumped to 1.0.0 to reflect a stable release milestone.

Behavior changes

PRs and branch pushes still run docs, tests, and examples. Release publishing behavior changed from CodeArtifact publish to PyPI publish via Trusted Publishing.

  • CI matrix behavior: tests and examples run on Python 3.10, 3.11, 3.12, 3.13, and 3.14; docs-check runs on Python 3.11.
  • PR-only behavior: diff-cover comparison against the PR base branch runs only on pull_request events.
  • Release-only behavior: the publish job runs only on release.published and now targets PyPI.

Validation

Validation for this change is CI-driven:

  • Docs build (mkdocs --strict) in docs-check.
  • Test matrix (nox -s tests) and examples matrix (nox -s examples) across Python 3.10-3.14.
  • Coverage and class-function coverage checks remain in the tests job, with diff-cover enforced on PRs.

Risks and follow-ups

Primary risk is release-environment misconfiguration for PyPI Trusted Publishing (OIDC trust relationship and environment permissions). If that occurs, release publishing will fail fast at uv publish.

Follow-up to monitor: ensure production environment protection and PyPI Trusted Publisher settings remain aligned with this repo and release process.

- Changed the publish step in `test-and-publish.yml` to target PyPI instead
  of CodeArtifact, aligning with trusted publishing practices.
- Added `environment: production` and `UV_TRUSTED_PUBLISHING: always` to
  ensure proper publishing conditions for PyPI.
- Removed AWS role assumption and CodeArtifact-specific steps for
  streamlined PyPI publishing flow.

Assisted-by: Codex
@netlify
Copy link
Copy Markdown

netlify Bot commented Feb 19, 2026

Deploy Preview for pdfrest-python ready!

Name Link
🔨 Latest commit 25cf8f0
🔍 Latest deploy log https://app.netlify.com/projects/pdfrest-python/deploys/699794d7ff2baf0008d2c82e
😎 Deploy Preview https://deploy-preview-29--pdfrest-python.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

- Updated `test-and-publish.yml` to include `environment: ci-live` for
  both the `tests` and `examples` workflows.
- Ensures proper environment targeting during CI runs.

Assisted-by: Codex
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