File tree Expand file tree Collapse file tree 3 files changed +32
-4
lines changed Expand file tree Collapse file tree 3 files changed +32
-4
lines changed Original file line number Diff line number Diff line change
1
+ import uuid
2
+
1
3
def snake_to_camel (name ):
2
4
"""
3
5
Convert snake_case to camelCase.
@@ -7,4 +9,30 @@ def snake_to_camel(name):
7
9
8
10
"""
9
11
components = name .split ('_' )
10
- return components [0 ] + '' .join (x .title () for x in components [1 :])
12
+ return components [0 ] + '' .join (x .title () for x in components [1 :])
13
+
14
+ def generate_step_id ():
15
+ """
16
+ Generate a random ID.
17
+
18
+ :return: str
19
+
20
+ """
21
+ return f"step-${ str (uuid .uuid4 ())} "
22
+
23
+ def is_id_valid (id ):
24
+ """
25
+ Check if the ID is valid.
26
+
27
+ :param id: str
28
+ :return: bool
29
+
30
+ """
31
+ if not id .startswith ('step-' ):
32
+ return False
33
+ else :
34
+ try :
35
+ uuid .UUID (id )
36
+ return True
37
+ except ValueError :
38
+ return False
Original file line number Diff line number Diff line change 1
1
[tool .poetry ]
2
2
name = " payments-py"
3
- version = " 0.4.6 "
3
+ version = " 0.4.7 "
4
4
description = " "
5
5
authors = [" enrique <enrique@nevermined.io>" ]
6
6
readme = " README.md"
Original file line number Diff line number Diff line change @@ -164,8 +164,8 @@ async def test_AIQueryApi_create_task_in_plan_purchased(ai_query_api_build_fixtu
164
164
# @pytest.mark.asyncio(loop_scope="session")
165
165
# async def test_AI_send_task(ai_query_api_build_fixture):
166
166
# builder = ai_query_api_build_fixture
167
- # task = builder.ai_protocol.create_task('did:nv:a8983b06c0f25fb4064fc61d6527c84ca1813e552bfad5fa1c974caa3c5ccf49 ',
168
- # {'query': 'https://www.youtube.com/watch?v=-_4GZnGl55c&t=5s ', 'name': 'Summarize video'})
167
+ # task = builder.ai_protocol.create_task('did:nv:7d86045034ea8a14c133c487374a175c56a9c6144f6395581435bc7f1dc9e0cc ',
168
+ # {'query': 'https://www.youtube.com/watch?v=SB7eoaVw4Sk ', 'name': 'Summarize video'})
169
169
# print('Task created:', task.json())
170
170
171
171
# @pytest.mark.asyncio(loop_scope="session")
You can’t perform that action at this time.
0 commit comments