Skip to content

Send the client version in the API origin; require Python 3.11 - #60

Merged
prouast merged 9 commits into
mainfrom
dev
Oct 24, 2026
Merged

prouast merged 9 commits into
mainfrom
dev

Conversation

@prouast

@prouast prouast commented Oct 24, 2026

Copy link
Copy Markdown
Contributor

Changes

  • The SDK now sends vitallens-python_<version> as the API origin (X-Origin header on /stream, origin field on /file), so usage can be broken down by client version. VITALLENS_API_ORIGIN still overrides it verbatim; without an installed version it falls back to vitallens-python.
  • Require Python 3.11 or newer (README, requires-python, CI matrix, release workflow). Python 3.10 reaches end of life this month, and the fixed releases of pillow and filelock needed by the security audit require 3.11.
  • Includes the earlier dev commits: vitallens-core 0.3.4, request timeouts, test and CI changes.

Notes

  • The API accepts this origin on both routes (free-form label, pattern ^[A-Za-z0-9][A-Za-z0-9._+-]{0,63}$).
  • Users on Python 3.10 will stay on earlier releases.

prouast and others added 9 commits October 9, 2026 12:22
Bumps [actions/cache](https://github.com/actions/cache) from 5 to 6.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](actions/cache@v5...v6)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [actions/checkout](https://github.com/actions/checkout) from 6 to 7.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](actions/checkout@v6...v7)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [vitallens-core](https://github.com/Rouast-Labs/vitallens-core) from 0.2.5 to 0.3.3.
- [Release notes](https://github.com/Rouast-Labs/vitallens-core/releases)
- [Commits](Rouast-Labs/vitallens-core@v0.2.5...v0.3.3)

---
updated-dependencies:
- dependency-name: vitallens-core
  dependency-version: 0.3.3
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…ate results

- vitallens-core 0.2.5 -> 0.3.4 (full test suite passes).
- Requests to resolve-model, /stream and /file now have timeouts and raise VitalLensAPIError when they run out; without one, a stalled connection blocked forever. /file allows 300 s for the ~6 MB upload so slow mobile links are not cut off.
- docs/results.md: a short Getting Accurate Results section.
…egration, add real large upload and stream e2e

The file_mock and ndarray_mock tests patched requests.post, but the code posts through a Session since 0f6630d, so they quietly called the real dev API. They now patch requests.Session.post and use a fake key.

The tests that deliberately call the real API are marked integration (registered in pyproject.toml). New: a real multi-request /file upload (the kind of test that catches a timeout too tight for large uploads), a real streaming test paced like a camera, and a resolve-model test that is really resolved. Two cheap checks that the timeouts leave room for slow uplinks.

Full suite 3m30s -> 1m53s; pytest -m 'not integration' takes about 17 s.
The four CI jobs share one dev API key and rate limit. The real streaming and large upload tests made enough requests to trigger 429s when all jobs ran them at once. They are now skipped unless VITALLENS_HEAVY_E2E is set, which only the Linux Python 3.12 job does.
The label lets us see which SDK versions are in use. VITALLENS_API_ORIGIN still overrides it verbatim.
Python 3.10 reaches end of life this month, and the fixed releases of pillow and filelock behind the security audit need 3.11, so the 3.10 CI leg cannot pass the audit.
@prouast
prouast merged commit 1372a75 into main Oct 24, 2026
5 checks passed
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.

1 participant