Commit 19b60f0
authored
feat: add pilFlavor to generate license terms (#177)
* feat: introduce PILFlavor class for managing programmable IP license terms
* feat: enhance PILFlavor class with camelCase to snake_case conversion and improve error messages for clarity
* feat: add unit tests for PILFlavor class to validate non-commercial and commercial use cases
* feat: refactor License class to utilize PILFlavor for license terms management and enhance validation logic
* feat: enhance License class tests by integrating PILFlavorError for improved validation and error handling
* feat: enhance PILFlavor class with new method for converting camelCase to snake_case license terms and update return types for license terms methods
* refactor: the pil_flavor class
* feat: update License class to use LicenseTermsInput for license terms management and enhance deprecation messages for clarity
* feat: add unit tests for various PILFlavor registration scenarios, including non-commercial and commercial use cases
* feat: enhance IPAsset and License classes with camelCase conversion for license terms and improve validation logic
* refactor: replace Web3 checksum address validation with a dedicated validate_address function and update related unit tests
* feat: integrate ModuleRegistryClient into IPAsset and update licensing configuration validation logic
* fix: update hookData handling in LicensingConfigData to use text conversion and adjust related tests for consistency
* refactor: remove LicenseTerms class and integrate LicensingConfigData into Group and IPAsset for improved licensing configuration management
* feat: add comprehensive tests for various licensing configurations in IPAsset, including commercial remix and non-commercial terms
* refactor: improve deprecation messages in License class methods to clarify future usage of register_pil_terms
* docs: update parameter descriptions in License and PILFlavor classes for improved clarity and consistency
* test: add unit tests for snake_to_camel and convert_dict_keys_to_camel_case functions
* feat: enhance IPAsset validation by adding checks for whitelisted royalty policies and currencies, along with corresponding unit tests
* refactor: streamline currency whitelisting check in IPAsset validation logic for improved readability
* refactor: enhance License class by utilizing replace for commercial revenue share calculation and streamline address validation in DerivativeData class1 parent 9210dae commit 19b60f0
File tree
22 files changed
+1762
-631
lines changed- src/story_protocol_python_sdk
- resources
- types/resource
- utils
- tests
- integration
- unit
- fixtures
- resources
- utils
22 files changed
+1762
-631
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
34 | | - | |
| 33 | + | |
| 34 | + | |
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| 48 | + | |
48 | 49 | | |
49 | 50 | | |
50 | 51 | | |
| |||
73 | 74 | | |
74 | 75 | | |
75 | 76 | | |
| 77 | + | |
76 | 78 | | |
| 79 | + | |
77 | 80 | | |
78 | 81 | | |
79 | 82 | | |
| |||
88 | 91 | | |
89 | 92 | | |
90 | 93 | | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
91 | 97 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
25 | 28 | | |
26 | 29 | | |
27 | 30 | | |
| |||
32 | 35 | | |
33 | 36 | | |
34 | 37 | | |
35 | | - | |
| 38 | + | |
36 | 39 | | |
37 | 40 | | |
38 | 41 | | |
| |||
59 | 62 | | |
60 | 63 | | |
61 | 64 | | |
62 | | - | |
63 | | - | |
| 65 | + | |
64 | 66 | | |
65 | 67 | | |
66 | 68 | | |
| |||
707 | 709 | | |
708 | 710 | | |
709 | 711 | | |
710 | | - | |
711 | | - | |
| 712 | + | |
| 713 | + | |
712 | 714 | | |
713 | 715 | | |
714 | 716 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
40 | 43 | | |
41 | 44 | | |
42 | 45 | | |
| |||
69 | 72 | | |
70 | 73 | | |
71 | 74 | | |
| 75 | + | |
72 | 76 | | |
73 | 77 | | |
74 | 78 | | |
| |||
87 | 91 | | |
88 | 92 | | |
89 | 93 | | |
90 | | - | |
| 94 | + | |
| 95 | + | |
91 | 96 | | |
92 | 97 | | |
93 | 98 | | |
| 99 | + | |
94 | 100 | | |
| 101 | + | |
95 | 102 | | |
96 | 103 | | |
97 | 104 | | |
| |||
129 | 136 | | |
130 | 137 | | |
131 | 138 | | |
132 | | - | |
133 | 139 | | |
| 140 | + | |
134 | 141 | | |
135 | 142 | | |
136 | 143 | | |
| |||
755 | 762 | | |
756 | 763 | | |
757 | 764 | | |
758 | | - | |
759 | 765 | | |
760 | 766 | | |
761 | 767 | | |
| |||
1399 | 1405 | | |
1400 | 1406 | | |
1401 | 1407 | | |
1402 | | - | |
1403 | 1408 | | |
1404 | 1409 | | |
1405 | 1410 | | |
| |||
2251 | 2256 | | |
2252 | 2257 | | |
2253 | 2258 | | |
| 2259 | + | |
| 2260 | + | |
| 2261 | + | |
| 2262 | + | |
| 2263 | + | |
| 2264 | + | |
| 2265 | + | |
| 2266 | + | |
| 2267 | + | |
| 2268 | + | |
| 2269 | + | |
| 2270 | + | |
| 2271 | + | |
| 2272 | + | |
| 2273 | + | |
| 2274 | + | |
| 2275 | + | |
| 2276 | + | |
| 2277 | + | |
| 2278 | + | |
| 2279 | + | |
| 2280 | + | |
| 2281 | + | |
2254 | 2282 | | |
2255 | 2283 | | |
2256 | | - | |
2257 | | - | |
2258 | | - | |
| 2284 | + | |
| 2285 | + | |
| 2286 | + | |
2259 | 2287 | | |
2260 | 2288 | | |
2261 | 2289 | | |
| |||
0 commit comments