Skip to content

Commit e9a1939

Browse files
committed
chore: clean directory for cli new command
1 parent 3d1a182 commit e9a1939

File tree

5 files changed

+11
-29
lines changed

5 files changed

+11
-29
lines changed

pyproject.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
[project]
22
name = "uipath-mcp"
3-
version = "0.0.102"
3+
version = "0.0.103"
44
description = "UiPath MCP SDK"
55
readme = { file = "README.md", content-type = "text/markdown" }
66
requires-python = ">=3.11"
77
dependencies = [
88
"mcp==1.11.0",
99
"pysignalr==1.3.0",
10-
"uipath>=2.1.0, <2.2.0",
10+
"uipath>=2.1.14, <2.2.0",
1111
]
1212
classifiers = [
1313
"Development Status :: 3 - Alpha",
@@ -47,6 +47,7 @@ dev = [
4747
[tool.ruff]
4848
line-length = 88
4949
indent-width = 4
50+
exclude = ["samples/**"]
5051

5152
[tool.ruff.lint]
5253
select = ["E", "F", "B", "I"]

src/uipath_mcp/_cli/_runtime/_context.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,12 @@ class UiPathMcpRuntimeContext(UiPathRuntimeContext):
1515
server_slug: Optional[str] = None
1616

1717
@classmethod
18-
def from_config(cls, config_path=None):
18+
def from_config(cls, config_path=None, **kwargs):
1919
"""Load configuration from uipath.json file with MCP-specific handling."""
20-
# Use the parent's implementation
2120
instance = super().from_config(config_path)
2221

23-
# Convert to our type (since parent returns UiPathRuntimeContext)
2422
mcp_instance = cls(**instance.model_dump())
2523

26-
# Add AgentHub-specific configuration handling
2724
import json
2825
import os
2926

src/uipath_mcp/_cli/_templates/pyproject.toml.template

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ version = "0.0.1"
44
description = "Description for $project_name project"
55
authors = [{ name = "John Doe", email = "[email protected]" }]
66
dependencies = [
7-
"uipath-mcp>=0.0.101",
7+
"uipath-mcp>=0.0.103",
88
]
99
requires-python = ">=3.11"

src/uipath_mcp/_cli/cli_new.py

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,29 +3,13 @@
33
from typing import List, Optional, Tuple
44

55
import click
6+
from uipath._cli._utils._common import clean_directory
67
from uipath._cli._utils._console import ConsoleLogger
78
from uipath._cli.middlewares import MiddlewareResult
89

910
console = ConsoleLogger()
1011

1112

12-
def clean_directory(directory: str) -> None:
13-
"""Clean up Python files in the specified directory.
14-
15-
Args:
16-
directory (str): Path to the directory to clean.
17-
18-
This function removes all Python files (*.py) from the specified directory.
19-
It's used to prepare a directory for new MCP server template files.
20-
"""
21-
for file_name in os.listdir(directory):
22-
file_path = os.path.join(directory, file_name)
23-
24-
if os.path.isfile(file_path) and file_name.endswith(".py"):
25-
# Delete the file
26-
os.remove(file_path)
27-
28-
2913
def write_template_file(
3014
target_directory: str,
3115
file_path: str,

uv.lock

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

0 commit comments

Comments
 (0)