Skip to content

Sync spec to wefunder#23097 (GA promotions, investment changes) + quickstart-track examples - #1

Merged
gbelote merged 2 commits into
mainfrom
greg/xenon/sync-23097-ga-promotions
Oct 1, 2026
Merged

gbelote merged 2 commits into
mainfrom
greg/xenon/sync-23097-ga-promotions

Conversation

@gbelote

@gbelote gbelote commented Sep 30, 2026

Copy link
Copy Markdown
Member

Draft — companion to Wefunder/wefunder#23097 and wefunder-node#18. Re-sync (python scripts/sync_spec.py) if that PR's spec changes again before merge; regenerated against its branch @ 0a345d900e5.

Spec changes picked up

  • listCompanyInvestmentChanges is now public (internal → ga): generated module wefunder._generated.api.investment_delta.list_company_investment_changes + a paginating example.
  • 34 operations promoted beta → ga — companies, follows, portfolio, syndicates + member management, statistics. No SDK surface change (the package ships ga+beta).
  • User.id is now a string (usr_…); reorderSyndicateMembers documents mem_ ids.

New guide snippets (for the docs landing page)

Key Covers
guides/user-token PKCE → exchange_code → Wefunder(tokens=…, client_id=…, store=…) → wf.portfolio.get()
guides/install-target list_eligible_install_targets → create_installation → fallback: find the active install by target (never by position) → create_installation_token → first request as the installation

(guides/client-credentials already covers the explore track.)

Verification

Check Result
ruff check / format, pyright clean
pytest 146 passed (coverage + freshness + conformance)
generated-in-sync regenerated from the committed spec with the pinned generator

Once the docs add a python entry to api-docs/sdk-manifests.config.json (after the first tag), these samples land on the Python tab.

🤖 Generated with Claude Code

gbelote and others added 2 commits September 30, 2026 15:09
…hanges + quickstart-track examples

Regenerated against wefunder greg/lithium/api-docs-landing @ 0a345d900e5 (PR #23097):
- listCompanyInvestmentChanges is now public (internal -> ga): generated
  module _generated/api/investment_delta + a paginating example.
- 34 beta ops promoted to ga (companies, follows, portfolio, syndicates +
  member management, statistics). No surface change: the SDK ships ga+beta.
- User.id is a string (usr_...), reorderSyndicateMembers documents mem_ ids.

Two new guide snippets mirror the docs landing page's quickstart tracks so
the Python tab can use the SDK instead of raw httpx:
- guides/user-token: PKCE -> exchange_code -> Wefunder(tokens=, store=) ->
  portfolio.get()
- guides/install-target: list_eligible_install_targets -> create_installation
  -> (fallback: find the ACTIVE install by target, never by position ->
  create_installation_token) -> first request as the installation.

ruff + pyright clean; 146 tests green (coverage/freshness/conformance).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…hrowing

Review finding: the example called create_installation first and the
"already installed" 409 propagated, so the fallback that mints a token for the
existing install was unreachable. The API's 409 `already_installed` carries the
existing install's id in details.installation (installations_controller.rb),
so catch exactly that error, mint for that id, and continue; any other error
(installation_revoked, missing scope) still raises.

Adds tests/test_example_install_target.py: already-installed path (409 →
mint → deals request runs AS the installation), and a different 409 still
raises. pyright resolves examples/ via extraPaths.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@gbelote
gbelote marked this pull request as ready for review October 1, 2026 04:15
@gbelote
gbelote merged commit f617a67 into main Oct 1, 2026
5 checks passed
@gbelote
gbelote deleted the greg/xenon/sync-23097-ga-promotions branch October 1, 2026 04:15
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