Skip to content

Commit 2dbee7e

Browse files
authored
Merge pull request #12 from alainrk/fix/python-sdk-license-metadata
fix(sdk): make Python SDK installable via pip/uv
2 parents 1d23075 + 7ac04d4 commit 2dbee7e

34 files changed

Lines changed: 692 additions & 707 deletions

Makefile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,11 @@ sdk-python:
214214
-o sdks/python \
215215
--git-user-id=$(SDK_GIT_USER) --git-repo-id=$(SDK_GIT_REPO) \
216216
--additional-properties=packageName=cashout_sdk,projectName=cashout-sdk
217+
# The generator emits `license = "NoLicense"`, a bare string that setuptools
218+
# validates as an SPDX expression and rejects (it is not valid SPDX), breaking
219+
# `pip`/`uv` installs. Rewrite it to the table form, which installs cleanly.
220+
@sed -i.bak 's|^license = "NoLicense"$$|license = { text = "NoLicense" }|' sdks/python/pyproject.toml
221+
@rm -f sdks/python/pyproject.toml.bak
217222

218223
## sdk-go: generate the Go SDK into sdks/go
219224
.PHONY: sdk-go

internal/db/transactions.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -304,13 +304,13 @@ func (db *DB) GetUserTransactionsByTypePaginated(tgID int64, transactionType mod
304304
// TransactionFilter bundles the optional filters supported by
305305
// SearchUserTransactionsFiltered. Nil/zero fields are ignored.
306306
type TransactionFilter struct {
307-
Query string // case-insensitive substring on description
308-
Category string // "" or "all" disables the category filter
309-
Type model.TransactionType // "" disables the type filter
310-
DateFrom *time.Time // inclusive lower bound
311-
DateTo *time.Time // inclusive upper bound
312-
AmountMin *float64 // inclusive lower bound
313-
AmountMax *float64 // inclusive upper bound
307+
Query string // case-insensitive substring on description
308+
Category string // "" or "all" disables the category filter
309+
Type model.TransactionType // "" disables the type filter
310+
DateFrom *time.Time // inclusive lower bound
311+
DateTo *time.Time // inclusive upper bound
312+
AmountMin *float64 // inclusive lower bound
313+
AmountMax *float64 // inclusive upper bound
314314
}
315315

316316
// SearchUserTransactionsFiltered runs the full set of optional filters used by

internal/web/transactions_test.go

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -73,16 +73,15 @@ func ptrFloat(v float64) *float64 { return &v }
7373

7474
func TestBuildSearchFilter(t *testing.T) {
7575
type tc struct {
76-
name string
77-
query string
78-
category string
79-
txType string
80-
dateFrom string
81-
dateTo string
82-
amountMin *float64
83-
amountMax *float64
84-
wantCode int
85-
assertFilter func(t *testing.T, f any)
76+
name string
77+
query string
78+
category string
79+
txType string
80+
dateFrom string
81+
dateTo string
82+
amountMin *float64
83+
amountMax *float64
84+
wantCode int
8685
}
8786

8887
cases := []tc{

sdks/go/api_analytics.go

Lines changed: 45 additions & 43 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)