planar 0.9.3__py3-none-any.whl → 0.11.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- planar/ai/agent.py +2 -1
- planar/ai/agent_base.py +24 -5
- planar/ai/state.py +17 -0
- planar/app.py +18 -1
- planar/data/connection.py +108 -0
- planar/data/dataset.py +11 -104
- planar/data/utils.py +89 -0
- planar/db/alembic/env.py +25 -1
- planar/files/storage/azure_blob.py +1 -1
- planar/registry_items.py +2 -0
- planar/routers/dataset_router.py +213 -0
- planar/routers/info.py +79 -36
- planar/routers/models.py +1 -0
- planar/routers/workflow.py +2 -0
- planar/scaffold_templates/pyproject.toml.j2 +1 -1
- planar/security/authorization.py +31 -3
- planar/security/default_policies.cedar +25 -0
- planar/testing/fixtures.py +34 -1
- planar/testing/planar_test_client.py +1 -1
- planar/workflows/decorators.py +2 -1
- planar/workflows/wrappers.py +1 -0
- {planar-0.9.3.dist-info → planar-0.11.0.dist-info}/METADATA +9 -1
- {planar-0.9.3.dist-info → planar-0.11.0.dist-info}/RECORD +25 -72
- {planar-0.9.3.dist-info → planar-0.11.0.dist-info}/WHEEL +1 -1
- planar/ai/test_agent_serialization.py +0 -229
- planar/ai/test_agent_tool_step_display.py +0 -78
- planar/data/test_dataset.py +0 -354
- planar/files/storage/test_azure_blob.py +0 -435
- planar/files/storage/test_local_directory.py +0 -162
- planar/files/storage/test_s3.py +0 -299
- planar/files/test_files.py +0 -282
- planar/human/test_human.py +0 -385
- planar/logging/test_formatter.py +0 -327
- planar/modeling/mixins/test_auditable.py +0 -97
- planar/modeling/mixins/test_timestamp.py +0 -134
- planar/modeling/mixins/test_uuid_primary_key.py +0 -52
- planar/routers/test_agents_router.py +0 -174
- planar/routers/test_files_router.py +0 -49
- planar/routers/test_object_config_router.py +0 -367
- planar/routers/test_routes_security.py +0 -168
- planar/routers/test_rule_router.py +0 -470
- planar/routers/test_workflow_router.py +0 -539
- planar/rules/test_data/account_dormancy_management.json +0 -223
- planar/rules/test_data/airline_loyalty_points_calculator.json +0 -262
- planar/rules/test_data/applicant_risk_assessment.json +0 -435
- planar/rules/test_data/booking_fraud_detection.json +0 -407
- planar/rules/test_data/cellular_data_rollover_system.json +0 -258
- planar/rules/test_data/clinical_trial_eligibility_screener.json +0 -437
- planar/rules/test_data/customer_lifetime_value.json +0 -143
- planar/rules/test_data/import_duties_calculator.json +0 -289
- planar/rules/test_data/insurance_prior_authorization.json +0 -443
- planar/rules/test_data/online_check_in_eligibility_system.json +0 -254
- planar/rules/test_data/order_consolidation_system.json +0 -375
- planar/rules/test_data/portfolio_risk_monitor.json +0 -471
- planar/rules/test_data/supply_chain_risk.json +0 -253
- planar/rules/test_data/warehouse_cross_docking.json +0 -237
- planar/rules/test_rules.py +0 -1494
- planar/security/tests/test_auth_middleware.py +0 -162
- planar/security/tests/test_authorization_context.py +0 -78
- planar/security/tests/test_cedar_basics.py +0 -41
- planar/security/tests/test_cedar_policies.py +0 -158
- planar/security/tests/test_jwt_principal_context.py +0 -179
- planar/test_app.py +0 -142
- planar/test_cli.py +0 -394
- planar/test_config.py +0 -515
- planar/test_object_config.py +0 -527
- planar/test_object_registry.py +0 -14
- planar/test_sqlalchemy.py +0 -193
- planar/test_utils.py +0 -105
- planar/testing/test_memory_storage.py +0 -143
- planar/workflows/test_concurrency_detection.py +0 -120
- planar/workflows/test_lock_timeout.py +0 -140
- planar/workflows/test_serialization.py +0 -1203
- planar/workflows/test_suspend_deserialization.py +0 -231
- planar/workflows/test_workflow.py +0 -2005
- {planar-0.9.3.dist-info → planar-0.11.0.dist-info}/entry_points.txt +0 -0
@@ -1,223 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"nodes": [
|
3
|
-
{
|
4
|
-
"type": "inputNode",
|
5
|
-
"content": {
|
6
|
-
"schema": ""
|
7
|
-
},
|
8
|
-
"id": "ip1",
|
9
|
-
"name": "request",
|
10
|
-
"position": {
|
11
|
-
"x": 110,
|
12
|
-
"y": 173.5
|
13
|
-
}
|
14
|
-
},
|
15
|
-
{
|
16
|
-
"type": "expressionNode",
|
17
|
-
"content": {
|
18
|
-
"expressions": [
|
19
|
-
{
|
20
|
-
"id": "e1-1",
|
21
|
-
"key": "daysSinceLastActivity",
|
22
|
-
"value": "date('now') - date(lastActivityDate)"
|
23
|
-
},
|
24
|
-
{
|
25
|
-
"id": "e1-2",
|
26
|
-
"key": "daysToThreshold",
|
27
|
-
"value": "dormancyThreshold - $.daysSinceLastActivity"
|
28
|
-
}
|
29
|
-
],
|
30
|
-
"passThrough": true,
|
31
|
-
"inputField": null,
|
32
|
-
"outputPath": null,
|
33
|
-
"executionMode": "single"
|
34
|
-
},
|
35
|
-
"id": "ex1",
|
36
|
-
"name": "calculate_dormancy",
|
37
|
-
"position": {
|
38
|
-
"x": 430,
|
39
|
-
"y": 173.5
|
40
|
-
}
|
41
|
-
},
|
42
|
-
{
|
43
|
-
"type": "decisionTableNode",
|
44
|
-
"content": {
|
45
|
-
"hitPolicy": "first",
|
46
|
-
"rules": [
|
47
|
-
{
|
48
|
-
"_id": "r1-1",
|
49
|
-
"i1-1": "< 0",
|
50
|
-
"o1-1": "'dormant'"
|
51
|
-
},
|
52
|
-
{
|
53
|
-
"_id": "r1-2",
|
54
|
-
"i1-1": "< 30",
|
55
|
-
"o1-1": "'at_risk'"
|
56
|
-
},
|
57
|
-
{
|
58
|
-
"_id": "r1-3",
|
59
|
-
"i1-1": "< 60",
|
60
|
-
"o1-1": "'warning'"
|
61
|
-
},
|
62
|
-
{
|
63
|
-
"_id": "r1-4",
|
64
|
-
"i1-1": "",
|
65
|
-
"o1-1": "'active'"
|
66
|
-
}
|
67
|
-
],
|
68
|
-
"inputs": [
|
69
|
-
{
|
70
|
-
"id": "i1-1",
|
71
|
-
"name": "Days To Threshold",
|
72
|
-
"field": "daysToThreshold"
|
73
|
-
}
|
74
|
-
],
|
75
|
-
"outputs": [
|
76
|
-
{
|
77
|
-
"id": "o1-1",
|
78
|
-
"name": "Status",
|
79
|
-
"field": "dormancyStatus"
|
80
|
-
}
|
81
|
-
],
|
82
|
-
"passThrough": true,
|
83
|
-
"inputField": null,
|
84
|
-
"outputPath": null,
|
85
|
-
"executionMode": "single"
|
86
|
-
},
|
87
|
-
"id": "dt1",
|
88
|
-
"name": "dormancy_status",
|
89
|
-
"position": {
|
90
|
-
"x": 750,
|
91
|
-
"y": 173.5
|
92
|
-
}
|
93
|
-
},
|
94
|
-
{
|
95
|
-
"type": "switchNode",
|
96
|
-
"content": {
|
97
|
-
"hitPolicy": "first",
|
98
|
-
"statements": [
|
99
|
-
{
|
100
|
-
"id": "s1-1",
|
101
|
-
"condition": "dormancyStatus != 'active'",
|
102
|
-
"isDefault": false
|
103
|
-
},
|
104
|
-
{
|
105
|
-
"id": "s1-2",
|
106
|
-
"condition": "",
|
107
|
-
"isDefault": true
|
108
|
-
}
|
109
|
-
]
|
110
|
-
},
|
111
|
-
"id": "sw1",
|
112
|
-
"name": "route_by_status",
|
113
|
-
"position": {
|
114
|
-
"x": 1070,
|
115
|
-
"y": 173.5
|
116
|
-
}
|
117
|
-
},
|
118
|
-
{
|
119
|
-
"type": "decisionTableNode",
|
120
|
-
"content": {
|
121
|
-
"hitPolicy": "first",
|
122
|
-
"rules": [
|
123
|
-
{
|
124
|
-
"_id": "r2-1",
|
125
|
-
"i2-1": "'dormant'",
|
126
|
-
"i2-2": "'premium'",
|
127
|
-
"o2-1": "'fee_waiver'",
|
128
|
-
"o2-2": "'high'"
|
129
|
-
},
|
130
|
-
{
|
131
|
-
"_id": "r2-2",
|
132
|
-
"i2-1": "'dormant'",
|
133
|
-
"i2-2": "",
|
134
|
-
"o2-1": "'auto_close'",
|
135
|
-
"o2-2": "'medium'"
|
136
|
-
},
|
137
|
-
{
|
138
|
-
"_id": "r2-3",
|
139
|
-
"i2-1": "'at_risk'",
|
140
|
-
"i2-2": "'premium'",
|
141
|
-
"o2-1": "'account_review'",
|
142
|
-
"o2-2": "'high'"
|
143
|
-
},
|
144
|
-
{
|
145
|
-
"_id": "r2-4",
|
146
|
-
"i2-1": "'at_risk'",
|
147
|
-
"i2-2": "",
|
148
|
-
"o2-1": "'final_notice'",
|
149
|
-
"o2-2": "'high'"
|
150
|
-
},
|
151
|
-
{
|
152
|
-
"_id": "r2-5",
|
153
|
-
"i2-1": "'warning'",
|
154
|
-
"i2-2": "",
|
155
|
-
"o2-1": "'notification'",
|
156
|
-
"o2-2": "'medium'"
|
157
|
-
}
|
158
|
-
],
|
159
|
-
"inputs": [
|
160
|
-
{
|
161
|
-
"id": "i2-1",
|
162
|
-
"name": "Status",
|
163
|
-
"field": "dormancyStatus"
|
164
|
-
},
|
165
|
-
{
|
166
|
-
"id": "i2-2",
|
167
|
-
"name": "Customer Tier",
|
168
|
-
"field": "customerTier"
|
169
|
-
}
|
170
|
-
],
|
171
|
-
"outputs": [
|
172
|
-
{
|
173
|
-
"id": "o2-1",
|
174
|
-
"name": "Action",
|
175
|
-
"field": "recommendedAction"
|
176
|
-
},
|
177
|
-
{
|
178
|
-
"id": "o2-2",
|
179
|
-
"name": "Priority",
|
180
|
-
"field": "actionPriority"
|
181
|
-
}
|
182
|
-
],
|
183
|
-
"passThrough": false,
|
184
|
-
"inputField": null,
|
185
|
-
"outputPath": null,
|
186
|
-
"executionMode": "single"
|
187
|
-
},
|
188
|
-
"id": "dt2",
|
189
|
-
"name": "determine_action",
|
190
|
-
"position": {
|
191
|
-
"x": 1390,
|
192
|
-
"y": 173.5
|
193
|
-
}
|
194
|
-
}
|
195
|
-
],
|
196
|
-
"edges": [
|
197
|
-
{
|
198
|
-
"id": "ed1",
|
199
|
-
"sourceId": "ip1",
|
200
|
-
"targetId": "ex1",
|
201
|
-
"type": "edge"
|
202
|
-
},
|
203
|
-
{
|
204
|
-
"id": "ed2",
|
205
|
-
"sourceId": "ex1",
|
206
|
-
"targetId": "dt1",
|
207
|
-
"type": "edge"
|
208
|
-
},
|
209
|
-
{
|
210
|
-
"id": "ed3",
|
211
|
-
"sourceId": "dt1",
|
212
|
-
"targetId": "sw1",
|
213
|
-
"type": "edge"
|
214
|
-
},
|
215
|
-
{
|
216
|
-
"id": "ed4",
|
217
|
-
"sourceId": "sw1",
|
218
|
-
"targetId": "dt2",
|
219
|
-
"sourceHandle": "s1-1",
|
220
|
-
"type": "edge"
|
221
|
-
}
|
222
|
-
]
|
223
|
-
}
|
@@ -1,262 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"nodes": [
|
3
|
-
{
|
4
|
-
"type": "inputNode",
|
5
|
-
"content": {
|
6
|
-
"schema": ""
|
7
|
-
},
|
8
|
-
"id": "ip1",
|
9
|
-
"name": "request",
|
10
|
-
"position": {
|
11
|
-
"x": 110,
|
12
|
-
"y": 114
|
13
|
-
}
|
14
|
-
},
|
15
|
-
{
|
16
|
-
"type": "decisionTableNode",
|
17
|
-
"content": {
|
18
|
-
"hitPolicy": "first",
|
19
|
-
"rules": [
|
20
|
-
{
|
21
|
-
"_id": "r1-1",
|
22
|
-
"i1-1": "'First'",
|
23
|
-
"o1-1": "3"
|
24
|
-
},
|
25
|
-
{
|
26
|
-
"_id": "r1-2",
|
27
|
-
"i1-1": "'Business'",
|
28
|
-
"o1-1": "2"
|
29
|
-
},
|
30
|
-
{
|
31
|
-
"_id": "r1-3",
|
32
|
-
"i1-1": "'Premium Economy'",
|
33
|
-
"o1-1": "1.5"
|
34
|
-
},
|
35
|
-
{
|
36
|
-
"_id": "r1-4",
|
37
|
-
"i1-1": "'Economy Plus'",
|
38
|
-
"o1-1": "1.25"
|
39
|
-
},
|
40
|
-
{
|
41
|
-
"_id": "r1-5",
|
42
|
-
"i1-1": "",
|
43
|
-
"o1-1": "1"
|
44
|
-
}
|
45
|
-
],
|
46
|
-
"inputs": [
|
47
|
-
{
|
48
|
-
"id": "i1-1",
|
49
|
-
"name": "Fare Class",
|
50
|
-
"field": "booking.fareClass"
|
51
|
-
}
|
52
|
-
],
|
53
|
-
"outputs": [
|
54
|
-
{
|
55
|
-
"id": "o1-1",
|
56
|
-
"name": "Fare Multiplier",
|
57
|
-
"field": "points.fareMultiplier"
|
58
|
-
}
|
59
|
-
],
|
60
|
-
"passThrough": true,
|
61
|
-
"inputField": null,
|
62
|
-
"outputPath": null,
|
63
|
-
"executionMode": "single"
|
64
|
-
},
|
65
|
-
"id": "dt1",
|
66
|
-
"name": "fareClassMultiplier",
|
67
|
-
"position": {
|
68
|
-
"x": 430,
|
69
|
-
"y": 114
|
70
|
-
}
|
71
|
-
},
|
72
|
-
{
|
73
|
-
"type": "decisionTableNode",
|
74
|
-
"content": {
|
75
|
-
"hitPolicy": "first",
|
76
|
-
"rules": [
|
77
|
-
{
|
78
|
-
"_id": "r2-1",
|
79
|
-
"i2-1": "'Domestic'",
|
80
|
-
"i2-2": "< 500",
|
81
|
-
"o2-1": "250"
|
82
|
-
},
|
83
|
-
{
|
84
|
-
"_id": "r2-2",
|
85
|
-
"i2-1": "'Domestic'",
|
86
|
-
"i2-2": "[500..1000]",
|
87
|
-
"o2-1": "500"
|
88
|
-
},
|
89
|
-
{
|
90
|
-
"_id": "r2-3",
|
91
|
-
"i2-1": "'Domestic'",
|
92
|
-
"i2-2": "> 1000",
|
93
|
-
"o2-1": "750"
|
94
|
-
},
|
95
|
-
{
|
96
|
-
"_id": "r2-4",
|
97
|
-
"i2-1": "'International'",
|
98
|
-
"i2-2": "< 2000",
|
99
|
-
"o2-1": "1000"
|
100
|
-
},
|
101
|
-
{
|
102
|
-
"_id": "r2-5",
|
103
|
-
"i2-1": "'International'",
|
104
|
-
"i2-2": "[2000..5000]",
|
105
|
-
"o2-1": "2000"
|
106
|
-
},
|
107
|
-
{
|
108
|
-
"_id": "r2-6",
|
109
|
-
"i2-1": "'International'",
|
110
|
-
"i2-2": "> 5000",
|
111
|
-
"o2-1": "3000"
|
112
|
-
},
|
113
|
-
{
|
114
|
-
"_id": "r2-7",
|
115
|
-
"i2-1": "",
|
116
|
-
"i2-2": "",
|
117
|
-
"o2-1": "500"
|
118
|
-
}
|
119
|
-
],
|
120
|
-
"inputs": [
|
121
|
-
{
|
122
|
-
"id": "i2-1",
|
123
|
-
"name": "Route Type",
|
124
|
-
"field": "booking.routeType"
|
125
|
-
},
|
126
|
-
{
|
127
|
-
"id": "i2-2",
|
128
|
-
"name": "Distance (miles)",
|
129
|
-
"field": "booking.distance"
|
130
|
-
}
|
131
|
-
],
|
132
|
-
"outputs": [
|
133
|
-
{
|
134
|
-
"id": "o2-1",
|
135
|
-
"name": "Base Points",
|
136
|
-
"field": "points.basePoints"
|
137
|
-
}
|
138
|
-
],
|
139
|
-
"passThrough": true,
|
140
|
-
"inputField": null,
|
141
|
-
"outputPath": null,
|
142
|
-
"executionMode": "single"
|
143
|
-
},
|
144
|
-
"id": "dt2",
|
145
|
-
"name": "routeBasePoints",
|
146
|
-
"position": {
|
147
|
-
"x": 750,
|
148
|
-
"y": 114
|
149
|
-
}
|
150
|
-
},
|
151
|
-
{
|
152
|
-
"type": "decisionTableNode",
|
153
|
-
"content": {
|
154
|
-
"hitPolicy": "first",
|
155
|
-
"rules": [
|
156
|
-
{
|
157
|
-
"_id": "r3-1",
|
158
|
-
"i3-1": "'Platinum'",
|
159
|
-
"o3-1": "2"
|
160
|
-
},
|
161
|
-
{
|
162
|
-
"_id": "r3-2",
|
163
|
-
"i3-1": "'Gold'",
|
164
|
-
"o3-1": "1.5"
|
165
|
-
},
|
166
|
-
{
|
167
|
-
"_id": "r3-3",
|
168
|
-
"i3-1": "'Silver'",
|
169
|
-
"o3-1": "1.25"
|
170
|
-
},
|
171
|
-
{
|
172
|
-
"_id": "r3-4",
|
173
|
-
"i3-1": "",
|
174
|
-
"o3-1": "1"
|
175
|
-
}
|
176
|
-
],
|
177
|
-
"inputs": [
|
178
|
-
{
|
179
|
-
"id": "i3-1",
|
180
|
-
"name": "Member Status",
|
181
|
-
"field": "member.status"
|
182
|
-
}
|
183
|
-
],
|
184
|
-
"outputs": [
|
185
|
-
{
|
186
|
-
"id": "o3-1",
|
187
|
-
"name": "Status Multiplier",
|
188
|
-
"field": "points.statusMultiplier"
|
189
|
-
}
|
190
|
-
],
|
191
|
-
"passThrough": true,
|
192
|
-
"inputField": null,
|
193
|
-
"outputPath": null,
|
194
|
-
"executionMode": "single"
|
195
|
-
},
|
196
|
-
"id": "dt3",
|
197
|
-
"name": "memberStatusMultiplier",
|
198
|
-
"position": {
|
199
|
-
"x": 1070,
|
200
|
-
"y": 114
|
201
|
-
}
|
202
|
-
},
|
203
|
-
{
|
204
|
-
"type": "expressionNode",
|
205
|
-
"content": {
|
206
|
-
"expressions": [
|
207
|
-
{
|
208
|
-
"id": "e1-1",
|
209
|
-
"key": "seasonalPromotion",
|
210
|
-
"value": "booking.isSeasonalPromotion == true ? 1.5 : 1"
|
211
|
-
},
|
212
|
-
{
|
213
|
-
"id": "e1-2",
|
214
|
-
"key": "calculatedPoints",
|
215
|
-
"value": "floor(points.basePoints * points.fareMultiplier * points.statusMultiplier * $.seasonalPromotion)"
|
216
|
-
},
|
217
|
-
{
|
218
|
-
"id": "e1-3",
|
219
|
-
"key": "totalPoints",
|
220
|
-
"value": "$.calculatedPoints"
|
221
|
-
}
|
222
|
-
],
|
223
|
-
"passThrough": false,
|
224
|
-
"inputField": null,
|
225
|
-
"outputPath": null,
|
226
|
-
"executionMode": "single"
|
227
|
-
},
|
228
|
-
"id": "ex1",
|
229
|
-
"name": "calculateTotalPoints",
|
230
|
-
"position": {
|
231
|
-
"x": 1390,
|
232
|
-
"y": 114
|
233
|
-
}
|
234
|
-
}
|
235
|
-
],
|
236
|
-
"edges": [
|
237
|
-
{
|
238
|
-
"id": "ed1",
|
239
|
-
"sourceId": "ip1",
|
240
|
-
"targetId": "dt1",
|
241
|
-
"type": "edge"
|
242
|
-
},
|
243
|
-
{
|
244
|
-
"id": "ed2",
|
245
|
-
"sourceId": "dt1",
|
246
|
-
"targetId": "dt2",
|
247
|
-
"type": "edge"
|
248
|
-
},
|
249
|
-
{
|
250
|
-
"id": "ed3",
|
251
|
-
"sourceId": "dt2",
|
252
|
-
"targetId": "dt3",
|
253
|
-
"type": "edge"
|
254
|
-
},
|
255
|
-
{
|
256
|
-
"id": "ed4",
|
257
|
-
"sourceId": "dt3",
|
258
|
-
"targetId": "ex1",
|
259
|
-
"type": "edge"
|
260
|
-
}
|
261
|
-
]
|
262
|
-
}
|