Skip to content

Commit eb5749b

Browse files
authored
fix: ignore hidden files on uipath push (#1526)
1 parent b9bcaab commit eb5749b

File tree

4 files changed

+36
-2
lines changed

4 files changed

+36
-2
lines changed

packages/uipath/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "uipath"
3-
version = "2.10.35"
3+
version = "2.10.36"
44
description = "Python SDK and CLI for UiPath Platform, enabling programmatic interaction with automation services, process management, and deployment tools."
55
readme = { file = "README.md", content-type = "text/markdown" }
66
requires-python = ">=3.11"

packages/uipath/src/uipath/_cli/_utils/_project_files.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -460,6 +460,9 @@ def is_venv_dir(d: str) -> bool:
460460

461461
dirs[:] = included_dirs
462462
for file in files:
463+
if file.startswith("."):
464+
continue
465+
463466
file_extension = os.path.splitext(file)[1].lower()
464467
file_path = os.path.join(root, file)
465468
file_name = os.path.basename(file_path)
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
import os
2+
3+
from uipath._cli._utils._project_files import files_to_include
4+
5+
6+
class TestFilesToIncludeHiddenFiles:
7+
def test_hidden_files_are_excluded(self, tmp_path):
8+
project_dir = str(tmp_path)
9+
open(os.path.join(project_dir, "main.py"), "w").close()
10+
open(os.path.join(project_dir, ".hidden_file.py"), "w").close()
11+
open(os.path.join(project_dir, ".env"), "w").close()
12+
13+
included, _ = files_to_include(None, project_dir, include_uv_lock=False)
14+
included_names = [f.file_name for f in included]
15+
16+
assert "main.py" in included_names
17+
assert ".hidden_file.py" not in included_names
18+
assert ".env" not in included_names
19+
20+
def test_hidden_files_in_subdirectory_are_excluded(self, tmp_path):
21+
project_dir = str(tmp_path)
22+
sub_dir = os.path.join(project_dir, "src")
23+
os.makedirs(sub_dir)
24+
open(os.path.join(sub_dir, "app.py"), "w").close()
25+
open(os.path.join(sub_dir, ".secret.json"), "w").close()
26+
27+
included, _ = files_to_include(None, project_dir, include_uv_lock=False)
28+
included_names = [f.file_name for f in included]
29+
30+
assert "app.py" in included_names
31+
assert ".secret.json" not in included_names

packages/uipath/uv.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)