feat(substance_v4): add SubstanceCollectionV4 wrapping v4 substance API#460
feat(substance_v4): add SubstanceCollectionV4 wrapping v4 substance API#460prasad-albert wants to merge 5 commits intonextfrom
Conversation
Code ReviewIssues Found
Mentions
Summary1 docstring correctness issue, 1 pattern deviation. Neither blocks functionality, but the wrong param name in the class docstring will appear in generated docs. |
|
@claude review the PR again |
|
Claude finished @prasad-albert's task in 2m 36s —— View job Code Review
Previous issues (param name, unused Issues Found[src/albert/collections/substance_v4.py:202-210] return self.get_by_ids(
cas_ids=[cas_id] if cas_id else None,
...
)[0] # IndexError if substances list is emptySuggest a guard: results = self.get_by_ids(...)
if not results:
raise ValueError(f"No substance found for the provided identifier.")
return results[0]Nits
Everything Else
SummaryOne real issue ( |
@claude Fixed the primary issue |
|
Claude finished @prasad-albert's task in 42s —— View job Code Review Update
Primary issue ( results = self.get_by_ids(...)
if not results:
raise ValueError("No substance found for the provided identifier.")
return results[0]Nit ( All prior issues are resolved. PR looks good. ✅ |
95f8dc1 to
3863044
Compare
- Adds SubstanceCollectionV4 at client.substances_v4 with get_by_ids, get_by_id, search (paginated), create, and update_metadata - Adds resource models: SubstanceV4Info, SubstanceV4SearchItem, SubstanceV4Create, SubstanceV4CreateResult, SubstanceV4Metadata, SubstanceV4Response - Non-breaking: v3 SubstanceCollection untouched; V4 suffix stripped in SDK 2.0 Co-Authored-By: Claude Code <claude-code@anthropic.com>
Co-Authored-By: Claude Code <claude-code@anthropic.com>
Co-Authored-By: Claude Code <claude-code@anthropic.com>
…ding backend fixes Co-Authored-By: Claude Code <claude-code@anthropic.com>
f47cee7 to
b7d08d6
Compare
Co-Authored-By: Claude Code <claude-code@anthropic.com>
Summary
SubstanceCollectionV4atclient.substances_v4wrapping the new/api/v4/substancesAPIget_by_ids,get_by_id,search(with paginator),create, andupdate_metadataSubstanceV4Info,SubstanceV4SearchItem,SubstanceV4Create,SubstanceV4CreateResult,SubstanceV4Metadata, andSubstanceV4Responseresource modelsSubstanceCollectionis untouched;V4suffix will be stripped in SDK 2.0 when v3 is deprecated