diff --git a/packages/uipath/pyproject.toml b/packages/uipath/pyproject.toml index 4112c26ca..4571d036e 100644 --- a/packages/uipath/pyproject.toml +++ b/packages/uipath/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "uipath" -version = "2.10.35" +version = "2.10.36" 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.11" diff --git a/packages/uipath/src/uipath/_cli/_utils/_project_files.py b/packages/uipath/src/uipath/_cli/_utils/_project_files.py index 01ec36de5..c7c025197 100644 --- a/packages/uipath/src/uipath/_cli/_utils/_project_files.py +++ b/packages/uipath/src/uipath/_cli/_utils/_project_files.py @@ -460,6 +460,9 @@ def is_venv_dir(d: str) -> bool: dirs[:] = included_dirs for file in files: + if file.startswith("."): + continue + file_extension = os.path.splitext(file)[1].lower() file_path = os.path.join(root, file) file_name = os.path.basename(file_path) diff --git a/packages/uipath/tests/cli/test_files_to_include.py b/packages/uipath/tests/cli/test_files_to_include.py new file mode 100644 index 000000000..ba9f39ad8 --- /dev/null +++ b/packages/uipath/tests/cli/test_files_to_include.py @@ -0,0 +1,31 @@ +import os + +from uipath._cli._utils._project_files import files_to_include + + +class TestFilesToIncludeHiddenFiles: + def test_hidden_files_are_excluded(self, tmp_path): + project_dir = str(tmp_path) + open(os.path.join(project_dir, "main.py"), "w").close() + open(os.path.join(project_dir, ".hidden_file.py"), "w").close() + open(os.path.join(project_dir, ".env"), "w").close() + + included, _ = files_to_include(None, project_dir, include_uv_lock=False) + included_names = [f.file_name for f in included] + + assert "main.py" in included_names + assert ".hidden_file.py" not in included_names + assert ".env" not in included_names + + def test_hidden_files_in_subdirectory_are_excluded(self, tmp_path): + project_dir = str(tmp_path) + sub_dir = os.path.join(project_dir, "src") + os.makedirs(sub_dir) + open(os.path.join(sub_dir, "app.py"), "w").close() + open(os.path.join(sub_dir, ".secret.json"), "w").close() + + included, _ = files_to_include(None, project_dir, include_uv_lock=False) + included_names = [f.file_name for f in included] + + assert "app.py" in included_names + assert ".secret.json" not in included_names diff --git a/packages/uipath/uv.lock b/packages/uipath/uv.lock index 6c70be260..667a4ac50 100644 --- a/packages/uipath/uv.lock +++ b/packages/uipath/uv.lock @@ -2543,7 +2543,7 @@ wheels = [ [[package]] name = "uipath" -version = "2.10.35" +version = "2.10.36" source = { editable = "." } dependencies = [ { name = "applicationinsights" },