Skip to content

Commit db97414

Browse files
authored
chore: assert .uiproj on init-flow testcase (#695)
1 parent 8c82ec2 commit db97414

File tree

4 files changed

+34
-11
lines changed

4 files changed

+34
-11
lines changed

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
[project]
22
name = "uipath-langchain"
3-
version = "0.8.26"
3+
version = "0.8.27"
44
description = "Python SDK that enables developers to build and deploy LangGraph agents to the UiPath Cloud Platform"
55
readme = { file = "README.md", content-type = "text/markdown" }
66
requires-python = ">=3.11"
77
dependencies = [
8-
"uipath>=2.10.13, <2.11.0",
8+
"uipath>=2.10.19, <2.11.0",
99
"uipath-core>=0.5.2, <0.6.0",
1010
"uipath-platform>=0.0.23, <0.1.0",
1111
"uipath-runtime>=0.9.1, <0.10.0",

src/uipath_langchain/_cli/cli_new.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def generate_pyproject(target_directory, project_name):
3131
description = "{project_name}"
3232
authors = [{{ name = "John Doe", email = "john.doe@myemail.com" }}]
3333
dependencies = [
34-
"uipath-langchain>=0.2.0",
34+
"uipath-langchain>=0.8.0, <0.9.0",
3535
]
3636
requires-python = ">=3.11"
3737
"""

testcases/init-flow/src/assert.py

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,29 @@
44

55
print("Checking init-flow output...")
66

7+
# Check studio_metadata.json was created by init
8+
studio_metadata_file = ".uipath/studio_metadata.json"
9+
assert os.path.isfile(studio_metadata_file), "studio_metadata.json not found"
10+
with open(studio_metadata_file, 'r', encoding='utf-8') as f:
11+
studio_metadata_data = json.load(f)
12+
13+
assert "schemaVersion" in studio_metadata_data, "Missing 'schemaVersion' in studio_metadata.json'"
14+
assert "codeVersion" in studio_metadata_data, "Missing 'codeVersion' in studio_metadata.json'"
15+
16+
# Check project.uiproj was created by init
17+
uiproj_file = "project.uiproj"
18+
assert os.path.isfile(uiproj_file), "project.uiproj not found"
19+
20+
with open(uiproj_file, 'r', encoding='utf-8') as f:
21+
uiproj_data = json.load(f)
22+
23+
assert "ProjectType" in uiproj_data, "Missing 'ProjectType' in project.uiproj"
24+
assert uiproj_data["ProjectType"] in ("Agent", "Function"), f"Unexpected ProjectType: {uiproj_data['ProjectType']}"
25+
assert "Name" in uiproj_data, "Missing 'Name' in project.uiproj"
26+
assert uiproj_data["Name"], "Name is empty in project.uiproj"
27+
28+
print(f"project.uiproj found: ProjectType={uiproj_data['ProjectType']}, Name={uiproj_data['Name']}")
29+
730
# Check NuGet package
831
uipath_dir = ".uipath"
932
assert os.path.exists(uipath_dir), "NuGet package directory (.uipath) not found"

uv.lock

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

0 commit comments

Comments
 (0)