Skip to content

chore: change project name #243

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 8, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ on:
- main
paths:
- "pyproject.toml"
- "src/uipath_sdk/**"
- "src/**"
pull_request:
branches:
- main
paths:
- "pyproject.toml"
- "src/uipath_sdk/**"
- "src/**"

jobs:
lint:
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ See `just --list` for linting, formatting and build commands.
3. Obtain the project path `PATH_TO_SDK=/Users/YOU_USER/uipath-python`
4. Install the sdk in editable mode `uv add --editable ${PATH_TO_SDK}`

:information_source: Instead of cloning the project into `.venv/lib/python3.9/site-packages/uipath_sdk`, this mode creates a file named `_uipath_sdk.pth` inside `.venv/lib/python3.9/site-packages`. This file contains the value of `PATH_TO_SDK`, which is added to `sys.path`—the list of directories where python searches for packages. (Run `python -c 'import sys; print(sys.path)'` to see the entries.)
:information_source: Instead of cloning the project into `.venv/lib/python3.9/site-packages/uipath`, this mode creates a file named `_uipath.pth` inside `.venv/lib/python3.9/site-packages`. This file contains the value of `PATH_TO_SDK`, which is added to `sys.path`—the list of directories where python searches for packages. (Run `python -c 'import sys; print(sys.path)'` to see the entries.)

## API Style Guide

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ UIPATH_ACCESS_TOKEN=YOUR_TOKEN_HERE
## Basic Usage

```python
from uipath_sdk import UiPathSDK
from uipath import UiPath
# Initialize the SDK
sdk = UiPathSDK()
sdk = UiPath()
# Execute a process
job = sdk.processes.invoke(
name="MyProcess",
Expand Down
2 changes: 1 addition & 1 deletion docs/assets.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
::: uipath_sdk._services.assets_service
::: uipath._services.assets_service
2 changes: 1 addition & 1 deletion docs/buckets.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
::: uipath_sdk._services.buckets_service
::: uipath._services.buckets_service
2 changes: 1 addition & 1 deletion docs/connections.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
::: uipath_sdk._services.connections_service
::: uipath._services.connections_service
2 changes: 1 addition & 1 deletion docs/context_grounding.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
::: uipath_sdk._services.context_grounding_service
::: uipath._services.context_grounding_service
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Welcome to UiPath SDK

::: uipath_sdk
::: uipath
2 changes: 1 addition & 1 deletion docs/jobs.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
::: uipath_sdk._services.jobs_service
::: uipath._services.jobs_service
2 changes: 1 addition & 1 deletion docs/processes.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
::: uipath_sdk._services.processes_service
::: uipath._services.processes_service
2 changes: 1 addition & 1 deletion docs/queues.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
::: uipath_sdk._services.queues_service
::: uipath._services.queues_service
84 changes: 39 additions & 45 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,71 +1,69 @@
[project]
name = "uipath-sdk"
version = "0.0.115"
description = "UiPath SDK"
name = "uipath"
version = "2.0.0.dev1"
description = "Python SDK and CLI for UiPath Platform, enabling programmatic interaction with automation services, process management, and deployment tools."
readme = { file = "README.md", content-type = "text/markdown" }
requires-python = ">=3.9"
dependencies = [
"click>=8.1.8",
"httpx>=0.28.1",
"pydantic>=2.11.1",
"pytest-asyncio>=0.25.3",
"python-dotenv>=1.0.1",
"requests>=2.32.3",
"tenacity>=9.0.0",
"tomli>=2.2.1",
"types-requests>=2.32.0.20250306",
"click>=8.1.8",
"httpx>=0.28.1",
"pydantic>=2.11.1",
"pytest-asyncio>=0.25.3",
"python-dotenv>=1.0.1",
"requests>=2.32.3",
"tenacity>=9.0.0",
"tomli>=2.2.1",
"types-requests>=2.32.0.20250306",
]
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"Topic :: Software Development :: Build Tools",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"Topic :: Software Development :: Build Tools",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
]
maintainers = [
{ name = "Marius Cosareanu", email = "marius.cosareanu@uipath.com" },
{ name = "Cristian Pufu", email = "cristian.pufu@uipath.com" }
{ name = "Marius Cosareanu", email = "marius.cosareanu@uipath.com" },
{ name = "Cristian Pufu", email = "cristian.pufu@uipath.com" },
]

[project.urls]
Homepage = "https://uipath.com"
Repository = "https://github.com/UiPath/uipath-python"

[project.scripts]
uipath = "uipath_sdk._cli:cli"
uipath = "uipath._cli:cli"

[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[tool.hatch.build.targets.wheel]
packages = ["src/uipath_sdk"]
packages = ["src/uipath"]

[tool.hatch.build.targets.sdist]
packages = ["src/uipath_sdk"]
packages = ["src/uipath"]

[dependency-groups]
dev = [
"bandit>=1.8.2",
"mypy>=1.14.1",
"ruff>=0.9.4",
"rust-just>=1.39.0",
"pytest>=7.4.0",
"pytest-cov>=4.1.0",
"pytest-mock>=3.11.1",
"pre-commit>=4.1.0",
"mkdocs>=1.6.1",
"mkdocs-material>=9.6.7",
"mkdocstrings>=0.29.0",
"mkdocstrings-python>=1.16.5",
"bandit>=1.8.2",
"mypy>=1.14.1",
"ruff>=0.9.4",
"rust-just>=1.39.0",
"pytest>=7.4.0",
"pytest-cov>=4.1.0",
"pytest-mock>=3.11.1",
"pre-commit>=4.1.0",
"mkdocs>=1.6.1",
"mkdocs-material>=9.6.7",
"mkdocstrings>=0.29.0",
"mkdocstrings-python>=1.16.5",
]

[project.optional-dependencies]
langchain = [
"uipath-langchain>=0.0.16"
]
langchain = ["uipath-langchain==0.0.85"]

[tool.ruff]
line-length = 88
Expand All @@ -84,7 +82,7 @@ ignore-decorators = []
"tests/**" = ["D"]
"*_test.py" = ["D"]
# TODO: Remove this once the documentation for CLI is updated
"uipath_sdk/_cli/**" = ["D"]
"uipath/_cli/**" = ["D"]

[tool.ruff.format]
quote-style = "double"
Expand All @@ -93,9 +91,7 @@ skip-magic-trailing-comma = false
line-ending = "auto"

[tool.mypy]
plugins = [
"pydantic.mypy"
]
plugins = ["pydantic.mypy"]

follow_imports = "silent"
warn_redundant_casts = true
Expand All @@ -115,5 +111,3 @@ warn_required_dynamic_aliases = true
testpaths = ["tests"]
python_files = "test_*.py"
addopts = "-ra -q"


10 changes: 5 additions & 5 deletions src/uipath_sdk/__init__.py → src/uipath/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
This package provides a Python interface to interact with UiPath's automation platform.


The main entry point is the UiPathSDK class, which provides access to all SDK functionality.
The main entry point is the UiPath class, which provides access to all SDK functionality.

Example:
```python
Expand All @@ -12,13 +12,13 @@
# export UIPATH_ACCESS_TOKEN="your_**_token"
# export UIPATH_FOLDER_PATH="your/folder/path"

