Skip to content

feat: add custom results methods to Project#186

Closed
tchordia wants to merge 3 commits into
mainfrom
tc/custom-results-support
Closed

feat: add custom results methods to Project#186
tchordia wants to merge 3 commits into
mainfrom
tc/custom-results-support

Conversation

@tchordia

@tchordia tchordia commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Summary

(to be filled in)

Claude Notes

Adds four Project classmethods to manage a project's custom HTML results file via the new api_external custom-results endpoints (backend PR: surge-ai/gondor#36742). Uses a presigned-URL upload (no multipart).

  • Project.upload_custom_results(project_id, file) — POSTs for a presigned PUT URL, then PUTs the file (path or file-like) to S3 with Content-Type: text/html. Re-upload overwrites (fixed key).
  • Project.get_custom_results_url(project_id) — returns a presigned download URL.
  • Project.download_custom_results(project_id) — downloads and returns the HTML content.
  • Project.delete_custom_results(project_id) — deletes the file.

The two read methods are intentionally separate (URL vs. content). All read methods sit on the single GET endpoint, which 404s when absent (raising SurgeRequestError).

Test plan

  • pytest tests/test_projects.py — 5 new tests + all pre-existing pass (15 total)
  • Covers upload (path + file-like; asserts Content-Type: text/html), get-url, download (utf-8 decode), delete
  • No new ruff findings introduced (surge/projects.py is clean)
  • Reviewer sanity check

Note: requires the backend PR (gondor#36742) to be deployed before these endpoints exist.

Tanmay Chordia and others added 3 commits June 4, 2026 13:44
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

tchordia commented Jun 4, 2026

Copy link
Copy Markdown
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@tchordia tchordia changed the title feat: add Project.upload_custom_results feat: add custom results methods to Project Jun 4, 2026
@tchordia tchordia closed this Jun 4, 2026
@tchordia tchordia deleted the tc/custom-results-support branch June 4, 2026 22:19
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