Skip to content

Release/sw integration #450

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
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
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:
pull_request:
branches:
- main
- release/*

jobs:
commit-lint:
Expand Down
4 changes: 4 additions & 0 deletions src/uipath/_cli/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
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_pull import pull as pull # type: ignore
from .cli_push import push as push # type: ignore
from .cli_run import run as run # type: ignore


Expand Down Expand Up @@ -63,3 +65,5 @@ def cli(lv: bool, v: bool) -> None:
cli.add_command(deploy)
cli.add_command(auth)
cli.add_command(invoke)
cli.add_command(push)
cli.add_command(pull)
2 changes: 1 addition & 1 deletion src/uipath/_cli/_auth/auth_config.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"client_id": "36dea5b8-e8bb-423d-8e7b-c808df8f1c00",
"redirect_uri": "http://localhost:__PY_REPLACE_PORT__/oidc/login",
"scope": "offline_access OrchestratorApiUserAccess IdentityServerApi ConnectionService DataService DocumentUnderstanding EnterpriseContextService Directory JamJamApi LLMGateway LLMOps OMS RCS.FolderAuthorization",
"scope": "offline_access OrchestratorApiUserAccess StudioWebBackend IdentityServerApi ConnectionService DataService DocumentUnderstanding EnterpriseContextService Directory JamJamApi LLMGateway LLMOps OMS RCS.FolderAuthorization",
"port": 8104
}
21 changes: 19 additions & 2 deletions src/uipath/_cli/_utils/_common.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import os
from typing import Optional
from urllib.parse import urlparse

import click

Expand Down Expand Up @@ -29,7 +30,7 @@ def environment_options(function):
return function


def get_env_vars(spinner: Optional[Spinner] = None) -> list[str | None]:
def get_env_vars(spinner: Optional[Spinner] = None) -> list[str]:
base_url = os.environ.get("UIPATH_URL")
token = os.environ.get("UIPATH_ACCESS_TOKEN")

Expand All @@ -42,7 +43,8 @@ def get_env_vars(spinner: Optional[Spinner] = None) -> list[str | None]:
click.echo("UIPATH_URL, UIPATH_ACCESS_TOKEN")
click.get_current_context().exit(1)

return [base_url, token]
# at this step we know for sure that both base_url and token exist. type checking can be disabled
return [base_url, token] # type: ignore


def serialize_object(obj):
Expand All @@ -69,3 +71,18 @@ def serialize_object(obj):
# Return primitive types as is
else:
return obj


def get_org_scoped_url(base_url: str) -> str:
"""Get organization scoped URL from base URL.

Args:
base_url: The base URL to scope

Returns:
str: The organization scoped URL
"""
parsed = urlparse(base_url)
org_name, *_ = parsed.path.strip("/").split("/")
org_scoped_url = f"{parsed.scheme}://{parsed.netloc}/{org_name}"
return org_scoped_url
6 changes: 6 additions & 0 deletions src/uipath/_cli/_utils/_constants.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
BINDINGS_VERSION = "2.2"

# Agent.json constants
AGENT_VERSION = "1.0.0"
AGENT_STORAGE_VERSION = "1.0.0"
AGENT_INITIAL_CODE_VERSION = "1.0.0"
AGENT_TARGET_RUNTIME = "python"

# Binary file extension categories
IMAGE_EXTENSIONS = {
".png",
Expand Down
Loading