from uipath_sdk import UiPathSDK
sdk = UiPathSDK()
from uipath import UiPath
sdk = UiPath()
# Invoke a process by name
sdk.processes.invoke("MyProcess")
```
"""

from ._uipath_sdk import UiPathSDK
from ._uipath import UiPath

__all__ = ["UiPathSDK"]
__all__ = ["UiPath"]
File renamed without changes.
24 changes: 12 additions & 12 deletions src/uipath_sdk/_cli/__init__.py → src/uipath/_cli/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@

import click

from uipath_sdk._cli.cli_auth import auth as auth # type: ignore
from uipath_sdk._cli.cli_deploy import deploy as deploy # type: ignore
from uipath_sdk._cli.cli_init import init as init # type: ignore
from uipath_sdk._cli.cli_new import new as new # type: ignore
from uipath_sdk._cli.cli_pack import pack as pack # type: ignore
from uipath_sdk._cli.cli_publish import publish as publish # type: ignore
from uipath_sdk._cli.cli_run import run as run # type: ignore
from .cli_auth import auth as auth # type: ignore
from .cli_deploy import deploy as deploy # type: ignore
from .cli_init import init as init # type: ignore
from .cli_new import new as new # type: ignore
from .cli_pack import pack as pack # type: ignore
from .cli_publish import publish as publish # type: ignore
from .cli_run import run as run # type: ignore


@click.group(invoke_without_command=True)
@click.version_option(
importlib.metadata.version("uipath-sdk"),
importlib.metadata.version("uipath"),
prog_name="uipath",
message="%(prog)s version %(version)s",
)
Expand All @@ -26,7 +26,7 @@
@click.option(
"-v",
is_flag=True,
help="Display the current version of uipath-sdk.",
help="Display the current version of uipath.",
)
def cli(lv: bool, v: bool) -> None:
if lv:
Expand All @@ -38,10 +38,10 @@ def cli(lv: bool, v: bool) -> None:
sys.exit(1)
if v:
try:
version = importlib.metadata.version("uipath-sdk")
click.echo(f"uipath-sdk version {version}")
version = importlib.metadata.version("uipath")
click.echo(f"uipath version {version}")
except importlib.metadata.PackageNotFoundError:
click.echo("uipath-sdk is not installed", err=True)
click.echo("uipath is not installed", err=True)
sys.exit(1)


Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

from pydantic import BaseModel, Field

from uipath_sdk._cli._runtime._logging import LogsInterceptor
from ._logging import LogsInterceptor

logger = logging.getLogger(__name__)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from dataclasses import asdict, is_dataclass
from typing import Any, Dict, Optional, Type, TypeVar, cast, get_type_hints

from uipath_sdk._cli._runtime._contracts import (
from ._contracts import (
UiPathBaseRuntime,
UiPathErrorCategory,
UiPathRuntimeError,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -197,8 +197,8 @@ def parse_local_module(
return {}


class UiPathSDKTracker:
"""Tracks UiPathSDK usage throughout the code."""
class UiPathTracker:
"""Tracks UiPath usage throughout the code."""

def __init__(self, source_code: str, base_dir: str = ""):
self.source_code = source_code
Expand All @@ -224,7 +224,7 @@ def analyze(self) -> None:
self._find_method_calls()

def _find_imports(self) -> None:
"""Find all imports of UiPathSDK and local modules."""
"""Find all imports of UiPath and local modules."""

class ImportVisitor(ast.NodeVisitor):
def __init__(self):
Expand All @@ -233,7 +233,7 @@ def __init__(self):

def visit_Import(self, node):
for alias in node.names:
if alias.name == "uipath_sdk":
if alias.name == "uipath":
self.imports[alias.asname or alias.name] = alias.name
elif (
not alias.name.startswith(("__", "builtins", "typing"))
Expand All @@ -244,12 +244,10 @@ def visit_Import(self, node):
self.generic_visit(node)

def visit_ImportFrom(self, node):
if node.module == "uipath_sdk":
if node.module == "uipath":
for alias in node.names:
if alias.name == "UiPathSDK":
self.imports[alias.asname or alias.name] = (
"uipath_sdk.UiPathSDK"
)
if alias.name == "UiPath":
self.imports[alias.asname or alias.name] = "uipath.UiPath"
elif node.module and not node.module.startswith(
("__", "builtins", "typing")
):
Expand All @@ -263,7 +261,7 @@ def visit_ImportFrom(self, node):
self.local_imports = visitor.local_imports

def _find_instances(self) -> None:
"""Find all instances created from UiPathSDK."""
"""Find all instances created from UiPath."""

class InstanceVisitor(ast.NodeVisitor):
def __init__(self, sdk_imports):
Expand All @@ -279,15 +277,15 @@ def visit_Assign(self, node):
):
for target in node.targets:
if isinstance(target, ast.Name):
self.instances[target.id] = "UiPathSDK"
self.instances[target.id] = "UiPath"
self.generic_visit(node)

visitor = InstanceVisitor(self.sdk_imports)
visitor.visit(self.tree)
self.sdk_instances = visitor.instances

def _find_method_calls(self) -> None:
"""Find all method calls on UiPathSDK instances."""
"""Find all method calls on UiPath instances."""

class MethodCallVisitor(ast.NodeVisitor):
def __init__(self, source_code, sdk_instances, service_usage):
Expand Down Expand Up @@ -408,7 +406,7 @@ def get_results(self) -> Dict[str, List[Dict[str, str]]]:
def parse_sdk_usage(
source_code: str, base_dir: str = ""
) -> Dict[str, List[Dict[str, str]]]:
"""Parse the source code and return UiPathSDK usage information.
"""Parse the source code and return UiPath usage information.

Args:
source_code: The Python source code to analyze
Expand All @@ -417,7 +415,7 @@ def parse_sdk_usage(
Returns:
Dictionary of SDK usage information
"""
tracker = UiPathSDKTracker(source_code, base_dir)
tracker = UiPathTracker(source_code, base_dir)
tracker.analyze()
results = tracker.get_results()

Expand Down
Loading
Loading