Skip to content

feat!: hub v0.13.0 - #130

Merged
pbrassel merged 4 commits into
mainfrom
hub-v0.13.0
Aug 3, 2026
Merged

feat!: hub v0.13.0#130
pbrassel merged 4 commits into
mainfrom
hub-v0.13.0

Conversation

@pbrassel

@pbrassel pbrassel commented Jul 31, 2026

Copy link
Copy Markdown
Member

Summary by CodeRabbit

  • New Features

    • Added consistent camelCase field handling across API requests and responses.
    • Added support for resource metadata, including single-resource response details.
    • Improved single-resource retrieval across authentication, core, and storage APIs.
    • Added public access to shared resource and model types.
    • Bucket-file uploads now return uploaded file details directly.
    • Added automatic handling of wrapped API responses.
  • Documentation

    • Updated examples, API references, sample output, and coverage information.
  • Chores

    • Updated the test Hub version and configured a five-second response timeout.

tada5hi and others added 3 commits July 30, 2026 09:58
authup wraps every single-record entity response in a data/meta envelope
since 1.0.0-beta.57 (authup/authup@00f2f4c3a, "feat: query-capability
discovery via meta.schema + entity record response envelope", #3332).
getOne, create, update and delete of all entity controllers now respond
with {"data": ..., "meta": ...} instead of the entity itself, mirroring
the envelope that collection responses have always used. meta carries
response-scoped extras such as the queryable schema of the endpoint. The
OAuth2 protocol surface (token, introspect, revoke, ...) stays flat, so
_auth_flows is unaffected.

Add the _unwrap_single_resource hook to BaseClient, which returns the
response body unchanged, and call it in _create_resource,
_get_single_resource and _update_resource. AuthClient overrides the hook
to return the data property and raises a ValueError naming the required
authup version if the property is absent. The FLAME Hub core and storage
services keep responding with the bare entity, so CoreClient and
StorageClient are untouched. Collection responses were already validated
as an envelope by ResourceList.

BREAKING CHANGE: AuthClient requires authup 1.0.0-beta.57 or newer.
The Hub v0.13.0 API expects camel case attribute names and envelopes most of its responses like `{"data": ..., "meta": ...}`.

BREAKING CHANGE: Models are serialized with camel case attribute names.
@coderabbitai

coderabbitai Bot commented Jul 31, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 23c38b46-4b84-42c9-ab93-c7f14416f6fc

📥 Commits

Reviewing files that changed from the base of the PR and between 920445e and 11d901f.

📒 Files selected for processing (1)
  • tests/conftest.py
🚧 Files skipped from review as they are similar to previous changes (1)
  • tests/conftest.py

📝 Walkthrough

Walkthrough

The client now centralizes Pydantic camelCase configuration, supports wrapped single-resource responses with optional metadata, updates client return types, parses response data consistently, and aligns tests, fixtures, examples, and documentation with the Hub API.

Changes

Hub response and model handling

Layer / File(s) Summary
Shared model contracts and exports
flame_hub/_base_client.py, flame_hub/_auth_client.py, flame_hub/_core_client.py, flame_hub/_storage_client.py, flame_hub/models.py, flame_hub/types.py
Shared model bases apply camelCase aliases. Metadata, wrapped-resource, and SingleResourceResult types are defined and exported. Auth, core, and storage models use the shared bases.
Response envelope processing
flame_hub/_base_client.py
Include and field parameters use camelCase. Create, update, and single-resource responses handle data/meta envelopes. Single-resource methods can return metadata.
Client API result adoption
flame_hub/_auth_client.py, flame_hub/_core_client.py, flame_hub/_storage_client.py
Single-resource methods return SingleResourceResult. Analysis commands and bucket-file uploads parse response data directly.
Integration configuration and validation
.env.test, tests/conftest.py, tests/test_auth.py, tests/test_core.py
Tests use Hub version 0.13.0, a configurable five-second response timeout, and camelCase filter and label names.
Documentation and examples alignment
README.md, docs/clients_api.rst, docs/user_guide.rst
Examples and API documentation use camelCase fields and document _unwrap_single_resource. The coverage badge reports 97%.

Estimated code review effort: 4 (Complex) | ~45 minutes

Sequence Diagram(s)

sequenceDiagram
  participant ClientCaller
  participant BaseClient
  participant HubAPI
  ClientCaller->>BaseClient: request single resource
  BaseClient->>HubAPI: send camelCase query parameters
  HubAPI-->>BaseClient: return data/meta envelope or direct resource
  BaseClient-->>ClientCaller: return resource or resource/metadata tuple
Loading

Possibly related PRs

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 12.20% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies a breaking feature release for hub v0.13.0, matching the API and model changes in the pull request.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch hub-v0.13.0

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
.env.test (1)

10-11: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Reorder the new keys to satisfy dotenv-linter.

dotenv-linter reports UnorderedKey because both keys appear after PYTEST_STORAGE_BASE_URL. Move them before that key to avoid lint warnings.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.env.test around lines 10 - 11, Move PYTEST_HUB_VERSION and
PYTEST_RESPONSE_TIMEOUT before PYTEST_STORAGE_BASE_URL in the environment
configuration, preserving their values and ensuring the keys follow
dotenv-linter’s expected ordering.

Source: Linters/SAST tools

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@tests/conftest.py`:
- Around line 347-358: Update the auth_client, core_client, and storage_client
fixtures to retain each created client, yield the corresponding wrapper, and
close the injected HTTP client in a finally block after yield. Apply identical
teardown handling to all three session-scoped fixtures.

---

Nitpick comments:
In @.env.test:
- Around line 10-11: Move PYTEST_HUB_VERSION and PYTEST_RESPONSE_TIMEOUT before
PYTEST_STORAGE_BASE_URL in the environment configuration, preserving their
values and ensuring the keys follow dotenv-linter’s expected ordering.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 5ada573b-69c5-4fb3-aea4-182f4a5a8c9d

📥 Commits

Reviewing files that changed from the base of the PR and between 5712b68 and 920445e.

📒 Files selected for processing (13)
  • .env.test
  • README.md
  • docs/clients_api.rst
  • docs/user_guide.rst
  • flame_hub/_auth_client.py
  • flame_hub/_base_client.py
  • flame_hub/_core_client.py
  • flame_hub/_storage_client.py
  • flame_hub/models.py
  • flame_hub/types.py
  • tests/conftest.py
  • tests/test_auth.py
  • tests/test_core.py

Comment thread tests/conftest.py Outdated
@pbrassel
pbrassel merged commit b419de8 into main Aug 3, 2026
7 checks passed
@pbrassel
pbrassel deleted the hub-v0.13.0 branch August 3, 2026 08:10
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